3762: Work around CMake 3.20.0 bug, fix packaging on CI r=def- a=heinrich5991

CMake 3.20.0 ignores the next CLI parameter after --parallel. Fix that by
moving it to the end of the command line.

https://gitlab.kitware.com/cmake/cmake/-/issues/21966
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5936

It is meant to be fixed in CMake 3.20.1.

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
This commit is contained in:
bors[bot] 2021-04-07 16:19:11 +00:00 committed by GitHub
commit 30f399791d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,11 +80,11 @@ jobs:
cd debug
${{ matrix.cmake-path }}cmake --version
${{ matrix.cmake-path }}cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=Debug -Werror=dev -DDOWNLOAD_GTEST=ON -DDEV=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=. ..
${{ matrix.cmake-path }}cmake --build . --config Debug ${{ matrix.build-args }} --target everything
${{ matrix.cmake-path }}cmake --build . --config Debug --target everything ${{ matrix.build-args }}
- name: Test debug
run: |
cd debug
${{ matrix.cmake-path }}cmake --build . --config Debug ${{ matrix.build-args }} --target run_tests
${{ matrix.cmake-path }}cmake --build . --config Debug --target run_tests ${{ matrix.build-args }}
./DDNet-Server shutdown
- name: Build in release mode
@ -93,11 +93,11 @@ jobs:
mkdir release
cd release
${{ matrix.cmake-path }}cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=Release -Werror=dev -DDOWNLOAD_GTEST=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. ..
${{ matrix.cmake-path }}cmake --build . --config Release ${{ matrix.build-args }} --target everything
${{ matrix.cmake-path }}cmake --build . --config Release --target everything ${{ matrix.build-args }}
- name: Test release
run: |
cd release
${{ matrix.cmake-path }}cmake --build . --config Release ${{ matrix.build-args }} --target run_tests
${{ matrix.cmake-path }}cmake --build . --config Release --target run_tests ${{ matrix.build-args }}
./DDNet-Server shutdown
- name: Build in release mode with debug info and all features on
@ -107,18 +107,18 @@ jobs:
mkdir fancy
cd fancy
${{ matrix.cmake-path }}cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DANTIBOT=ON -DMYSQL=ON -DWEBSOCKETS=ON ..
${{ matrix.cmake-path }}cmake --build . --config RelWithDebInfo ${{ matrix.build-args }} --target everything
${{ matrix.cmake-path }}cmake --build . --config RelWithDebInfo --target everything ${{ matrix.build-args }}
- name: Test fancy
if: matrix.fancy
run: |
cd release
${{ matrix.cmake-path }}cmake --build . --config RelWithDebInfo ${{ matrix.build-args }} --target run_tests
${{ matrix.cmake-path }}cmake --build . --config RelWithDebInfo --target run_tests ${{ matrix.build-args }}
./DDNet-Server shutdown
- name: Package
run: |
cd release
${{ matrix.cmake-path }}cmake --build . --config Release ${{ matrix.build-args }} --target package_default
${{ matrix.cmake-path }}cmake --build . --config Release --target package_default ${{ matrix.build-args }}
mkdir artifacts
mv ${{ matrix.package-file }} artifacts