-
-
Notifications
You must be signed in to change notification settings - Fork 51
81 lines (73 loc) · 1.84 KB
/
build_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
75
76
77
78
79
80
81
name: Build
on:
push:
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows",
os: windows-latest,
cmakeflags: "-DLIBREMIDI_EXAMPLES=1"
}
- {
name: "Ubuntu",
os: ubuntu-latest,
cmakeflags: "-DLIBREMIDI_EXAMPLES=1"
}
- {
name: 'Tarball',
os: ubuntu-latest,
cmakeflags: ""
}
- {
name: "macOS",
os: macos-latest,
cmakeflags: "-DLIBREMIDI_EXAMPLES=1"
}
steps:
- uses: actions/checkout@v2
- name: Get latest release version number
id: get_version
uses: battila7/get-version-action@v2
- name: Install dependencies
if: matrix.config.name != 'Tarball'
run: |
git submodule update --init --recursive
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt update
sudo apt install cmake ninja-build libboost-dev libasound-dev
elif [ "$RUNNER_OS" == "Windows" ]; then
echo "nothing to do"
# maybe choco install ninja
else
brew install ninja boost
fi
shell: bash
- name: Configure
if: matrix.config.name != 'Tarball'
env:
CMAKEFLAGS: ${{ matrix.config.cmakeflags }}
run: |
mkdir build && cd build
cmake $CMAKEFLAGS ..
shell: bash
- name: Build
if: matrix.config.name != 'Tarball'
run: cd build && cmake --build .
- name: Test
if: matrix.config.name != 'Tarball'
run: |
cd build && ctest -V
shell: bash