Skip to content

Commit fe7bf57

Browse files
authored
Merge branch 'main' into dev/more_tests
2 parents 2572028 + a3abfa2 commit fe7bf57

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+887
-539
lines changed

.github/workflows/build_android.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,14 @@ jobs:
5050
with:
5151
ndk-version: ${{env.NDK_VERSION}}
5252

53-
- name: Create Build Environment
54-
run: cmake -E make_directory ${{runner.workspace}}/build
55-
5653
- name: Configure
57-
working-directory: ${{runner.workspace}}/build
58-
run: cmake $GITHUB_WORKSPACE -G "Ninja Multi-Config" -DYUP_TARGET_ANDROID=ON -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON
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
5955

6056
- name: Cache Configure
6157
id: cache-build
6258
uses: actions/cache/save@v4
6359
with:
64-
path: ${{runner.workspace}}/build
60+
path: ${{ runner.workspace }}/build
6561
key: android-build-${{ github.sha }}
6662

6763
build_app:
@@ -82,15 +78,18 @@ jobs:
8278
with:
8379
ndk-version: ${{env.NDK_VERSION}}
8480
- uses: actions/cache/restore@v4
81+
id: cache-restore
8582
with:
86-
path: ${{runner.workspace}}/build
83+
path: ${{ runner.workspace }}/build
8784
key: android-build-${{ github.sha }}
88-
- working-directory: ${{runner.workspace}}/build/examples/app
85+
- name: Configure If Cache Missed
86+
if: steps.cache-restore.outputs.cache-hit != 'true'
87+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_TARGET_ANDROID=ON -DYUP_ENABLE_EXAMPLES=ON
88+
- working-directory: ${{ runner.workspace }}/build/examples/app
8989
run: ./gradlew assembleDebug
90-
- working-directory: ${{runner.workspace}}/build/examples/app
90+
- working-directory: ${{ runner.workspace }}/build/examples/app
9191
run: ./gradlew assemble
9292

93-
9493
build_graphics:
9594
runs-on: ubuntu-latest
9695
needs: [configure]
@@ -109,12 +108,16 @@ jobs:
109108
with:
110109
ndk-version: ${{env.NDK_VERSION}}
111110
- uses: actions/cache/restore@v4
111+
id: cache-restore
112112
with:
113-
path: ${{runner.workspace}}/build
113+
path: ${{ runner.workspace }}/build
114114
key: android-build-${{ github.sha }}
115-
- working-directory: ${{runner.workspace}}/build/examples/graphics
115+
- name: Configure If Cache Missed
116+
if: steps.cache-restore.outputs.cache-hit != 'true'
117+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_TARGET_ANDROID=ON -DYUP_ENABLE_EXAMPLES=ON
118+
- working-directory: ${{ runner.workspace }}/build/examples/graphics
116119
run: ./gradlew assembleDebug
117-
- working-directory: ${{runner.workspace}}/build/examples/graphics
120+
- working-directory: ${{ runner.workspace }}/build/examples/graphics
118121
run: ./gradlew assemble
119122

120123
build_render:
@@ -135,10 +138,14 @@ jobs:
135138
with:
136139
ndk-version: r26d
137140
- uses: actions/cache/restore@v4
141+
id: cache-restore
138142
with:
139-
path: ${{runner.workspace}}/build
143+
path: ${{ runner.workspace }}/build
140144
key: android-build-${{ github.sha }}
141-
- working-directory: ${{runner.workspace}}/build/examples/render
145+
- name: Configure If Cache Missed
146+
if: steps.cache-restore.outputs.cache-hit != 'true'
147+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_TARGET_ANDROID=ON -DYUP_ENABLE_EXAMPLES=ON
148+
- working-directory: ${{ runner.workspace }}/build/examples/render
142149
run: ./gradlew assembleDebug
143-
- working-directory: ${{runner.workspace}}/build/examples/render
150+
- working-directory: ${{ runner.workspace }}/build/examples/render
144151
run: ./gradlew assemble

.github/workflows/build_ios.yml

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,21 @@ jobs:
3434
- uses: actions/checkout@v4
3535
- uses: seanmiddleditch/gha-setup-ninja@master
3636

37-
- name: Create Build Environment
38-
run: cmake -E make_directory ${{runner.workspace}}/build
39-
4037
- name: Configure
41-
working-directory: ${{runner.workspace}}/build
4238
run: |
4339
cmake ${{ github.workspace }} -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/ios.cmake \
44-
-DPLATFORM=${{ env.IOS_PLATFORM }} -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON
40+
-DPLATFORM=${{ env.IOS_PLATFORM }} -B ${{ runner.workspace }}/build -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON
4541
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
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
5046
5147
- name: Cache Configure
5248
id: cache-build
5349
uses: actions/cache/save@v4
5450
with:
55-
path: ${{runner.workspace}}/build
51+
path: ${{ github.workspace }}/build
5652
key: ios-build-${{ github.sha }}
5753

