-
Notifications
You must be signed in to change notification settings - Fork 7
104 lines (81 loc) · 2.36 KB
/
presubmit.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
93
94
95
96
97
98
99
100
101
102
103
name: Presubmit Checks
on:
pull_request:
branches: [ main ]
schedule:
- cron: '0 2 * * 0' # Weekly
jobs:
sanitizers:
name: sanitizer (${{ matrix.sanitizer }})
runs-on: ubuntu-latest
permissions:
packages: read
container:
image: ghcr.io/charlesnicholson/docker-image:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
sanitizer: [ "memory", "address", "safe-stack", "undefined" ]
steps:
- uses: actions/checkout@v4
- name: Build
run: CC=clang CXX=clang++ COBS_SANITIZER=${{ matrix.sanitizer }} make -j
arm-cm4:
runs-on: ubuntu-latest
permissions:
packages: read
container:
image: ghcr.io/charlesnicholson/docker-image:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Build
run: arm-none-eabi-gcc -mcpu=cortex-m4 -Os -Werror -Wall -Wextra -Wconversion -c cobs.c
linux:
name: linux (${{ matrix.compiler.name }}, ${{ matrix.architecture }})
runs-on: ubuntu-latest
permissions:
packages: read
container:
image: ghcr.io/charlesnicholson/docker-image:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
compiler:
- { name: "clang", env: "CC=clang CXX=clang++" }
- { name: "gcc", env: "CC=gcc CXX=g++" }
architecture: [32, 64]
steps:
- uses: actions/checkout@v4
- name: Build
run: ${{ matrix.compiler.env }} COBS_LINUXARCH=${{ matrix.architecture }} make -j
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: make -j
win:
name: windows (msvc, ${{ matrix.architecture }})
runs-on: windows-latest
strategy:
matrix:
architecture: [32, 64]
steps:
- uses: actions/checkout@v4
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars${{ matrix.architecture }}.bat"
call make-win.bat
all-checks-pass:
needs: [sanitizers, linux, macos, win, arm-cm4]
runs-on: ubuntu-latest
steps:
- run: echo Done