-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.57 KB
/
build.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
name: build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
fail-fast: true
matrix:
os: [ ubuntu, macos, windows ]
build_type: [ Debug ]
arch: [ x86_64, arm64 ]
exclude:
- os: ubuntu
arch: arm64
- os: windows
arch: arm64
runs-on: ${{ matrix.os }}-latest
env:
CMAKE_CONFIG_PROJECT: -DPICROSS_BUILD_CLI=ON -DPICROSS_BUILD_TESTS=ON -DPICROSS_BUILD_EXAMPLES=ON
CMAKE_CONFIG_EXTRA: ${{ matrix.os == 'macos' && format('-DCMAKE_OSX_ARCHITECTURES={0}', matrix.arch) || '' }}
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ env.CMAKE_CONFIG_PROJECT }} ${{ env.CMAKE_CONFIG_EXTRA }}
- name: Build
working-directory: ${{ github.workspace }}/build
run: cmake --build . --config ${{ matrix.build_type }}
- if: matrix.arch == 'x86_64'
name: Version
working-directory: ${{ github.workspace }}/build
run: cmake --build . --target picross_cli_version --config ${{ matrix.build_type }}
- if: matrix.arch == 'x86_64'
name: Test stdutils
working-directory: ${{ github.workspace }}/build
run: cmake --build . --target run_utests_stdutils --config ${{ matrix.build_type }}
- if: matrix.arch == 'x86_64'
name: Test picross
working-directory: ${{ github.workspace }}/build
run: cmake --build . --target run_utests_picross --config ${{ matrix.build_type }}