5854
build_console:
@@ -62,11 +58,17 @@ jobs:
6258
- uses: actions/checkout@v4
6359
- uses: seanmiddleditch/gha-setup-ninja@master
6460
- uses: actions/cache/restore@v4
61+
id: cache-restore
6562
with:
66-
path: ${{runner.workspace}}/build
63+
path: ${{ runner.workspace }}/build
6764
key: ios-build-${{ github.sha }}
68-
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_console
69-
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_console
65+
- name: Configure If Cache Missed
66+
if: steps.cache-restore.outputs.cache-hit != 'true'
67+
run: |
68+
cmake ${{ github.workspace }} -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/ios.cmake \
69+
-DPLATFORM=${{ env.IOS_PLATFORM }} -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
70+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_console
71+
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_console
7072

7173
build_app:
7274
runs-on: macos-latest
@@ -75,11 +77,17 @@ jobs:
7577
- uses: actions/checkout@v4
7678
- uses: seanmiddleditch/gha-setup-ninja@master
7779
- uses: actions/cache/restore@v4
80+
id: cache-restore
7881
with:
79-
path: ${{runner.workspace}}/build
82+
path: ${{ runner.workspace }}/build
8083
key: ios-build-${{ github.sha }}
81-
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_app
82-
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_app
84+
- name: Configure If Cache Missed
85+
if: steps.cache-restore.outputs.cache-hit != 'true'
86+
run: |
87+
cmake ${{ github.workspace }} -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/ios.cmake \
88+
-DPLATFORM=${{ env.IOS_PLATFORM }} -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
89+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_app
90+
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_app
8391

8492
build_graphics:
8593
runs-on: macos-latest
@@ -88,11 +96,17 @@ jobs:
8896
- uses: actions/checkout@v4
8997
- uses: seanmiddleditch/gha-setup-ninja@master
9098
- uses: actions/cache/restore@v4
99+
id: cache-restore
91100
with:
92-
path: ${{runner.workspace}}/build
101+
path: ${{ runner.workspace }}/build
93102
key: ios-build-${{ github.sha }}
94-
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_graphics
95-
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_graphics
103+
- name: Configure If Cache Missed
104+
if: steps.cache-restore.outputs.cache-hit != 'true'
105+
run: |
106+
cmake ${{ github.workspace }} -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/ios.cmake \
107+
-DPLATFORM=${{ env.IOS_PLATFORM }} -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
108+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_graphics
109+
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_graphics
96110

97111
build_render:
98112
runs-on: macos-latest
@@ -101,8 +115,14 @@ jobs:
101115
- uses: actions/checkout@v4
102116
- uses: seanmiddleditch/gha-setup-ninja@master
103117
- uses: actions/cache/restore@v4
118+
id: cache-restore
104119
with:
105-
path: ${{runner.workspace}}/build
120+
path: ${{ runner.workspace }}/build
106121
key: ios-build-${{ github.sha }}
107-
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_render
108-
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_render
122+
- name: Configure If Cache Missed
123+
if: steps.cache-restore.outputs.cache-hit != 'true'
124+
run: |
125+
cmake ${{ github.workspace }} -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/ios.cmake \
126+
-DPLATFORM=${{ env.IOS_PLATFORM }} -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
127+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_render
128+
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_render

.github/workflows/build_linux.yml

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,19 @@ jobs:
4040
- name: Install Dependencies
4141
run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS}
4242

43-
- name: Create Build Environment
44-
run: cmake -E make_directory ${{runner.workspace}}/build
45-
4643
- name: Configure
47-
working-directory: ${{runner.workspace}}/build
48-
run: cmake $GITHUB_WORKSPACE -G "Ninja Multi-Config" -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON
44+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON
4945

5046
- name: Build SDL2
5147
run: |
52-
cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target SDL2-static
53-
cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target SDL2-static
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
5450
5551
- name: Cache Configure
5652
id: cache-build
5753
uses: actions/cache/save@v4
5854
with:
59-
path: ${{runner.workspace}}/build
55+
path: ${{ runner.workspace }}/build
6056
key: linux-build-${{ github.sha }}
6157

