Skip to content

Commit 673e5b0

Browse files
authored
Improve CI (#81)
1 parent 42913b0 commit 673e5b0

40 files changed

+3136
-377
lines changed

.github/workflows/build_android.yml

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,30 @@ env:
3434
jobs:
3535
configure:
3636
runs-on: ubuntu-latest
37-
3837
steps:
39-
- uses: actions/checkout@v4
40-
with:
41-
fetch-depth: 0
42-
- uses: seanmiddleditch/gha-setup-ninja@master
43-
- name: Setup Java
44-
uses: actions/setup-java@v3
45-
with:
46-
distribution: ${{env.JAVA_DISTRIBUTION}}
47-
java-version: ${{env.JAVA_VERSION}}
48-
- name: Setup Android SDK
49-
uses: android-actions/[email protected]
50-
- name: Setup Android NDK
51-
uses: nttld/setup-ndk@v1
52-
with:
53-
ndk-version: ${{env.NDK_VERSION}}
54-
55-
- name: Configure
56-
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_TARGET_ANDROID=ON -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON
57-
58-
- name: Cache Configure
59-
id: cache-build
60-
uses: actions/cache/save@v4
61-
with:
62-
path: ${{ runner.workspace }}/build
63-
key: android-build-${{ github.sha }}
38+
- uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 0
41+
- uses: seanmiddleditch/gha-setup-ninja@master
42+
- name: Setup Java
43+
uses: actions/setup-java@v3
44+
with:
45+
distribution: ${{env.JAVA_DISTRIBUTION}}
46+
java-version: ${{env.JAVA_VERSION}}
47+
- name: Setup Android SDK
48+
uses: android-actions/[email protected]
49+
- name: Setup Android NDK
50+
uses: nttld/setup-ndk@v1
51+
with:
52+
ndk-version: ${{env.NDK_VERSION}}
53+
- name: Configure
54+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_TARGET_ANDROID=ON -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON
55+
- name: Cache Configure
56+
id: cache-build
57+
uses: actions/cache/save@v4
58+
with:
59+
path: ${{ runner.workspace }}/build
60+
key: android-build-${{ github.sha }}
6461

6562
build_app:
6663
runs-on: ubuntu-latest

.github/workflows/build_ios.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,19 @@ env:
3030
jobs:
3131
configure:
3232
runs-on: macos-latest
33-
3433
steps:
3534
- uses: actions/checkout@v4
3635
with:
3736
fetch-depth: 0
38-
3937
- uses: seanmiddleditch/gha-setup-ninja@master
40-
4138
- name: Configure
4239
run: |
4340
cmake ${{ github.workspace }} -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/ios.cmake \
4441
-DPLATFORM=${{ env.IOS_PLATFORM }} -B ${{ runner.workspace }}/build -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON
45-
4642
- name: Build SDL2
4743
run: |
48-
cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target SDL2-static
49-
cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target SDL2-static
50-
44+
cmake --build ${{ runner.workspace }}/build --config Debug --target SDL2-static
45+
cmake --build ${{ runner.workspace }}/build --config Release --target SDL2-static
5146
- name: Cache Configure
5247
id: cache-build
5348
uses: actions/cache/save@v4
@@ -73,8 +68,8 @@ jobs:
7368
run: |
7469
cmake ${{ github.workspace }} -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/ios.cmake \
7570
-DPLATFORM=${{ env.IOS_PLATFORM }} -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
76-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_console
77-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_console
71+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_console
72+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_console
7873

7974
build_app:
8075
runs-on: macos-latest
@@ -94,8 +89,8 @@ jobs:
9489
run: |
9590
cmake ${{ github.workspace }} -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/ios.cmake \
9691
-DPLATFORM=${{ env.IOS_PLATFORM }} -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
97-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_app
98-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_app
92+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_app
93+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_app
9994

10095
build_graphics:
10196
runs-on: macos-latest
@@ -115,5 +110,5 @@ jobs:
115110
run: |
116111
cmake ${{ github.workspace }} -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/ios.cmake \
117112
-DPLATFORM=${{ env.IOS_PLATFORM }} -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
118-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_graphics
119-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_graphics
113+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_graphics
114+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_graphics

.github/workflows/build_linux.yml

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,27 @@ env:
3636
jobs:
3737
configure:
3838
runs-on: ubuntu-latest
39-
4039
steps:
4140
- uses: actions/checkout@v4
4241
with:
4342
fetch-depth: 0
4443
- uses: seanmiddleditch/gha-setup-ninja@master
4544
- name: Install Dependencies
4645
run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS}
47-
4846
- name: Configure
4947
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON
50-
5148
- name: Build SDL2
5249
run: |
53-
cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target SDL2-static
54-
cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target SDL2-static
55-
50+
cmake --build ${{ runner.workspace }}/build --config Debug --target SDL2-static
51+
cmake --build ${{ runner.workspace }}/build --config Release --target SDL2-static
5652
- name: Cache Configure
5753
id: cache-build
5854
uses: actions/cache/save@v4
5955
with:
6056
path: ${{ runner.workspace }}/build
6157
key: linux-build-${{ github.sha }}
6258

