-
Notifications
You must be signed in to change notification settings - Fork 654
44 lines (36 loc) · 1.45 KB
/
v2.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
name: Build and Test v2
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: "Build ${{ matrix.platform }} in ${{ matrix.build_type }}"
strategy:
matrix:
platform: [windows, ubuntu, macos]
build_type: [Debug, Release]
env:
PARALLEL: -j 2
runs-on: "${{ matrix.platform }}-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- if: ${{ matrix.platform == 'ubuntu' }}
name: Install RandR headers
run: |
sudo apt-get update
sudo apt install xorg-dev libglu1-mesa-dev
- name: Configure
run: cmake -B"build/${{ matrix.platform }}" -DVKB_BUILD_TESTS=ON
- name: "Build Components ${{ matrix.platform }} in ${{ matrix.build_type }}"
run: cmake --build "build/${{ matrix.platform }}" --target vkb__components --config ${{ matrix.build_type }} ${{ env.PARALLEL }}
- name: "Build Tests ${{ matrix.platform }} in ${{ matrix.build_type }}"
run: cmake --build "build/${{ matrix.platform }}" --target vkb__tests --config ${{ matrix.build_type }} ${{ env.PARALLEL }}
- name: "Run Tests ${{ matrix.platform }} in ${{ matrix.build_type }}"
run: ctest -C ${{ matrix.build_type }} --test-dir "build/${{ matrix.platform }}" --output-on-failure