6258
build_tests:
@@ -67,14 +63,18 @@ jobs:
6763
- uses: seanmiddleditch/gha-setup-ninja@master
6864
- run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS}
6965
- uses: actions/cache/restore@v4
66+
id: cache-restore
7067
with:
71-
path: ${{runner.workspace}}/build
68+
path: ${{ runner.workspace }}/build
7269
key: linux-build-${{ github.sha }}
73-
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target yup_tests
74-
- working-directory: ${{runner.workspace}}/build/tests/Debug
70+
- name: Configure If Cache Missed
71+
if: steps.cache-restore.outputs.cache-hit != 'true'
72+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_TESTS=ON
73+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target yup_tests
74+
- working-directory: ${{ runner.workspace }}/build/tests/Debug
7575
run: ./yup_tests
76-
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target yup_tests
77-
- working-directory: ${{runner.workspace}}/build/tests/Release
76+
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target yup_tests
77+
- working-directory: ${{ runner.workspace }}/build/tests/Release
7878
run: ./yup_tests
7979

8080
build_console:
@@ -85,11 +85,15 @@ jobs:
8585
- uses: seanmiddleditch/gha-setup-ninja@master
8686
- run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS}
8787
- uses: actions/cache/restore@v4
88+
id: cache-restore
8889
with:
89-
path: ${{runner.workspace}}/build
90+
path: ${{ runner.workspace }}/build
9091
key: linux-build-${{ github.sha }}
91-
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_console
92-
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_console
92+
- name: Configure If Cache Missed
93+
if: steps.cache-restore.outputs.cache-hit != 'true'
94+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
95+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_console
96+
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_console
9397

9498
build_app:
9599
runs-on: ubuntu-latest
@@ -99,11 +103,15 @@ jobs:
99103
- uses: seanmiddleditch/gha-setup-ninja@master
100104
- run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS}
101105
- uses: actions/cache/restore@v4
106+
id: cache-restore
102107
with:
103-
path: ${{runner.workspace}}/build
108+
path: ${{ runner.workspace }}/build
104109
key: linux-build-${{ github.sha }}
105-
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_app
106-
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_app
110+
- name: Configure If Cache Missed
111+
if: steps.cache-restore.outputs.cache-hit != 'true'
112+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
113+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_app
114+
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_app
107115

108116
build_graphics:
109117
runs-on: ubuntu-latest
@@ -113,11 +121,15 @@ jobs:
113121
- uses: seanmiddleditch/gha-setup-ninja@master
114122
- run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS}
115123
- uses: actions/cache/restore@v4
124+
id: cache-restore
116125
with:
117-
path: ${{runner.workspace}}/build
126+
path: ${{ runner.workspace }}/build
118127
key: linux-build-${{ github.sha }}
119-
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_graphics
120-
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_graphics
128+
- name: Configure If Cache Missed
129+
if: steps.cache-restore.outputs.cache-hit != 'true'
130+
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
121133

122134
build_render:
123135
runs-on: ubuntu-latest
@@ -127,11 +139,15 @@ jobs:
127139
- uses: seanmiddleditch/gha-setup-ninja@master
128140
- run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS}
129141
- uses: actions/cache/restore@v4
142+
id: cache-restore
130143
with:
131-
path: ${{runner.workspace}}/build
144+
path: ${{ runner.workspace }}/build
132145
key: linux-build-${{ github.sha }}
133-
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_render
134-
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_render
146+
- name: Configure If Cache Missed
147+
if: steps.cache-restore.outputs.cache-hit != 'true'
148+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
149+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_render
150+
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_render
135151

136152
build_plugin:
137153
runs-on: ubuntu-latest
@@ -141,12 +157,16 @@ jobs:
141157
- uses: seanmiddleditch/gha-setup-ninja@master
142158
- run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS}
143159
- uses: actions/cache/restore@v4
160+
id: cache-restore
144161
with:
145-
path: ${{runner.workspace}}/build
162+
path: ${{ runner.workspace }}/build
146163
key: linux-build-${{ github.sha }}
147-
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_plugin_clap_plugin
148-
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_plugin_clap_plugin
149-
#- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_plugin_vst3_plugin
150-
#- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_plugin_vst3_plugin
151-
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_plugin_standalone_plugin
152-
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_plugin_standalone_plugin
164+
- name: Configure If Cache Missed
165+
if: steps.cache-restore.outputs.cache-hit != 'true'
166+
run: cmake ${{ github.workspace }} -G "Ninja Multi-Config" -B ${{ runner.workspace }}/build -DYUP_ENABLE_EXAMPLES=ON
167+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_plugin_clap_plugin
168+
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_plugin_clap_plugin
169+
#- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_plugin_vst3_plugin
170+
#- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_plugin_vst3_plugin
171+
- run: cmake --build ${{ runner.workspace }}/build --config Debug --parallel 4 --target example_plugin_standalone_plugin
172+
- run: cmake --build ${{ runner.workspace }}/build --config Release --parallel 4 --target example_plugin_standalone_plugin

0 commit comments

Comments
 (0)