Skip to content

Commit 52a67bc

Browse files
authored
Merge pull request #13 from kmturley/feature/ci-workflows
Cross-platform CI pipeline
2 parents 1035a21 + 7ad7fa4 commit 52a67bc

File tree

1 file changed

+55
-37
lines changed

1 file changed

+55
-37
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Build Aeolus plugin
22

3+
defaults:
4+
run:
5+
shell: bash
6+
37
on:
48
workflow_dispatch:
59
pull_request:
@@ -11,54 +15,68 @@ on:
1115
paths-ignore:
1216
- 'docs/**'
1317

18+
env:
19+
type: Release
20+
dir_build: ./build
21+
dir_source: .
22+
1423
jobs:
1524
build:
16-
name: ${{ matrix.config.name }}
17-
runs-on: ${{ matrix.config.os }}
25+
name: All platforms
26+
runs-on: ${{ matrix.os }}
1827
strategy:
19-
fail-fast: true
2028
matrix:
21-
config:
22-
- {
23-
name: "Windows Latest",
24-
os: windows-latest,
25-
build_type: Release
26-
}
27-
- {
28-
name: "Ubuntu Latest",
29-
os: ubuntu-latest,
30-
build_type: Release
31-
}
29+
os: [ubuntu-latest, macos-latest, windows-2019]
30+
include:
31+
- os: ubuntu-latest
32+
name: linux
33+
generator: Unix Makefiles
34+
path: ./build/Aeolus_artefacts
35+
- os: macos-latest
36+
name: mac
37+
generator: Unix Makefiles
38+
path: ./build/Aeolus_artefacts
39+
- os: windows-2019
40+
name: win
41+
generator: Visual Studio 16 2019
42+
path: ./build/Aeolus_artefacts/Release
3243

3344
steps:
34-
- name: Checkout
45+
- name: Install Linux dependencies
46+
if: matrix.os == 'ubuntu-latest'
47+
run: sudo apt-get update && sudo apt-get install ninja-build libx11-dev libfreetype-dev libasound2-dev libxrandr-dev libxinerama-dev libxcursor-dev
48+
49+
- name: Install macOS dependencies
50+
if: matrix.os == 'macos-latest'
51+
run: brew install ninja
52+
53+
- name: Install Windows dependencies
54+
if: matrix.os == 'windows-2019'
55+
run: choco install ninja
56+
57+
- name: Checkout code
3558
uses: actions/checkout@v2
3659
with:
3760
submodules: recursive
3861

39-
- name: Install Ninja
40-
if: matrix.config.os == 'windows-latest'
41-
uses: seanmiddleditch/gha-setup-ninja@master
42-
43-
- name: Install Linux dependencies
44-
if: matrix.config.os == 'ubuntu-latest'
62+
- name: Build plugin
4563
run: |
46-
sudo apt-get install libx11-dev libfreetype-dev libasound2-dev libxrandr-dev libxinerama-dev libxcursor-dev
64+
cmake \
65+
-G "${{ matrix.generator }}" \
66+
-DWITH_ASIO=OFF \
67+
-S "${{ env.dir_source }}" \
68+
-B "${{ env.dir_build }}"
69+
cmake --build "${{ env.dir_build }}" --config "${{ env.type }}"
4770
48-
- name: Compile Windows
49-
if: matrix.config.os == 'windows-latest'
50-
shell: cmd
51-
run: |
52-
mkdir build
53-
cd build
54-
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
55-
cmake ../ -G Ninja -D WITH_ASIO=OFF -D CMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
56-
cmake --build .
71+
- name: List errors
72+
run: cat "${{ env.dir_build }}/CMakeFiles/CMakeError.log" || true
5773

58-
- name: Compile Linux
59-
if: matrix.config.os == 'ubuntu-latest'
74+
- name: List files generated
6075
run: |
61-
mkdir -p build
62-
cd build
63-
cmake ../ -D WITH_ASIO=OFF -D CMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
64-
cmake --build .
76+
cd ${{ matrix.path }}
77+
find "$(pwd)"
78+
79+
- uses: actions/upload-artifact@v3
80+
with:
81+
name: aeolus-${{ matrix.name }}
82+
path: ${{ matrix.path }}

0 commit comments

Comments
 (0)