-
Notifications
You must be signed in to change notification settings - Fork 41
61 lines (50 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
53
54
55
56
57
58
59
60
61
name: betacraft-build
on:
push:
branches: [ "v2" ]
pull_request:
branches: [ "v2" ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- uses: lukka/get-cmake@latest
- name: Setup vcpkg (it does not install any package yet)
uses: lukka/[email protected]
with:
vcpkgDirectory: '${{github.workspace}}/lib/vcpkg'
- if: ${{ (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-latest') }}
name: Install Qt (ubuntu-latest || macos-latest)
uses: jurplel/install-qt-action@v3
with:
version: '6.5.1'
cache: 'true'
cache-key-prefix: 'install-qt-action'
set-env: 'true'
- if: matrix.os == 'windows-latest'
name: Install Qt (windows-latest)
uses: jurplel/install-qt-action@v3
with:
version: '6.5.1'
cache: 'true'
cache-key-prefix: 'install-qt-action'
set-env: 'true'
arch: 'win64_mingw'
- name: Run CMake consuming CMakePresets.json and vcpkg.json by mean of vcpkg.
uses: lukka/run-cmake@v10
with:
configurePreset: 'betacraft'
buildPreset: 'betacraft'
buildPresetAdditionalArgs: "['--config Release']"
- name: Test
working-directory: ${{github.workspace}}/build/betacraft
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure