-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (61 loc) · 1.77 KB
/
c.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: C
on: push
jobs:
c-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup clang-tidy
run: sudo apt-get install -y clang-tidy
- name: Run tests
run: make clint
c:
strategy:
fail-fast: false
matrix:
# compiler: ["llvm", "gcc"]
# # compiler targets (ideally): clang, gcc, MSVCC, pcc, tcc, icc,
os: [ubuntu-latest, windows-latest, macos-latest, macos-13, 'ubuntu-20.04']
# include:
# - os: windows-latest
# compiler: msvc
# - os: windows-latest
# compiler: mingw
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Use Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache-dependency-path: '*/requirements.txt'
- name: Setup tcc, pcc
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install -y tcc pcc
- name: Setup MSVC
uses: aminya/setup-cpp@v1
if: ${{ contains(matrix.os, 'windows') }}
with:
compiler: msvc
vcvarsall: true
# - name: Set up MinGW
# if: ${{ contains(matrix.os, 'windows') }}
# uses: egor-tensin/setup-mingw@v2
# with:
# platform: x64
- name: Run tests (linux)
if: ${{ contains(matrix.os, 'ubuntu') }}
run: make ctest${{ (matrix.os != 'ubuntu-latest' && '_auto') || '' }}
- name: Run tests (windows)
if: ${{ contains(matrix.os, 'windows') }}
run: make ctest_auto
- name: Run tests (macos)
if: ${{ contains(matrix.os, 'macos') }}
run: make ctest_auto
env:
NO_OPTIONAL_TESTS: true
COMPILER_OVERRIDE: clang