-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (131 loc) · 4.71 KB
/
test.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: 'build & test'
on:
push:
branches:
- 'trunk'
paths:
- '**.cpp'
- '**.hpp'
- 'meson.build'
- 'CMakeLists.txt'
pull_request:
paths:
- '**.cpp'
- '**.hpp'
- 'meson.build'
- 'CMakeLists.txt'
workflow_call:
jobs:
flake-check:
name: Nix Flake Check
timeout-minutes: 2
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
- name: Nix Check
run: nix flake check .# -L --extra-experimental-features nix-command --extra-experimental-features flakes
linux:
name: ${{ matrix.build.runner }} ${{ matrix.build.buildsystem }} ${{ matrix.build.cc }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
build:
[
{ runner: ubuntu-22.04, buildsystem: meson, cc: clang, },
{ runner: ubuntu-22.04, buildsystem: cmake, cc: clang, },
{ runner: ubuntu-22.04, buildsystem: meson, cc: gcc, },
{ runner: ubuntu-22.04, buildsystem: cmake, cc: gcc, },
]
runs-on: ${{ matrix.build.runner }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
- if: ${{ matrix.build.buildsystem == 'meson' && matrix.build.cc == 'clang' }}
name: ${{ matrix.build.buildsystem }} ${{ matrix.build.cc }}
run: |
nix develop .#ciClang \
-L \
--extra-experimental-features nix-command \
--extra-experimental-features flakes \
-c sh \
-c "just -d . -f ./ci/Justfile build-and-test-linux"
- if: ${{ matrix.build.buildsystem == 'meson' && matrix.build.cc == 'gcc' }}
name: ${{ matrix.build.buildsystem }} ${{ matrix.build.cc }}
run: |
nix develop .#ciGcc \
-L \
--extra-experimental-features nix-command \
--extra-experimental-features flakes \
-c sh \
-c "just -d . -f ./ci/Justfile build-and-test-linux"
- if: ${{ matrix.build.buildsystem == 'cmake' && matrix.build.cc == 'clang' }}
name: ${{ matrix.build.buildsystem }} ${{ matrix.build.cc }}
run: |
nix develop .#ciGcc \
-L \
--extra-experimental-features nix-command \
--extra-experimental-features flakes \
-c sh \
-c "cmake -S . -B build -DDIRE_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE='Debug' && cmake --build build --parallel 16 && ./build/src/test/dire_test"
- if: ${{ matrix.build.buildsystem == 'cmake' && matrix.build.cc == 'gcc' }}
name: ${{ matrix.build.buildsystem }} ${{ matrix.build.cc }}
run: |
nix develop .#ciClang \
-L \
--extra-experimental-features nix-command \
--extra-experimental-features flakes \
-c sh \
-c "cmake -S . -B build -DDIRE_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE='Debug' && cmake --build build --parallel 16 && ./build/src/test/dire_test"
darwin: # TODO: Turns out I made a fucky wucky and didn't write actual CI for this lmao
name: ${{ matrix.build.runner }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
build:
[
{ runner: macos-14 },
{ runner: macos-13 },
{ runner: macos-12 },
]
runs-on: ${{ matrix.build.runner }}
env:
CC: clang
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
- name: Nix Check
run: nix flake check .# -L --extra-experimental-features nix-command --extra-experimental-features flakes
windows:
name: ${{ matrix.build.runner }} ${{ matrix.build.buildsystem }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
build:
[
# { runner: windows-2022, buildsystem: meson }, Disable this because I cannot get this shit to work
{ runner: windows-2022, buildsystem: cmake },
]
runs-on: ${{ matrix.build.runner }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- if: ${{ matrix.build.buildsystem == 'cmake' }}
name: Build & Test
run: |
$PSNativeCommandArgumentPassing = 'Legacy'
cmake -S . -B build -DDIRE_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE='Debug'
cmake --build build --parallel 16
.\build\src\test\Debug\dire_test
- if: ${{ matrix.build.buildsystem == 'meson' }}
name: Build & Test
run: |
pip install meson ninja
choco install just --version 1.23.0
choco install meson --version 1.2.0
just -d . -f .\ci\Justfile build-and-test-windows