mirror of https://github.com/OpenTTD/OpenTTD
Change: [Actions] Use only CMake, CTest and CPack
parent
90adac8f09
commit
70e4845915
|
@ -39,7 +39,7 @@ jobs:
|
||||||
|
|
||||||
echo "::group::Build"
|
echo "::group::Build"
|
||||||
echo "Running on $(nproc) cores"
|
echo "Running on $(nproc) cores"
|
||||||
make -j$(nproc) tools
|
cmake --build . -j $(nproc) --target tools
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Install GCC problem matcher
|
- name: Install GCC problem matcher
|
||||||
|
@ -56,7 +56,7 @@ jobs:
|
||||||
|
|
||||||
echo "::group::Build"
|
echo "::group::Build"
|
||||||
echo "Running on $(nproc) cores"
|
echo "Running on $(nproc) cores"
|
||||||
emmake make -j$(nproc)
|
cmake --build . -j $(nproc)
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
|
@ -134,13 +134,13 @@ jobs:
|
||||||
|
|
||||||
echo "::group::Build"
|
echo "::group::Build"
|
||||||
echo "Running on $(nproc) cores"
|
echo "Running on $(nproc) cores"
|
||||||
make -j$(nproc)
|
cmake --build . -j $(nproc)
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
make -j$(nproc) test
|
ctest -j $(nproc)
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
name: Mac OS
|
name: Mac OS
|
||||||
|
@ -213,13 +213,13 @@ jobs:
|
||||||
|
|
||||||
echo "::group::Build"
|
echo "::group::Build"
|
||||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||||
make -j$(sysctl -n hw.logicalcpu)
|
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
make -j$(sysctl -n hw.logicalcpu) test
|
ctest -j $(sysctl -n hw.logicalcpu)
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
name: Windows
|
name: Windows
|
||||||
|
@ -307,4 +307,4 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd ${GITHUB_WORKSPACE}/build
|
cd ${GITHUB_WORKSPACE}/build
|
||||||
ctest -C Debug
|
ctest
|
||||||
|
|
|
@ -230,7 +230,7 @@ jobs:
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
echo "::group::Build"
|
echo "::group::Build"
|
||||||
make docs
|
cmake --build . --target docs
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Create bundles
|
- name: Create bundles
|
||||||
|
@ -316,8 +316,8 @@ jobs:
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
|
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
|
||||||
make -j$(nproc)
|
cmake --build . -j $(nproc)
|
||||||
make install
|
cmake --install .
|
||||||
)
|
)
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
@ -338,12 +338,21 @@ jobs:
|
||||||
|
|
||||||
echo "::group::Build"
|
echo "::group::Build"
|
||||||
echo "Running on $(nproc) cores"
|
echo "Running on $(nproc) cores"
|
||||||
make -j$(nproc) package
|
cmake --build . -j $(nproc)
|
||||||
echo "::endgroup::"
|
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
|
# Remove the sha256 files CPack generates; we will do this ourself at
|
||||||
# the end of this workflow.
|
# the end of this workflow.
|
||||||
rm -f bundles/*.sha256
|
rm -f bundles/*.sha256
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Store bundles
|
- name: Store bundles
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
@ -429,12 +438,22 @@ jobs:
|
||||||
|
|
||||||
echo "::group::Build"
|
echo "::group::Build"
|
||||||
echo "Running on $(nproc) cores"
|
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::"
|
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
|
# Remove the sha256 files CPack generates; we will do this ourself at
|
||||||
# the end of this workflow.
|
# the end of this workflow.
|
||||||
rm -f bundles/*.sha256
|
rm -f bundles/*.sha256
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Store bundles
|
- name: Store bundles
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
@ -509,7 +528,7 @@ jobs:
|
||||||
|
|
||||||
echo "::group::Build tools"
|
echo "::group::Build tools"
|
||||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
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::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Import code signing certificates
|
- name: Import code signing certificates
|
||||||
|
@ -539,7 +558,7 @@ jobs:
|
||||||
|
|
||||||
echo "::group::Build"
|
echo "::group::Build"
|
||||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||||
make -j$(sysctl -n hw.logicalcpu)
|
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Build x64
|
- name: Build x64
|
||||||
|
@ -562,25 +581,28 @@ jobs:
|
||||||
|
|
||||||
echo "::group::Build"
|
echo "::group::Build"
|
||||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||||
make -j$(sysctl -n hw.logicalcpu)
|
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Build package
|
- name: Create bundles
|
||||||
run: |
|
run: |
|
||||||
cd build-x64
|
cd build-x64
|
||||||
|
|
||||||
|
echo "::group::Create universal binary"
|
||||||
# Combine the `openttd` binaries from each build into a single file
|
# Combine the `openttd` binaries from each build into a single file
|
||||||
lipo -create -output openttd-universal ../build-*/openttd
|
lipo -create -output openttd-universal ../build-*/openttd
|
||||||
mv openttd-universal 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 "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Run CPack"
|
||||||
|
cpack
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Cleanup"
|
||||||
# Remove the sha256 files CPack generates; we will do this ourself at
|
# Remove the sha256 files CPack generates; we will do this ourself at
|
||||||
# the end of this workflow.
|
# the end of this workflow.
|
||||||
rm -f bundles/*.sha256
|
rm -f bundles/*.sha256
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Install gon
|
- name: Install gon
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Reference in New Issue