Fix CI to make actual release builds on Windows

CMAKE_BUILD_TYPE only applies on single-configuration generators: https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html

For multi-configuration generators like Visual Studio (or Xcode) --config needs to be used in order to build that specific configuration.
This commit is contained in:
Saúl Ibarra Corretgé 2024-04-06 20:38:22 +02:00
parent fd99929f5d
commit 51608ce6d2

View file

@ -344,23 +344,23 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: build - name: build
run: | run: |
cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -G "Visual Studio 17 2022" cmake -B build -G "Visual Studio 17 2022"
cmake --build build --target qjs_exe cmake --build build --config ${{matrix.buildType}} --target qjs_exe
cmake --build build --target function_source cmake --build build --config ${{matrix.buildType}} --target function_source
- name: stats - name: stats
run: | run: |
build\Debug\qjs.exe -qd build\${{matrix.buildType}}\qjs.exe -qd
- name: test - name: test
run: | run: |
build\Debug\qjs.exe tests\test_bigint.js build\${{matrix.buildType}}\qjs.exe tests\test_bigint.js
build\Debug\qjs.exe tests\test_closure.js build\${{matrix.buildType}}\qjs.exe tests\test_closure.js
build\Debug\qjs.exe tests\test_language.js build\${{matrix.buildType}}\qjs.exe tests\test_language.js
build\Debug\qjs.exe tests\test_builtin.js build\${{matrix.buildType}}\qjs.exe tests\test_builtin.js
build\Debug\qjs.exe tests\test_loop.js build\${{matrix.buildType}}\qjs.exe tests\test_loop.js
build\Debug\qjs.exe tests\test_std.js build\${{matrix.buildType}}\qjs.exe tests\test_std.js
build\Debug\qjs.exe tests\test_worker.js build\${{matrix.buildType}}\qjs.exe tests\test_worker.js
build\Debug\qjs.exe tests\test_queue_microtask.js build\${{matrix.buildType}}\qjs.exe tests\test_queue_microtask.js
build\Debug\function_source.exe build\${{matrix.buildType}}\function_source.exe
windows-clang: windows-clang:
runs-on: windows-latest runs-on: windows-latest
@ -372,23 +372,23 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: build - name: build
run: | run: |
cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -G "Visual Studio 17 2022" -T ClangCL cmake -B build -G "Visual Studio 17 2022" -T ClangCL
cmake --build build --target qjs_exe cmake --build build --config ${{matrix.buildType}} --target qjs_exe
cmake --build build --target function_source cmake --build build --config ${{matrix.buildType}} --target function_source
- name: stats - name: stats
run: | run: |
cmd /r build\Debug\qjs.exe -qd cmd /r build\${{matrix.buildType}}\qjs.exe -qd
- name: test - name: test
run: | run: |
cmd /r build\Debug\qjs.exe tests\test_bigint.js cmd /r build\${{matrix.buildType}}\qjs.exe tests\test_bigint.js
cmd /r build\Debug\qjs.exe tests\test_closure.js cmd /r build\${{matrix.buildType}}\qjs.exe tests\test_closure.js
cmd /r build\Debug\qjs.exe tests\test_language.js cmd /r build\${{matrix.buildType}}\qjs.exe tests\test_language.js
cmd /r build\Debug\qjs.exe tests\test_builtin.js cmd /r build\${{matrix.buildType}}\qjs.exe tests\test_builtin.js
cmd /r build\Debug\qjs.exe tests\test_loop.js cmd /r build\${{matrix.buildType}}\qjs.exe tests\test_loop.js
cmd /r build\Debug\qjs.exe tests\test_std.js cmd /r build\${{matrix.buildType}}\qjs.exe tests\test_std.js
cmd /r build\Debug\qjs.exe tests\test_worker.js cmd /r build\${{matrix.buildType}}\qjs.exe tests\test_worker.js
cmd /r build\Debug\qjs.exe tests\test_queue_microtask.js cmd /r build\${{matrix.buildType}}\qjs.exe tests\test_queue_microtask.js
cmd /r build\Debug\function_source.exe cmd /r build\${{matrix.buildType}}\function_source.exe
windows-mingw: windows-mingw:
runs-on: windows-latest runs-on: windows-latest