This repository was archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
116 lines (98 loc) · 2.78 KB
/
test.yml
File metadata and controls
116 lines (98 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
defaults:
run:
shell: bash
jobs:
test:
name: ${{ matrix.build.name }}
runs-on: ${{ matrix.build.os }}
env:
BUILD_ENV: debug
TARGET: ${{ matrix.build.target }}
CXX: ${{ matrix.build.cxx }}
AR: ${{ matrix.build.ar }}
RUST_BACKTRACE: "1"
strategy:
fail-fast: false
matrix:
build:
- name: test on linux (clang)
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
cxx: clang++-12
ar: llvm-ar-12
run: make tests/run
- name: test on mac (clang)
os: macos-latest
target: x86_64-apple-darwin
cxx: clang++
ar: ar
run: |
$CXX --version
make tests/run
- name: test on windows (msvc)
os: windows-latest
target: x86_64-pc-windows-msvc
cxx: cl.exe
run: |
make tests/run
- name: valgrind
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
cxx: clang++-12
ar: llvm-ar-12
run: |
sudo apt-get update
sudo apt-get install -y valgrind libtool-bin
make tests/runner
valgrind ./tests/runner
- name: asan
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
cxx: clang++-12
ar: llvm-ar-12
run: ASAN_OPTIONS=detect_leaks=1:alloc_dealloc_mismatch=0 CXXFLAGS="-fsanitize=address" make tests/run
steps:
- name: setup msvc on windows
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.build.target }}
override: true
- name: print rustc detailed version
run: rustc --version --verbose
- name: checkout
uses: actions/checkout@v2
- name: codegen
run: make do-codegen
- name: run tests
run: ${{ matrix.build.run }}
test-header:
name: test building lib-ruby-parser.hpp
runs-on: ubuntu-latest
env:
TARGET: x86_64-unknown-linux-gnu
steps:
- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: checkout
uses: actions/checkout@v2
- name: build lib-ruby-parser.hpp
run: make lib-ruby-parser.hpp
- name: validate lib-ruby-parser.hpp
run: clang++ -fsyntax-only -Wall -Wextra -Wpedantic lib-ruby-parser.hpp