diff options
-rw-r--r-- | .github/workflows/ci-build.yml | 14 | ||||
-rw-r--r-- | .github/workflows/release.yml | 46 |
2 files changed, 41 insertions, 19 deletions
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index b50e84136..2e5ad6e31 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -39,7 +39,7 @@ jobs: echo "::group::Build" echo "Running on $(nproc) cores" - make -j$(nproc) tools + cmake --build . -j $(nproc) --target tools echo "::endgroup::" - name: Install GCC problem matcher @@ -56,7 +56,7 @@ jobs: echo "::group::Build" echo "Running on $(nproc) cores" - emmake make -j$(nproc) + cmake --build . -j $(nproc) echo "::endgroup::" linux: @@ -134,13 +134,13 @@ jobs: echo "::group::Build" echo "Running on $(nproc) cores" - make -j$(nproc) + cmake --build . -j $(nproc) echo "::endgroup::" - name: Test run: | cd build - make -j$(nproc) test + ctest -j $(nproc) macos: name: Mac OS @@ -213,13 +213,13 @@ jobs: echo "::group::Build" echo "Running on $(sysctl -n hw.logicalcpu) cores" - make -j$(sysctl -n hw.logicalcpu) + cmake --build . -j $(sysctl -n hw.logicalcpu) echo "::endgroup::" - name: Test run: | cd build - make -j$(sysctl -n hw.logicalcpu) test + ctest -j $(sysctl -n hw.logicalcpu) windows: name: Windows @@ -307,4 +307,4 @@ jobs: shell: bash run: | cd ${GITHUB_WORKSPACE}/build - ctest -C Debug + ctest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6f8d0acb..c03ea6ea9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -230,7 +230,7 @@ jobs: echo "::endgroup::" echo "::group::Build" - make docs + cmake --build . --target docs echo "::endgroup::" - name: Create bundles @@ -316,8 +316,8 @@ jobs: mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr - make -j$(nproc) - make install + cmake --build . -j $(nproc) + cmake --install . ) echo "::endgroup::" @@ -338,12 +338,21 @@ jobs: echo "::group::Build" echo "Running on $(nproc) cores" - make -j$(nproc) package + cmake --build . -j $(nproc) echo "::endgroup::" + - name: Create bundles + run: | + cd ${GITHUB_WORKSPACE}/build + echo "::group::Run CPack" + cpack + echo "::endgroup::" + + echo "::group::Cleanup" # Remove the sha256 files CPack generates; we will do this ourself at # the end of this workflow. rm -f bundles/*.sha256 + echo "::endgroup::" - name: Store bundles uses: actions/upload-artifact@v2 @@ -429,12 +438,22 @@ jobs: echo "::group::Build" echo "Running on $(nproc) cores" - make -j$(nproc) package + # Ubuntu 18.04 cmake does not support -j so we pass the option to the native tool + cmake --build . -- -j $(nproc) + echo "::endgroup::" + + - name: Create bundles + run: | + cd ${GITHUB_WORKSPACE}/build + echo "::group::Run CPack" + cpack echo "::endgroup::" + echo "::group::Cleanup" # Remove the sha256 files CPack generates; we will do this ourself at # the end of this workflow. rm -f bundles/*.sha256 + echo "::endgroup::" - name: Store bundles uses: actions/upload-artifact@v2 @@ -509,7 +528,7 @@ jobs: echo "::group::Build tools" echo "Running on $(sysctl -n hw.logicalcpu) cores" - make -j$(sysctl -n hw.logicalcpu) tools + cmake --build . -j $(sysctl -n hw.logicalcpu) --target tools echo "::endgroup::" - name: Import code signing certificates @@ -539,7 +558,7 @@ jobs: echo "::group::Build" echo "Running on $(sysctl -n hw.logicalcpu) cores" - make -j$(sysctl -n hw.logicalcpu) + cmake --build . -j $(sysctl -n hw.logicalcpu) echo "::endgroup::" - name: Build x64 @@ -562,25 +581,28 @@ jobs: echo "::group::Build" echo "Running on $(sysctl -n hw.logicalcpu) cores" - make -j$(sysctl -n hw.logicalcpu) + cmake --build . -j $(sysctl -n hw.logicalcpu) echo "::endgroup::" - - name: Build package + - name: Create bundles run: | cd build-x64 + echo "::group::Create universal binary" # Combine the `openttd` binaries from each build into a single file lipo -create -output openttd-universal ../build-*/openttd mv openttd-universal openttd + echo "::endgroup::" - echo "::group::Build" - echo "Running on $(sysctl -n hw.logicalcpu) cores" - make -j$(sysctl -n hw.logicalcpu) package + echo "::group::Run CPack" + cpack echo "::endgroup::" + echo "::group::Cleanup" # Remove the sha256 files CPack generates; we will do this ourself at # the end of this workflow. rm -f bundles/*.sha256 + echo "::endgroup::" - name: Install gon env: |