mirror of https://github.com/OpenTTD/OpenTTD.git
Change: [Actions] Use only CMake, CTest and CPack
This commit is contained in:
parent
90adac8f09
commit
70e4845915
|
@ -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
|
||||
|
|
|
@ -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 "::group::Build"
|
||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||
make -j$(sysctl -n hw.logicalcpu) package
|
||||
echo "::endgroup::"
|
||||
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue