From 7e74232e562a7e015589d3806be444c2c84ff70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= Date: Thu, 11 May 2023 20:07:29 +0200 Subject: [PATCH] Change: [Actions] Use -fuse-ld=lld and Ninja for MinGW (#10785) And some miscellaneous things while touching the file --- .github/workflows/ci-build.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 7892bf53d0..4b3fafd8f0 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -214,7 +214,7 @@ jobs: - name: Install OpenGFX run: | mkdir -p ~/Documents/OpenTTD/baseset - cd ~/Documents//OpenTTD/baseset + cd ~/Documents/OpenTTD/baseset echo "::group::Download OpenGFX" curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip @@ -235,7 +235,7 @@ jobs: cd build echo "::group::CMake" - cmake ${GITHUB_WORKSPACE} \ + cmake .. \ -DCMAKE_OSX_ARCHITECTURES=${{ matrix.full_arch }} \ -DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-osx \ -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \ @@ -320,6 +320,8 @@ jobs: - name: Build shell: bash + env: + NINJA_STATUS: "[%f/%t -- %e] " # [finished_edges/total_edges -- elapsed_time], default value is "[%f/%t] " run: | mkdir build cd build @@ -339,7 +341,7 @@ jobs: - name: Test shell: bash run: | - cd ${GITHUB_WORKSPACE}/build + cd build ctest --timeout 120 @@ -373,6 +375,8 @@ jobs: mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-lzo2 mingw-w64-${{ matrix.arch }}-libpng + mingw-w64-${{ matrix.arch }}-lld + mingw-w64-${{ matrix.arch }}-ninja - name: Install OpenGFX shell: bash @@ -395,24 +399,28 @@ jobs: - name: Build shell: msys2 {0} + env: + NINJA_STATUS: "[%f/%t -- %e] " # [finished_edges/total_edges -- elapsed_time], default value is "[%f/%t] " run: | mkdir build cd build echo "::group::CMake" - cmake .. -G"MSYS Makefiles" + cmake .. \ + -GNinja \ + -DCMAKE_CXX_FLAGS="-fuse-ld=lld" \ + # EOF echo "::endgroup::" echo "::group::Build" - echo "Running on $(nproc) cores" - cmake --build . -j $(nproc) + cmake --build . echo "::endgroup::" - name: Test shell: msys2 {0} run: | cd build - ctest -j $(nproc) --timeout 120 + ctest --timeout 120 check_annotations: name: Check Annotations