-
Notifications
You must be signed in to change notification settings - Fork 36
66 lines (57 loc) · 2.12 KB
/
Copy pathci.yaml
File metadata and controls
66 lines (57 loc) · 2.12 KB
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
# See https://github.com/lukka/CppCMakeVcpkgTemplate/tree/v11
name: Continuous Integration
description: CI workflow for building DynamO and running the unit tests
on:
- push
- pull_request
jobs:
nix-build:
name: ${{ matrix.os }}-${{ github.workflow }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04] #windows-2022, macos-15
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-24.11
extra_nix_config: |
experimental-features = nix-command flakes
allow-import-from-derivation = true
sandbox = false
- name: Build the nix package
run: nix-build
hand-build:
name: ${{ matrix.os }}-${{ github.workflow }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04] #windows-2022, macos-15
steps:
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-24.11
extra_nix_config: |
experimental-features = nix-command flakes
allow-import-from-derivation = true
sandbox = false
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure the project
run: nix-shell ${{github.workspace}} --run "cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release"
- name: Build the project
run: nix-shell ${{github.workspace}} --run "cmake --build ${{github.workspace}}/build -j4 --config Release"
- name: Check code formatting
run: nix-shell ${{github.workspace}} --run "cmake --build ${{github.workspace}}/build -j4 -t check-src-format --config Release"
# Test the whole project with CTest
- name: Test (Release configuration)
working-directory: ${{github.workspace}}/build
run: nix-shell ${{github.workspace}} --run "ctest -j 4 --output-on-failure -C Release"