OpenRCT2/.github/workflows/ci.yml

505 lines
19 KiB
YAML
Raw Normal View History

name: CI
on:
push:
paths-ignore:
- '.editorconfig'
- '.gitattributes'
- '.github/*_TEMPLATE/**'
- '.github/workflows/localisation.yml'
- '.gitignore'
- '.vscode/**'
pull_request:
paths-ignore:
- '.editorconfig'
- '.gitattributes'
- '.github/*_TEMPLATE/**'
- '.github/workflows/localisation.yml'
- '.gitignore'
- '.vscode/**'
2021-04-15 11:32:14 +02:00
defaults:
run:
shell: bash
2020-01-09 10:53:13 +01:00
env:
OPENRCT2_BUILD_SERVER: GitHub
2020-01-09 10:53:13 +01:00
OPENRCT2_ORG_TOKEN: ${{ secrets.OPENRCT2_ORG_TOKEN }}
BACKTRACE_IO_TOKEN: ${{ secrets.BACKTRACE_IO_TOKEN }}
Release v0.4.10 - Feature: [#18171] Add port of the RCT1 Stand-Up Roller Coaster. - Feature: [#21590] [Plugin] Plugins can now read and write banner properties of tile elements. - Feature: [#21636] Add shortcut key for sorting tile elements. - Feature: [objects#294] Add scenery versions of wooden truss supports. - Feature: [objects#295] Flipped version of wooden post. - Improved: [#21424] Extra viewports can now rotate independently from the main viewport. - Improved: [#21561, #21631] Enable more features in Android build (plugins, networking, multiplayer, audio formats). - Improved: [#21599] Currency signs now use non-breaking spaces. - Improved: [objects#157] Added sloped images for many walls. - Improved: [objects#288] Better map colours and more sensible prices for RCT1 land surfaces. - Improved: [objects#292] Vehicle colour cleanups for WW/TT vehicles. - Improved: [objects#299] More accurate ratings modifiers for RCT1 vehicles. - Improved: [objects#309] Updated names for dodgems and flying saucers vehicles. - Improved: [objects#313] buildMenuPriority for dodgems and flying saucers vehicles. - Change: [#21529] Classify “Southern Sands”, “Tiny Towers”, “Nevermore Park”, “Pacifica” as expert scenarios. - Change: [#21545] Reorder Wacky Worlds scenarios and adjust their difficulty classification. - Fix: [#910] Extra viewport does not preserve the location when rotating. - Fix: [#18413] Crash when mouse over a hacked train. - Fix: [#20338] Cannot select Scenery Picker or Scatter Tool when the scenery recolouring tool is active. - Fix: [#21317] Track designer allows proceeding without an object selected. - Fix: [#21360] If the object selection is missing certain types, the Object Selection window will switch to an incorrect tab. - Fix: [#21419] Cannot place walls underground beneath sloped tiles with clearance checks disabled. - Fix: [#21434] Number of guests overflows in objective text. - Fix: [#21522] Supports for 3×3 turns and 45 degree turns on the Hybrid Coaster and Wooden Roller Coaster not drawn correctly. - Fix: [#21543] Crash with creating a TrackIterator with invalid arguments. - Fix: [#21635] Tile inspector hotkey can set wall slope for non-slopeable objects. - Fix: [#21641] Crash when creating track iterator from an invalid tile element. - Fix: [#21652] Dialog window to confirm overwriting files does not apply the theme colours correctly. - Fix: [#21654] No sound effects when using RCT Classic as an asset base. - Fix: [#21654] Extraneous reports of an object conflict between `rct2.audio.base` and `rct2.audio.base.rctc`. - Fix: [#21664] Crash when switching between languages that use TTF. - Fix: [#21668] Crash when on null ride in Guest::UpdateRideLeaveExit. - Fix: [#21691] Crash when validating rides which can't contain banked track. - Fix: [objects#290] “Haunted Mansion” cars have a non-functional third remap colour. - Fix: [objects#296] Incorrect wall placement around large Kremlin/drab pieces. - Fix: [objects#300] Incorrect Colosseum and volcano corner clearances. - Fix: [objects#319] Incorrect diagonal slope images used for RCT1 corkscrew. - Fix: [objects#320] Incorrect Mandarin Duck boats capacity.
2024-04-02 22:21:50 +02:00
OPENRCT2_VERSION: 0.4.10
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint-commit:
name: Lint Commit Message
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Lint Commit Messages
uses: wagoid/commitlint-github-action@v5
with:
configFile: .commitlint.json
2019-10-31 01:03:05 +01:00
check-code-formatting:
name: Check code formatting
runs-on: ubuntu-latest
container: openrct2/openrct2-build:4-format
defaults:
run:
shell: sh
2019-10-31 01:03:05 +01:00
steps:
- name: Checkout
uses: actions/checkout@v4
2019-10-31 01:03:05 +01:00
- name: Run clang-format
run: scripts/check-code-formatting
2023-12-20 17:27:06 +01:00
check-changelog-formatting:
name: Check changelog formatting
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
2023-12-20 17:27:06 +01:00
- name: Run check-changelog-formatting
run: scripts/check-changelog-formatting
g2dat:
name: g2.dat
runs-on: ubuntu-latest
steps:
- name: Checkout OpenRCT2
uses: actions/checkout@v4
with:
path: OpenRCT2
- name: Download gxc
run: |
curl -Lo tools.tar.gz https://github.com/IntelOrca/libsawyer/releases/download/v1.3.0/libsawyer-tools-linux-x64.tar.gz
mkdir -p "$GITHUB_WORKSPACE/bin"
tar -C "$GITHUB_WORKSPACE/bin" -xf tools.tar.gz
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Build g2.dat
run: |
gxc build g2.dat OpenRCT2/resources/g2/sprites.json
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: g2.dat
path: g2.dat
windows:
name: Windows
runs-on: windows-latest
needs: check-code-formatting
strategy:
fail-fast: false
matrix:
platform: [win32, x64, arm64]
env:
PLATFORM: ${{ matrix.platform }}
steps:
- name: Setup environment
run: |
BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3)
if [[ $BRANCH == 'develop' || $BRANCH == 'master' ]]; then
echo "CONFIGURATION=ReleaseLTCG" >> "$GITHUB_ENV"
else
echo "CONFIGURATION=Release" >> "$GITHUB_ENV"
fi
- name: Checkout
uses: actions/checkout@v4
- name: Git describe for shallow checkout
id: ghd
2024-02-06 23:29:23 +01:00
uses: proudust/gh-describe@v2
- name: Update GA environment
run: echo "OPENRCT2_DESCRIBE=${{ steps.ghd.outputs.describe }}" >> $GITHUB_ENV
2022-04-01 11:02:48 +02:00
- name: Install MSVC problem matcher
uses: ammaraskar/msvc-problem-matcher@master
- name: Build OpenRCT2
run: . scripts/setenv && build
- name: Build artifacts
run: |
. scripts/setenv -q
build-portable
build-symbols
build-installer -i
- name: Upload artifacts (CI)
uses: actions/upload-artifact@v4
with:
name: OpenRCT2-${{ runner.os }}-${{ matrix.platform }}
path: artifacts
if-no-files-found: error
- name: Run Tests
2022-03-26 20:15:14 +01:00
if: matrix.platform != 'arm64'
run: . scripts/setenv -q && run-tests
2023-04-05 10:17:33 +02:00
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "artifacts/test-**.xml"
if: matrix.platform != 'arm64'
- name: Upload artifacts (openrct2.org)
run: |
. scripts/setenv
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
2023-03-28 19:28:16 +02:00
upload-build artifacts/openrct2-portable-*.zip "windows-portable-$PLATFORM.zip" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
upload-build artifacts/openrct2-installer-*.exe "windows-installer-$PLATFORM.exe" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
upload-build artifacts/openrct2-symbols-*.zip "windows-symbols-$PLATFORM.zip" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
2022-03-09 21:53:23 +01:00
upload-backtrace-symbols artifacts/openrct2-symbols-*.zip
else
echo 'Not going to push build'
fi
2020-01-10 00:26:33 +01:00
windows-mingw:
name: Windows (${{ matrix.platform_name }}) using mingw
2020-09-27 20:30:13 +02:00
runs-on: ubuntu-latest
needs: check-code-formatting
2024-03-11 20:52:17 +01:00
container: openrct2/openrct2-build:14-mingw
strategy:
fail-fast: false
matrix:
platform: [win32]
include:
- platform: win32
platform_name: win32
cache_key: windows-mingw
build_flags: -DBUILD_SHARED_LIBS=ON -DENABLE_SCRIPTING=ON
2020-09-27 20:30:13 +02:00
steps:
- name: Checkout
uses: actions/checkout@v4
2021-02-09 12:58:23 +01:00
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.11 # https://github.com/hendrikmuhs/ccache-action/issues/181
with:
key: ${{ matrix.cache_key }}
2022-04-01 11:02:48 +02:00
- name: Install GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
2020-09-27 20:30:13 +02:00
- name: Build OpenRCT2
run: |
sudo su
cmake -B bin -G Ninja -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DCMAKE_BUILD_TYPE=Release -DDISABLE_IPO=on -DFORCE32=on ${{ matrix.build_flags }}
cd bin
2020-09-27 20:30:13 +02:00
ninja -k0
- name: Upload artifacts (CI)
if: matrix.platform == 'NT5.1'
uses: actions/upload-artifact@v4
2020-09-27 20:30:13 +02:00
with:
name: OpenRCT2-Windows-${{ matrix.platform }}
2020-09-27 20:30:13 +02:00
path: bin/openrct2.exe
if-no-files-found: error
2021-01-03 05:15:40 +01:00
macos-cmake:
name: macOS (${{ matrix.arch }}) using CMake
runs-on: macos-12
needs: check-code-formatting
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
include:
- arch: x64
cache_key: macos-x64
# Note: only build/run tests on the native architecture of the CI agent
# GitHub macos-12 agents are all Intel, but as of 2024-04-25 new images, e.g. macos-14 (current macos-latest) are arm64
# See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
build_flags: -DARCH="x86_64" -DWITH_TESTS=on
run_tests: true
- arch: arm64
cache_key: macos-arm64
build_flags: -DARCH="arm64"
run_tests: false
2021-01-03 05:15:40 +01:00
steps:
- name: Checkout
uses: actions/checkout@v4
2021-02-10 22:35:04 +01:00
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.11 # https://github.com/hendrikmuhs/ccache-action/issues/181
2021-02-10 22:35:04 +01:00
with:
key: ${{ matrix.cache_key }}
- name: Configure ccache
run: |
# See https://github.com/hendrikmuhs/ccache-action/issues/146
ccache --set-config=compiler_check=content
2022-04-01 11:02:48 +02:00
- name: Install GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
2021-01-03 05:15:40 +01:00
- name: Build OpenRCT2
run: |
HOMEBREW_NO_ANALYTICS=1 brew install ninja pkg-config
. scripts/setenv -q && build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=on ${{ matrix.build_flags }}
- name: Build artifacts
run: |
. scripts/setenv
mkdir -p artifacts
mv bin/OpenRCT2.app artifacts
echo -e "\033[0;36mCompressing OpenRCT2.app...\033[0m"
cd artifacts
2021-03-21 23:42:19 +01:00
zip -rqy openrct2-macos.zip OpenRCT2.app
- name: Upload artifacts (CI)
uses: actions/upload-artifact@v4
with:
name: OpenRCT2-${{ runner.os }}-${{ matrix.arch }}-cmake
path: artifacts/openrct2-macos.zip
if-no-files-found: error
- name: Run Tests
if: ${{matrix.run_tests}}
run: . scripts/setenv -q && run-tests
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "artifacts/test-**.xml"
if: ${{matrix.run_tests}}
macos-universal:
name: macOS universal app bundle
runs-on: macos-12
needs: macos-cmake
steps:
- name: Checkout
uses: actions/checkout@v4
- name: download x64 app bundle
uses: actions/download-artifact@v4
with:
name: OpenRCT2-${{ runner.os }}-x64-cmake
path: macos_universal/x64
- name: download arm64 app bundle
uses: actions/download-artifact@v4
with:
name: OpenRCT2-${{ runner.os }}-arm64-cmake
path: macos_universal/arm64
- name: Make Universal app bundle
run: |
. scripts/setenv
cd macos_universal
unzip x64/openrct2-macos.zip -d x64
unzip arm64/openrct2-macos.zip -d arm64
create-macos-universal
- name: Create artifact
run: |
. scripts/setenv
mkdir -p artifacts
mv macos_universal/OpenRCT2-universal.app artifacts/OpenRCT2.app
echo -e "\033[0;36mCompressing OpenRCT2.app...\033[0m"
cd artifacts
zip -rqy openrct2-macos.zip OpenRCT2.app
- name: Upload artifacts (CI)
uses: actions/upload-artifact@v4
with:
name: OpenRCT2-${{ runner.os }}-universal
2021-03-21 23:42:19 +01:00
path: artifacts/openrct2-macos.zip
if-no-files-found: error
- name: Upload artifacts (openrct2.org)
run: |
. scripts/setenv
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
upload-build artifacts/openrct2-macos.zip macos-universal.zip $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
else
2022-03-09 21:53:23 +01:00
echo 'Not going to push build'
fi
linux-portable:
2024-03-28 00:37:32 +01:00
name: ${{ matrix.distro }} Linux (${{ matrix.release }}, ${{ matrix.platform }}, portable)
runs-on: ubuntu-latest
needs: check-code-formatting
container: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
# Use `-fno-var-tracking-assignments` to reduce amount of produced debug information. This is necessary due to 100MiB limit of GitHub / openrct2.org API.
- platform: x86_64
2024-03-28 00:37:32 +01:00
distro: Ubuntu
release: jammy
2024-03-11 20:52:17 +01:00
image: openrct2/openrct2-build:14-jammy
build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz -fno-var-tracking-assignments"
- platform: x86_64
2024-03-28 00:37:32 +01:00
distro: Debian
release: bullseye
2024-03-11 20:52:17 +01:00
image: openrct2/openrct2-build:14-bullseye
2023-02-21 22:25:36 +01:00
build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz -fno-var-tracking-assignments" -DWITH_TESTS=off
- platform: i686
2024-03-28 00:37:32 +01:00
distro: Ubuntu
release: jammy
image: openrct2/openrct2-build:14-jammy32
build_flags: -DFORCE32=ON -DENABLE_SCRIPTING=OFF -DCMAKE_CXX_FLAGS="-m32 -g -gz" -DWITH_TESTS=off
steps:
- name: Checkout
uses: actions/checkout@v4
2021-02-09 12:58:23 +01:00
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.11 # https://github.com/hendrikmuhs/ccache-action/issues/181
with:
key: linux-${{ matrix.platform }}-${{ matrix.distro }}
- name: Get pre-reqs
run: . scripts/setenv && get-discord-rpc
2022-04-01 11:02:48 +02:00
- name: Install GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
- name: Build OpenRCT2
run: . scripts/setenv -q && build -DWITH_TESTS=on -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPORTABLE=ON ${{ matrix.build_flags }}
- name: Build artifacts
run: . scripts/setenv -q && build-portable artifacts/OpenRCT2-${{ runner.os }}-${{ matrix.distro }}-${{ matrix.platform }}.tar.gz bin/install/usr
- name: Upload artifacts (CI)
uses: actions/upload-artifact@v4
with:
name: OpenRCT2-${{ runner.os }}-${{ matrix.distro }}-${{ matrix.platform }}
path: artifacts
if-no-files-found: error
- name: Run Tests
run: . scripts/setenv -q && run-tests
2023-04-05 10:17:33 +02:00
- name: Upload artifacts (openrct2.org)
run: |
# Build identification code: https://github.com/Limetric/OpenRCT2.org/blob/e5b738f3dadcc5a3b78e8dfd434756ff31eaa1d3/src/misc/releaseAsset.js#L94-L116
. scripts/setenv -q
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
upload-build artifacts/OpenRCT2-${{ runner.os }}-${{ matrix.distro }}-${{ matrix.platform }}.tar.gz linux-${{ matrix.platform }}-${{ matrix.distro }}.tar.gz $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
else
2022-03-09 21:53:23 +01:00
echo 'Not going to push build'
fi
linux-appimage:
2024-03-28 00:37:32 +01:00
name: Ubuntu Linux (AppImage, x86_64)
runs-on: ubuntu-latest
needs: check-code-formatting
container: openrct2/openrct2-build:14-jammy
steps:
- name: Checkout
uses: actions/checkout@v4
2021-02-09 12:58:23 +01:00
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.11 # https://github.com/hendrikmuhs/ccache-action/issues/181
with:
key: linux-appimage
- name: Get pre-reqs
run: . scripts/setenv -q && get-discord-rpc
- name: Build OpenRCT2
run: . scripts/setenv -q && build -DCMAKE_BUILD_TYPE=Release -DAPPIMAGE=ON -DOPENRCT2_USE_CCACHE=on
- name: Build AppImage
run: . scripts/setenv -q && build-appimage
- name: Upload artifacts (CI)
uses: actions/upload-artifact@v4
with:
name: OpenRCT2-AppImage
path: artifacts
if-no-files-found: error
- name: Upload artifacts (openrct2.org)
run: |
# Build identification code: https://github.com/Limetric/OpenRCT2.org/blob/e5b738f3dadcc5a3b78e8dfd434756ff31eaa1d3/src/misc/releaseAsset.js#L94-L116
. scripts/setenv -q
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
upload-build artifacts/OpenRCT2-x86_64.AppImage linux.AppImage $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
else
echo 'Not going to push build'
fi
linux-docker:
2024-03-28 00:37:32 +01:00
name: Ubuntu Linux (Docker)
needs: check-code-formatting
if: github.repository == 'OpenRCT2/OpenRCT2'
runs-on: ubuntu-latest
steps:
- name: Checkout image
uses: actions/checkout@v4
with:
repository: OpenRCT2/openrct2-docker
- name: Build image
run: docker build -t openrct2/openrct2-cli:develop develop/cli
- name: Push image
env:
OPENRCT2_DOCKER_USER: ${{ secrets.OPENRCT2_DOCKER_USER }}
OPENRCT2_DOCKER_PASS: ${{ secrets.OPENRCT2_DOCKER_PASS }}
run: |
OPENRCT2_BRANCH=$(echo "$GITHUB_REF" | sed 's/refs\/heads\///')
echo "Current branch is $OPENRCT2_BRANCH"
if [ "$OPENRCT2_BRANCH" = 'develop' ]; then
2022-03-09 21:53:23 +01:00
docker login -u "$OPENRCT2_DOCKER_USER" -p "$OPENRCT2_DOCKER_PASS"
docker push openrct2/openrct2-cli:develop
else
2022-03-09 21:53:23 +01:00
echo 'Image not pushed'
fi
linux-clang:
2024-03-28 00:37:32 +01:00
name: Ubuntu Linux (jammy, debug, [http, network, flac, vorbis OpenGL] disabled) using clang
runs-on: ubuntu-latest
needs: check-code-formatting
2024-03-11 20:52:17 +01:00
container: openrct2/openrct2-build:14-jammy
steps:
- name: Checkout
uses: actions/checkout@v4
2021-02-09 12:58:23 +01:00
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.11 # https://github.com/hendrikmuhs/ccache-action/issues/181
with:
key: linux-clang
2022-04-01 11:02:48 +02:00
- name: Install GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
- name: Build OpenRCT2
run: . scripts/setenv && build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DDISABLE_NETWORK=ON -DDISABLE_HTTP=ON -DDISABLE_FLAC=ON -DDISABLE_VORBIS=ON -DDISABLE_OPENGL=ON
linux-clang-tests:
2024-03-28 00:37:32 +01:00
name: Ubuntu Linux (debug) using clang, coverage enabled
runs-on: ubuntu-latest
needs: check-code-formatting
2024-03-11 20:52:17 +01:00
container: openrct2/openrct2-build:14-jammy
steps:
- name: Checkout
uses: actions/checkout@v4
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.11 # https://github.com/hendrikmuhs/ccache-action/issues/181
with:
key: linux-clang
- name: Install GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
- name: Build OpenRCT2
run: . scripts/setenv && build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-fprofile-instr-generate -fcoverage-mapping" -DWITH_TESTS=on
- name: Run Tests
run: . scripts/setenv -q && LLVM_PROFILE_FILE="openrct2-coverage-%p.profraw" run-tests
2023-04-05 10:17:33 +02:00
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "artifacts/test-**.xml"
if: always()
- name: Process coverage information
run: |
cd bin
llvm-profdata merge -sparse openrct2-coverage*profraw -o openrct2.profdata
llvm-cov export -instr-profile=openrct2.profdata ./OpenRCT2Tests > coverage.json
2023-04-04 09:56:20 +02:00
llvm-cov report ./OpenRCT2Tests -instr-profile=openrct2.profdata
xz -1v openrct2.profdata
xz -1v coverage.json
xz -1v OpenRCT2Tests
- name: Upload artifacts (CI)
uses: actions/upload-artifact@v4
with:
name: OpenRCT2-${{ runner.os }}-coverage
path: |
bin/*profdata*
bin/coverage.json*
bin/OpenRCT2Tests.xz
if-no-files-found: error
2020-01-31 09:02:11 +01:00
android:
name: Android
runs-on: ubuntu-latest
needs: check-code-formatting
2024-03-11 20:52:17 +01:00
container: openrct2/openrct2-build:14-android
2020-01-31 09:02:11 +01:00
steps:
- name: Checkout
uses: actions/checkout@v4
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.11 # https://github.com/hendrikmuhs/ccache-action/issues/181
with:
key: android
2022-04-01 11:02:48 +02:00
- name: Install GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
2020-01-31 09:02:11 +01:00
- name: Build OpenRCT2
run: |
. scripts/setenv
pushd src/openrct2-android
./gradlew app:assembleRelease
popd
mkdir -p artifacts
2021-12-18 00:03:38 +01:00
mv src/openrct2-android/app/build/outputs/apk/release/app-release.apk artifacts/openrct2-arm.apk
2020-01-31 09:02:11 +01:00
- name: Upload artifacts (CI)
uses: actions/upload-artifact@v4
2020-01-31 09:02:11 +01:00
with:
name: OpenRCT2-Android
path: artifacts
if-no-files-found: error
2020-02-01 17:47:49 +01:00
- name: Upload artifacts (openrct2.org)
run: |
. scripts/setenv -q
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
upload-build artifacts/openrct2-arm.apk android-arm.apk $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
2020-02-01 17:47:49 +01:00
else
2022-03-09 21:53:23 +01:00
echo 'Not going to push build'
2020-02-01 17:47:49 +01:00
fi