|
1 | 1 | name: Build Aeolus plugin |
2 | 2 |
|
| 3 | +defaults: |
| 4 | + run: |
| 5 | + shell: bash |
| 6 | + |
3 | 7 | on: |
4 | 8 | workflow_dispatch: |
5 | 9 | pull_request: |
|
11 | 15 | paths-ignore: |
12 | 16 | - 'docs/**' |
13 | 17 |
|
| 18 | +env: |
| 19 | + type: Release |
| 20 | + dir_build: ./build |
| 21 | + dir_source: . |
| 22 | + |
14 | 23 | jobs: |
15 | 24 | build: |
16 | | - name: ${{ matrix.config.name }} |
17 | | - runs-on: ${{ matrix.config.os }} |
| 25 | + name: All platforms |
| 26 | + runs-on: ${{ matrix.os }} |
18 | 27 | strategy: |
19 | | - fail-fast: true |
20 | 28 | 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 |
32 | 43 |
|
33 | 44 | 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 |
35 | 58 | uses: actions/checkout@v2 |
36 | 59 | with: |
37 | 60 | submodules: recursive |
38 | 61 |
|
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 |
45 | 63 | 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 }}" |
47 | 70 |
|
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 |
57 | 73 |
|
58 | | - - name: Compile Linux |
59 | | - if: matrix.config.os == 'ubuntu-latest' |
| 74 | + - name: List files generated |
60 | 75 | 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