-
Notifications
You must be signed in to change notification settings - Fork 7
74 lines (59 loc) · 1.88 KB
/
cmake.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
name: CMake
on: [push]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
XCL_VERSION: 1.5.1
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- name: "Windows: Configure environment"
if: runner.os == 'Windows'
shell: bash
run: |
choco install winflexbison
# Select MinGW toolchain instead of the default MSVC.
echo "CMAKE_GENERATOR=MinGW Makefiles" >> $GITHUB_ENV
- name: "Linux: Install dependency libraries"
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends build-essential cmake git freeglut3-dev libudev-dev libopenal-dev libspeechd-dev
- name: Configure CMake
working-directory: ${{github.workspace}}/src
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
working-directory: ${{github.workspace}}/src
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
- uses: actions/upload-artifact@v3
with:
name: binaries
path: ${{github.workspace}}/build/*.xpl
if-no-files-found: error
package:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: binaries
path: Xchecklist/64
- uses: actions/upload-artifact@v3
with:
name: Xchecklist_v${{env.XCL_VERSION}}
path: |
${{github.workspace}}/Xchecklist*
if-no-files-found: error