63-
build_tests:
59+
build_tests_debug:
6460
runs-on: ubuntu-latest
6561
needs: [configure]
6662
steps:
@@ -77,10 +73,28 @@ jobs:
7773
- name: Configure If Cache Missed
7874
if: steps.cache-restore.outputs.cache-hit != 'true'
7975
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_TESTS=ON
80-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target yup_tests
76+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target yup_tests
8177
- working-directory: ${{ runner.workspace }}/build/tests/Debug
8278
run: ./yup_tests
83-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target yup_tests
79+
80+
build_tests_release:
81+
runs-on: ubuntu-latest
82+
needs: [configure]
83+
steps:
84+
- uses: actions/checkout@v4
85+
with:
86+
fetch-depth: 0
87+
- uses: seanmiddleditch/gha-setup-ninja@master
88+
- run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS}
89+
- uses: actions/cache/restore@v4
90+
id: cache-restore
91+
with:
92+
path: ${{ runner.workspace }}/build
93+
key: linux-build-${{ github.sha }}
94+
- name: Configure If Cache Missed
95+
if: steps.cache-restore.outputs.cache-hit != 'true'
96+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_TESTS=ON
97+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target yup_tests
8498
- working-directory: ${{ runner.workspace }}/build/tests/Release
8599
run: ./yup_tests
86100

@@ -101,8 +115,8 @@ jobs:
101115
- name: Configure If Cache Missed
102116
if: steps.cache-restore.outputs.cache-hit != 'true'
103117
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
104-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_console
105-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_console
118+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_console
119+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_console
106120

107121
build_app:
108122
runs-on: ubuntu-latest
@@ -121,8 +135,8 @@ jobs:
121135
- name: Configure If Cache Missed
122136
if: steps.cache-restore.outputs.cache-hit != 'true'
123137
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
124-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_app
125-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_app
138+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_app
139+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_app
126140

127141
build_graphics:
128142
runs-on: ubuntu-latest
@@ -141,8 +155,8 @@ jobs:
141155
- name: Configure If Cache Missed
142156
if: steps.cache-restore.outputs.cache-hit != 'true'
143157
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
144-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_graphics
145-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_graphics
158+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_graphics
159+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_graphics
146160

147161
build_plugin:
148162
runs-on: ubuntu-latest
@@ -161,9 +175,9 @@ jobs:
161175
- name: Configure If Cache Missed
162176
if: steps.cache-restore.outputs.cache-hit != 'true'
163177
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
164-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_plugin_clap_plugin
165-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_plugin_clap_plugin
166-
#- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_plugin_vst3_plugin
167-
#- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_plugin_vst3_plugin
168-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_plugin_standalone_plugin
169-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_plugin_standalone_plugin
178+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_plugin_clap_plugin
179+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_plugin_clap_plugin
180+
#- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_plugin_vst3_plugin
181+
#- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_plugin_vst3_plugin
182+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_plugin_standalone_plugin
183+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_plugin_standalone_plugin

