Skip to content

Commit afb304a

Browse files
committed
Add GitHub CI workflow
1 parent 32f9c0c commit afb304a

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, dev ]
6+
pull_request:
7+
branches: [ master, dev ]
8+
9+
jobs:
10+
build-linux:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
fedora: [38, 39, 40]
15+
include:
16+
- fedora: 38
17+
gcc: 13
18+
- fedora: 39
19+
gcc: 13
20+
- fedora: 40
21+
gcc: 14
22+
23+
container: ghcr.io/fairrootgroup/fairmq-dev/fedora-${{ matrix.fedora }}
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Install additional dependencies
29+
run: |
30+
dnf install -y fmt-devel || true
31+
32+
- name: Configure
33+
run: |
34+
cmake -B build -G Ninja \
35+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
36+
-DDISABLE_COLOR=ON \
37+
-DUSE_EXTERNAL_FMT=ON \
38+
-DUSE_BOOST_PRETTY_FUNCTION=ON
39+
40+
- name: Build
41+
run: cmake --build build
42+
43+
- name: Test
44+
run: |
45+
cd build
46+
ctest -V --output-on-failure
47+
48+
build-macos:
49+
runs-on: ${{ matrix.os }}
50+
strategy:
51+
matrix:
52+
os: [macos-13, macos-14, macos-15]
53+
54+
steps:
55+
- uses: actions/checkout@v4
56+
57+
- name: Cache Homebrew packages
58+
uses: actions/cache@v4
59+
with:
60+
path: |
61+
~/Library/Caches/Homebrew
62+
/usr/local/Homebrew/Library/Taps
63+
key: ${{ runner.os }}-${{ matrix.os }}-brew-${{ hashFiles('.github/workflows/ci.yml') }}
64+
restore-keys: |
65+
${{ runner.os }}-${{ matrix.os }}-brew-
66+
67+
- name: Install dependencies
68+
run: |
69+
brew install cmake ninja boost fmt
70+
71+
- name: Configure
72+
run: |
73+
cmake -B build -G Ninja \
74+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
75+
-DDISABLE_COLOR=ON \
76+
-DUSE_EXTERNAL_FMT=ON \
77+
-DUSE_BOOST_PRETTY_FUNCTION=ON
78+
79+
- name: Build
80+
run: cmake --build build
81+
82+
- name: Test
83+
run: |
84+
cd build
85+
ctest -V --output-on-failure

0 commit comments

Comments
 (0)