-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (78 loc) · 2.36 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: C
on:
push:
paths:
- 'c/**'
- '!c/README.rst'
schedule:
- cron: "0 0 1 * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
c:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, macos-13, 'ubuntu-20.04']
compiler: ['all']
include:
- os: ubuntu-latest
compiler: clang
- os: ubuntu-latest
compiler: gcc
- os: ubuntu-latest
compiler: tcc
- os: ubuntu-latest
compiler: pcc
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
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 compiler
uses: awalsh128/cache-apt-pkgs-action@latest
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
packages: ${{ matrix.compiler }}
version: ${{ matrix.compiler }}
- name: Setup MSVC
uses: aminya/setup-cpp@v1
if: ${{ contains(matrix.os, 'windows') }}
with:
compiler: msvc
vcvarsall: true
- name: Run tests (native runner)
if: ${{ !contains(matrix.os, 'windows') }}
run: make c_native_test
- name: Run tests (ubuntu-latest)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: make c_test COV=true COMPILER_OVERRIDE=${{ matrix.compiler }} NO_CLEANUP=true
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# if: ${{ matrix.os == 'ubuntu-latest' }}
# with:
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow
# limit-access-to-actor: true
- name: Run tests (ubuntu lts)
if: ${{ contains(matrix.os, 'ubuntu') && matrix.os != 'ubuntu-latest' }}
run: make c_test_auto
- name: Run tests (windows)
if: ${{ contains(matrix.os, 'windows') }}
run: make c_test_auto
- name: Run tests (macos)
if: ${{ contains(matrix.os, 'macos') }}
run: make c_test_auto
env:
NO_OPTIONAL_TESTS: true
COMPILER_OVERRIDE: clang
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: C