.github/workflows/build_macos.yml

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,25 @@ concurrency:
2929
jobs:
3030
configure:
3131
runs-on: macos-latest
32-
3332
steps:
3433
- uses: actions/checkout@v4
3534
with:
3635
fetch-depth: 0
3736
- uses: seanmiddleditch/gha-setup-ninja@master
38-
3937
- name: Configure
4038
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON
41-
4239
- name: Build SDL2
4340
run: |
44-
cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target SDL2-static
45-
cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target SDL2-static
46-
41+
cmake --build ${{ runner.workspace }}/build --config Debug --target SDL2-static
42+
cmake --build ${{ runner.workspace }}/build --config Release --target SDL2-static
4743
- name: Cache Configure
4844
id: cache-build
4945
uses: actions/cache/save@v4
5046
with:
5147
path: ${{ runner.workspace }}/build
5248
key: macos-build-${{ github.sha }}
5349

54-
build_tests:
50+
build_tests_debug:
5551
runs-on: macos-latest
5652
needs: [configure]
5753
steps:
@@ -67,10 +63,27 @@ jobs:
6763
- name: Configure If Cache Missed
6864
if: steps.cache-restore.outputs.cache-hit != 'true'
6965
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_TESTS=ON
70-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target yup_tests
66+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target yup_tests
7167
- working-directory: ${{ runner.workspace }}/build/tests/Debug
7268
run: ./yup_tests.app/Contents/MacOS/yup_tests
73-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target yup_tests
69+
70+
build_tests_release:
71+
runs-on: macos-latest
72+
needs: [configure]
73+
steps:
74+
- uses: actions/checkout@v4
75+
with:
76+
fetch-depth: 0
77+
- uses: seanmiddleditch/gha-setup-ninja@master
78+
- uses: actions/cache/restore@v4
79+
id: cache-restore
80+
with:
81+
path: ${{ runner.workspace }}/build
82+
key: macos-build-${{ github.sha }}
83+
- name: Configure If Cache Missed
84+
if: steps.cache-restore.outputs.cache-hit != 'true'
85+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_TESTS=ON
86+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target yup_tests
7487
- working-directory: ${{ runner.workspace }}/build/tests/Release
7588
run: ./yup_tests.app/Contents/MacOS/yup_tests
7689

@@ -90,8 +103,8 @@ jobs:
90103
- name: Configure If Cache Missed
91104
if: steps.cache-restore.outputs.cache-hit != 'true'
92105
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
93-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_console
94-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_console
106+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_console
107+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_console
95108

96109
build_app:
97110
runs-on: macos-latest
@@ -109,8 +122,8 @@ jobs:
109122
- name: Configure If Cache Missed
110123
if: steps.cache-restore.outputs.cache-hit != 'true'
111124
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
112-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_app
113-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_app
125+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_app
126+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_app
114127

115128
build_graphics:
116129
runs-on: macos-latest
@@ -128,8 +141,8 @@ jobs:
128141
- name: Configure If Cache Missed
129142
if: steps.cache-restore.outputs.cache-hit != 'true'
130143
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
131-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_graphics
132-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_graphics
144+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_graphics
145+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_graphics
133146

134147
build_plugins:
135148
runs-on: macos-latest
@@ -147,9 +160,9 @@ jobs:
147160
- name: Configure If Cache Missed
148161
if: steps.cache-restore.outputs.cache-hit != 'true'
149162
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
150-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_plugin_clap_plugin
151-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_plugin_clap_plugin
152-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_plugin_vst3_plugin
153-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_plugin_vst3_plugin
154-
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_plugin_standalone_plugin
155-
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_plugin_standalone_plugin
163+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_plugin_clap_plugin
164+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_plugin_clap_plugin
165+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_plugin_vst3_plugin
166+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_plugin_vst3_plugin
167+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --target example_plugin_standalone_plugin
168+
- run: cmake --build ${{ runner.workspace }}/build --config Release --target example_plugin_standalone_plugin

0 commit comments

Comments
 (0)