Debian Codegraph @

.github/workflows/cmake-build.yml

raw
1 name: AdPlug CMake CI
2
3 on: [ push, pull_request, workflow_dispatch ]
4
5 env:
6 libbinio_PRESET: default
7 libbinio_ROOT: '${{github.workspace}}/libbinio/out/install/default/lib/cmake/libbinio/'
8
9 jobs:
10 build:
11 strategy:
12 fail-fast: false
13 matrix:
14 os: [ 'windows-latest', 'ubuntu-latest', 'macos-latest' ]
15
16 runs-on: ${{matrix.os}}
17
18 steps:
19 - name: Find libbinio repository
20 shell: bash
21 run: echo LIBBINIO_REPOSITORY="${GITHUB_REPOSITORY%/adplug}/libbinio" >> $GITHUB_ENV
22
23 - name: Get cmake and ninja
24 uses: lukka/get-cmake@latest
25
26 - name: Find MSVC (on Windows)
27 uses: ilammy/msvc-dev-cmd@v1
28
29 - name: Checkout libbinio repository
30 uses: actions/checkout@v3
31 with:
32 repository: '${{env.LIBBINIO_REPOSITORY}}'
33 ref: master
34 path: libbinio
35 fetch-depth: 0
36
37 - name: Checkout adplug repository
38 uses: actions/checkout@v3
39 with:
40 path: adplug
41 fetch-depth: 0
42
43 - name: Build libbinio
44 uses: lukka/run-cmake@v10
45 env:
46 VCPKG_ROOT:
47 # workaround for https://github.com/lukka/run-cmake/issues/142
48 with:
49 cmakeListsTxtPath: libbinio/CMakeLists.txt
50 configurePreset: '${{env.libbinio_PRESET}}'
51 buildPreset: '${{env.libbinio_PRESET}}'
52
53 - name: Install libbinio
54 working-directory: 'libbinio/out/build/${{env.libbinio_PRESET}}/'
55 run: cmake --install .
56
57 - name: Build adplug
58 uses: lukka/run-cmake@v10
59 env:
60 VCPKG_ROOT:
61 # workaround for https://github.com/lukka/run-cmake/issues/142
62 with:
63 cmakeListsTxtPath: adplug/CMakeLists.txt
64 configurePreset: default
65 buildPreset: default
66 testPreset: default