-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (40 loc) · 1.25 KB
/
linux.yml
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
name: Linux
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-linux:
defaults:
run:
shell: bash
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
cc: [clang, gcc]
build_type: [Release, Debug]
name: ubuntu-${{matrix.cc}}-${{matrix.build_type}}
steps:
- uses: actions/checkout@v2
- name: Setup Dependencies
run: |
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y \
build-essential \
cmake \
ninja-build \
python3 \
valgrind \
${{matrix.cc}}
- name: Configure
run: cmake -S . -B build_${{matrix.build_type}} -D CMAKE_C_COMPILER=${{matrix.cc}} -G Ninja
- name: Build
run: cmake --build build_${{matrix.build_type}} --config ${{matrix.build_type}}
- name: Valgrind
run: |
sudo valgrind --track-origins=yes --error-exitcode=1 --leak-check=full ./build_${{matrix.build_type}}/yfc tests/sem/funcs-pass.yf --just-semantics
- name: Test
run: |
python3 scripts/run-tests.py build_${{matrix.build_type}}/yfc