@@ -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