Skip to content

Commit 9ba1f6f

Browse files
committed
Add GitHub Actions CI workflow
Set up continuous integration with: - Ubuntu and macOS runners - Multiple GCC versions (11, 12, 13) on Ubuntu - Clang on both platforms - GCC 13 on macOS via Homebrew - Builds and runs unit tests for all compiler combinations
1 parent 41bae6c commit 9ba1f6f

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build-ubuntu:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
compiler:
14+
- { cc: gcc-11, cxx: g++-11 }
15+
- { cc: gcc-12, cxx: g++-12 }
16+
- { cc: gcc-13, cxx: g++-13 }
17+
- { cc: clang, cxx: clang++ }
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install compiler
22+
run: |
23+
sudo apt-get update
24+
if [[ "${{ matrix.compiler.cc }}" == gcc-* ]]; then
25+
sudo apt-get install -y ${{ matrix.compiler.cc }} ${{ matrix.compiler.cxx }}
26+
fi
27+
28+
- name: Build and test
29+
env:
30+
CC: ${{ matrix.compiler.cc }}
31+
run: make
32+
33+
- name: Build reference signer
34+
env:
35+
CC: ${{ matrix.compiler.cc }}
36+
run: make reference_signer
37+
38+
build-macos:
39+
runs-on: macos-latest
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
compiler:
44+
- { cc: clang, cxx: clang++ }
45+
- { cc: gcc-13, cxx: g++-13 }
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Install GCC (if needed)
50+
if: startsWith(matrix.compiler.cc, 'gcc')
51+
run: brew install ${{ matrix.compiler.cc }}
52+
53+
- name: Build and test
54+
env:
55+
CC: ${{ matrix.compiler.cc }}
56+
run: make
57+
58+
- name: Build reference signer
59+
env:
60+
CC: ${{ matrix.compiler.cc }}
61+
run: make reference_signer

0 commit comments

Comments
 (0)