OpenRCT2/.github/workflows/ci.yml

371 lines
13 KiB
YAML
Raw Normal View History

name: CI
2019-10-31 01:03:05 +01:00
on: [push, pull_request]
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.3.5 - Feature: [#3868] Initial support for using TTF in OpenGL mode (still contains bugs). - Feature: [#7682] Follow ride/guest/staff in main window viewport. - Feature: [#13407] Allow building chain lifts on enclosed dinghy slide pieces when cheats are on. - Feature: [#15084] [Plugin] Add "vehicle.crash" hook. - Feature: [#15143] Added a shortcut key for Giant Screenshot. - Feature: [#15164] Highlight elements selected by the Tile Inspector, tracks are currently not supported. - Feature: [#15165] [Plugin] Add the ability to create entities using "map.createEntity". - Feature: [#15194] [Plugin] Add guest properties, ride downtime and park casualty penalty. - Feature: [#15195] Added a bug-report item in file dropdown menu. - Feature: [#15294] New vehicle animation type: flying animal. - Fix: [#10614] Track Designs with missing path(s) do not use alternate pathways. - Fix: [#12981] New vehicles do not appear in vehicle type dropdown. - Fix: [#13465] Creating a scenario based on a won save game results in a scenario that’s instantly won. - Fix: [#13912] “Dome park” no longer renders dome correctly. - Fix: [#14316] Closing the Track Designs Manager window causes broken state. - Fix: [#14482, #15258] Rides with invisibility hacks sometimes behave incorrectly. - Fix: [#14649] ImageImporter incorrectly remaps colours outside the RCT2 palette. - Fix: [#14667] “Extreme Hawaiian Island” has unpurchaseable land tiles (original bug). - Fix: [#14741] Crash when exiting OpenRCT2 on macOS. - Fix: [#15096] Crash when placing entrances in the scenario editor near the map corner. - Fix: [#15136] Exported SV6 files cause vanilla RCT2 to hang. - Fix: [#15142] ToonTowner's mine roofs were moved into the pirate theme scenery group instead of the mine theme scenery group. - Fix: [#15148] Track Designs Manager delete confirmation window doesn't display properly. - Fix: [#15170] Plugin: incorrect label text alignment. - Fix: [#15177] Crash in lightfx_add_lights_magic_vehicle(). - Fix: [#15184] Crash when hovering over water types in Object Selection. - Fix: [#15193] Crash when rides/stalls are demolished. - Fix: [#15197] Cannot place flat ride after removing it in construction window. - Fix: [#15199] Construction window is not closed when a ride gets demolished. - Fix: [#15213] Freeze when hovering over Reverse Freefall Coaster in Russian. - Fix: [#15227] Crash on exit after hovering over water types in the Object Selection window. - Fix: [#15255] Tile Inspector shows banner information on walls that do not contain one. - Fix: [#15257] Chat icon shows in scenario/track editor. Other icons don't disable when deactivated in options menu. - Fix: [#15289] Unexpected behavior with duplicated banners which also caused desyncs in multiplayer. - Fix: [#15322] Circus music doesn't play. - Fix: [#15377] Entrance/exit ghost doesn't work on different stations without touching them first. - Fix: [#15451] Guest list name filter remains after group selection. - Fix: [#15466] Crash when opening a dropdown with 0 rows. - Fix: [#15476] Crash when placing/clearing small scenery. - Fix: [#15487] Map animations do not work correctly when loading an exported SV6 file in vanilla RCT2. - Fix: [#15490] Tile inspector needlessly updates clearance height when changing surface slopes. - Fix: [#15496] Crash in paint_swinging_inverter_ship_structure(). - Fix: [#15503] Freeze when doing specific coaster merges with block brakes. - Fix: [#15514] Two different “quit to menu” menu items are available in track designer and track design manager. - Fix: [#15560] Memory leak due to OpenGL Renderer not releasing a texture. - Fix: [#15567] Litter not being counted correctly during Park rating calculation (original bug). - Fix: [#15579] Crash in track_block_get_next(). - Fix: [#15582] [Plugin] Litter properties return incorrect values. - Fix: [#15584] Ride income underflows when on-ride photos are making losses. - Fix: [#15612] Crash when placing walls beside certain scenery objects. - Fix: [#15851] Incorrect percentage chance of jumping with Katie Smith cheat. - Fix: [#15858] Joanne Barton and Emma Garrell cheat incorrectly not applying effects to self. - Improved: [#3417] Crash dumps are now placed in their own folder. - Improved: [#13524] macOS arm64 native (universal) app - Improved: [#15538] Software rendering can now draw in parallel when Multithreading is enabled. - Change: [#8601] Revert ToonTower base block fix to re-enable support blocking. - Change: [#15174] [Plugin] Deprecate the type "peep" and add support to target a specific scripting api version.
2021-11-06 12:10:11 +01:00
OPENRCT2_VERSION: 0.3.5
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@v2
with:
fetch-depth: 0
- name: Lint Commit Messages
uses: wagoid/commitlint-github-action@v3
with:
configFile: .commitlint.json
2019-10-31 01:03:05 +01:00
check-code-formatting:
name: Check code formatting
runs-on: ubuntu-latest
container:
image: openrct2/openrct2-build:0.3.1-format
2019-10-31 01:03:05 +01:00
steps:
- name: Checkout
uses: actions/checkout@v2
2019-10-31 01:03:05 +01:00
- name: Run clang-format
shell: sh
run: scripts/check-code-formatting
windows:
name: Windows
runs-on: windows-latest
needs: check-code-formatting
strategy:
fail-fast: false
matrix:
platform: [win32, x64]
env:
CONFIGURATION: Release
PLATFORM: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v2
- 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@v2
with:
name: OpenRCT2-${{ runner.os }}-${{ matrix.platform }}
path: artifacts
if-no-files-found: error
- name: Run Tests
run: . scripts/setenv -q && run-tests
- name: Upload artifacts (openrct2.org)
run: |
. scripts/setenv -q
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
upload-build artifacts/openrct2-portable-*.zip "windows-portable-$PLATFORM" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
upload-build artifacts/openrct2-installer-*.exe "windows-installer-$PLATFORM" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
upload-build artifacts/openrct2-symbols-*.zip "windows-symbols-$PLATFORM" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
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
2020-09-27 20:30:13 +02:00
container:
image: openrct2/openrct2-build:0.3.1-mingw
strategy:
fail-fast: false
matrix:
platform: [win32, NT5.1]
include:
- platform: win32
platform_name: win32
cache_key: windows-mingw
build_flags: -DBUILD_SHARED_LIBS=ON -DENABLE_SCRIPTING=OFF
- platform: NT5.1
platform_name: win32, NT5.1
cache_key: windows-mingw-nt51
build_flags: -DDISABLE_HTTP=Off -DENABLE_SCRIPTING=ON -DCMAKE_CXX_FLAGS="-Wno-error=cast-function-type -Wno-error=unused-function" -DSTATIC=on -DMINGW_TARGET_NT5_1=ON
2020-09-27 20:30:13 +02:00
steps:
- name: Checkout
uses: actions/checkout@v2
2021-02-09 12:58:23 +01:00
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.cache_key }}
2020-09-27 20:30:13 +02:00
- name: Build OpenRCT2
run: |
sudo su
mkdir bin && cd bin
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DCMAKE_BUILD_TYPE=Release -DDISABLE_IPO=on -DFORCE32=on ${{ matrix.build_flags }}
2020-09-27 20:30:13 +02:00
ninja -k0
- name: Upload artifacts (CI)
if: matrix.platform == 'NT5.1'
uses: actions/upload-artifact@v2
2020-09-27 20:30:13 +02:00
with:
name: OpenRCT2-${{ 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
2021-01-03 05:15:40 +01:00
runs-on: macos-latest
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-latest agents are currently all Intel
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@v2
2021-02-10 22:35:04 +01:00
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.cache_key }}
2021-01-03 05:15:40 +01:00
- name: Build OpenRCT2
run: |
HOMEBREW_NO_ANALYTICS=1 brew install ninja
. scripts/setenv -q && build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=on ${{ matrix.build_flags }}
2021-01-03 05:15:40 +01:00
- name: Run Tests
if: ${{matrix.run_tests}}
2021-01-03 05:15:40 +01:00
run: . scripts/setenv -q && run-tests
- 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@v2
with:
name: OpenRCT2-${{ runner.os }}-${{ matrix.arch }}-cmake
path: artifacts/openrct2-macos.zip
if-no-files-found: error
macos-universal:
name: macOS universal app bundle
runs-on: macos-latest
needs: macos-cmake
steps:
- name: Checkout
uses: actions/checkout@v2
- name: download x64 app bundle
uses: actions/download-artifact@v2
with:
name: OpenRCT2-${{ runner.os }}-x64-cmake
path: macos_universal/x64
- name: download arm64 app bundle
uses: actions/download-artifact@v2
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@v2
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 $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
else
echo 'Not going to push build'
fi
linux-portable:
name: Linux (${{ matrix.platform }}, portable)
runs-on: ubuntu-latest
needs: check-code-formatting
container:
image: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
platform: [x86_64, i686]
include:
- platform: x86_64
image: openrct2/openrct2-build:0.3.1-bionic
cache_key: linux-portable
build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz"
- platform: i686
image: openrct2/openrct2-build:0.3.1-bionic32
cache_key: linux-portable-32
build_flags: -DFORCE32=ON -DENABLE_SCRIPTING=OFF -DCMAKE_CXX_FLAGS="-m32 -gz"
steps:
- name: Checkout
uses: actions/checkout@v2
2021-02-09 12:58:23 +01:00
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.cache_key }}
- name: Get pre-reqs
run: . scripts/setenv && get-discord-rpc
- 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.platform }}.tar.gz bin/install/usr
- name: Upload artifacts (CI)
uses: actions/upload-artifact@v2
with:
name: OpenRCT2-${{ runner.os }}-${{ matrix.platform }}
path: artifacts
if-no-files-found: error
- name: Run Tests
run: . scripts/setenv -q && run-tests
- name: Upload artifacts (openrct2.org)
run: |
. scripts/setenv -q
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
upload-build artifacts/OpenRCT2-${{ runner.os }}-${{ matrix.platform }}.tar.gz linux-${{ matrix.platform }} $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
else
echo 'Not going to push build'
fi
linux-appimage:
name: Linux (x64, AppImage)
runs-on: ubuntu-latest
needs: check-code-formatting
container:
image: openrct2/openrct2-build:0.3.1-bionic
steps:
- name: Checkout
uses: actions/checkout@v2
2021-02-09 12:58:23 +01:00
- name: ccache
uses: hendrikmuhs/ccache-action@v1
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@v2
with:
name: OpenRCT2-AppImage
path: artifacts
if-no-files-found: error
linux-flathub-beta:
name: Linux (Flathub beta channel)
if: github.repository == 'OpenRCT2/OpenRCT2' && github.ref == 'refs/heads/develop' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Send dispatch event to OpenRCT2 Flathub repository
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.OPENRCT2_FLATHUB_TOKEN }}
repository: flathub/io.openrct2.OpenRCT2
event-type: openrct2_develop_push
client-payload: '{ "commit": "${{ github.sha }}" }'
linux-docker:
name: Linux (docker)
needs: check-code-formatting
if: github.repository == 'OpenRCT2/OpenRCT2'
runs-on: ubuntu-latest
steps:
- name: Checkout image
uses: actions/checkout@v2
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
docker login -u "$OPENRCT2_DOCKER_USER" -p "$OPENRCT2_DOCKER_PASS"
docker push openrct2/openrct2-cli:develop
else
echo 'Image not pushed'
fi
linux-clang:
name: Linux (Debug, [http, network, OpenGL] disabled) using clang
runs-on: ubuntu-latest
needs: check-code-formatting
container:
image: openrct2/openrct2-build:0.3.1-bionic
steps:
- name: Checkout
uses: actions/checkout@v2
2021-02-09 12:58:23 +01:00
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: linux-clang
- 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_OPENGL=ON
2020-01-31 09:02:11 +01:00
android:
name: Android
runs-on: ubuntu-latest
needs: check-code-formatting
2020-01-31 09:02:11 +01:00
container:
image: openrct2/openrct2-build:0.3.1-android
2020-01-31 09:02:11 +01:00
steps:
- name: Checkout
uses: actions/checkout@v2
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: android
2020-01-31 09:02:11 +01:00
- name: Build OpenRCT2
run: |
. scripts/setenv
pushd src/openrct2-android
./gradlew app:assemblePR
popd
mkdir -p artifacts
2020-02-01 17:47:49 +01:00
mv src/openrct2-android/app/build/outputs/apk/arm/pr/app-arm-pr.apk artifacts/openrct2-arm.apk
2020-01-31 09:02:11 +01:00
- name: Upload artifacts (CI)
uses: actions/upload-artifact@v2
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 $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
else
echo 'Not going to push build'
fi