mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add Linux portable to GitHub CI (#10612)
This commit is contained in:
parent
5be2604f27
commit
eab255c4bf
|
@ -20,6 +20,7 @@ AlwaysBreakTemplateDeclarations: false
|
||||||
BinPackArguments: true
|
BinPackArguments: true
|
||||||
BinPackParameters: true
|
BinPackParameters: true
|
||||||
BraceWrapping:
|
BraceWrapping:
|
||||||
|
AfterCaseLabel: true
|
||||||
AfterClass: true
|
AfterClass: true
|
||||||
AfterControlStatement: true
|
AfterControlStatement: true
|
||||||
AfterEnum: true
|
AfterEnum: true
|
||||||
|
|
|
@ -9,11 +9,12 @@ jobs:
|
||||||
name: Check code formatting
|
name: Check code formatting
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: openrct2/openrct2:format
|
image: openrct2/openrct2-build:0.2.4-format
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
- name: Run clang-format
|
- name: Run clang-format
|
||||||
run: scripts/run-clang-format.py -r src test --exclude src/openrct2/thirdparty
|
run: scripts/check-code-formatting
|
||||||
windows:
|
windows:
|
||||||
name: Windows
|
name: Windows
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
@ -25,8 +26,8 @@ jobs:
|
||||||
CONFIGURATION: Release
|
CONFIGURATION: Release
|
||||||
PLATFORM: ${{ matrix.platform }}
|
PLATFORM: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@v1
|
||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
shell: bash
|
shell: bash
|
||||||
run: . scripts/setenv && build
|
run: . scripts/setenv && build
|
||||||
|
@ -37,8 +38,8 @@ jobs:
|
||||||
build-portable
|
build-portable
|
||||||
build-symbols
|
build-symbols
|
||||||
build-installer -i
|
build-installer -i
|
||||||
- uses: actions/upload-artifact@master
|
- name: Upload artifacts (CI)
|
||||||
name: Upload artifacts (CI)
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: "OpenRCT2-Windows-${{ matrix.platform }}"
|
name: "OpenRCT2-Windows-${{ matrix.platform }}"
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
@ -56,20 +57,20 @@ jobs:
|
||||||
else
|
else
|
||||||
echo 'Not going to push build'
|
echo 'Not going to push build'
|
||||||
fi
|
fi
|
||||||
osx:
|
macos:
|
||||||
name: macOS
|
name: macOS
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@v1
|
||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
run: |
|
run: |
|
||||||
. scripts/setenv
|
. scripts/setenv
|
||||||
xcodebuild
|
xcodebuild
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
mv build/Release/OpenRCT2.app artifacts
|
mv build/Release/OpenRCT2.app artifacts
|
||||||
- uses: actions/upload-artifact@master
|
- name: Upload artifacts (CI)
|
||||||
name: Upload artifacts (CI)
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: "OpenRCT2-macOS"
|
name: "OpenRCT2-macOS"
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
@ -84,36 +85,111 @@ jobs:
|
||||||
else
|
else
|
||||||
echo 'Not going to push build'
|
echo 'Not going to push build'
|
||||||
fi
|
fi
|
||||||
build-appimage:
|
linux-portable:
|
||||||
|
name: Linux (x64, portable)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: openrct2/openrct2-build:0.2.4-bionic
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Get pre-reqs
|
||||||
|
shell: bash
|
||||||
|
run: . scripts/setenv && get-discord-rpc
|
||||||
|
- name: Build OpenRCT2
|
||||||
|
shell: bash
|
||||||
|
run: . scripts/setenv -q && build -DWITH_TESTS=on -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=ON -DPORTABLE=ON -DCMAKE_CXX_FLAGS="-g -gz"
|
||||||
|
- name: Build artifacts
|
||||||
|
shell: bash
|
||||||
|
run: . scripts/setenv -q && build-portable artifacts/OpenRCT2-Linux-x86_64.tar.gz bin/install/usr
|
||||||
|
- name: Upload artifacts (CI)
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: "OpenRCT2-Linux-x86_64"
|
||||||
|
path: artifacts
|
||||||
|
- name: Run Tests
|
||||||
|
shell: bash
|
||||||
|
run: . scripts/setenv -q && run-tests
|
||||||
|
- name: Upload artifacts (openrct2.org)
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
. scripts/setenv -q
|
||||||
|
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
||||||
|
upload-build artifacts/OpenRCT2-Linux-x86_64.tar.gz linux-x86_64 $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
||||||
|
else
|
||||||
|
echo 'Not going to push build'
|
||||||
|
fi
|
||||||
|
linux-portable-32:
|
||||||
|
name: Linux (i686, portable)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: openrct2/openrct2-build:0.2.4-bionic32
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Get pre-reqs
|
||||||
|
shell: bash
|
||||||
|
run: . scripts/setenv && get-discord-rpc
|
||||||
|
- name: Build OpenRCT2
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
TESTPAINT: true
|
||||||
|
run: . scripts/setenv -q && build -DWITH_TESTS=on -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=ON -DPORTABLE=ON -DFORCE32=ON -DCMAKE_CXX_FLAGS="-m32 -gz"
|
||||||
|
- name: Build artifacts
|
||||||
|
shell: bash
|
||||||
|
run: . scripts/setenv -q && build-portable artifacts/OpenRCT2-Linux-i686.tar.gz bin/install/usr
|
||||||
|
- name: Upload artifacts (CI)
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: "OpenRCT2-Linux-i686"
|
||||||
|
path: artifacts
|
||||||
|
- name: Run Tests
|
||||||
|
shell: bash
|
||||||
|
run: . scripts/setenv -q && run-tests
|
||||||
|
- name: Run testpaint
|
||||||
|
shell: bash
|
||||||
|
run: . scripts/setenv -q && run-testpaint
|
||||||
|
- name: Upload artifacts (openrct2.org)
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
. scripts/setenv -q
|
||||||
|
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
||||||
|
upload-build artifacts/OpenRCT2-Linux-i686.tar.gz linux-i686 $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
||||||
|
else
|
||||||
|
echo 'Not going to push build'
|
||||||
|
fi
|
||||||
|
linux-appimage:
|
||||||
name: Linux (x64, AppImage)
|
name: Linux (x64, AppImage)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: openrct2/openrct2:ubuntu_amd64
|
image: openrct2/openrct2-build:0.2.4-bionic
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- name: Checkout
|
||||||
name: Checkout
|
uses: actions/checkout@v1
|
||||||
- name: Get pre-reqs
|
- name: Get pre-reqs
|
||||||
run: |
|
shell: bash
|
||||||
git clone https://github.com/discordapp/discord-rpc -b v3.4.0
|
run: . scripts/setenv -q && get-discord-rpc
|
||||||
git clone https://github.com/janisozaur/rapidjson discord-rpc/thirdparty/rapidjson -b patch-1
|
|
||||||
mkdir bin && cd bin
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y wget libcairo2
|
|
||||||
wget https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
|
||||||
chmod +x linuxdeploy*.AppImage
|
|
||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
working-directory: bin
|
shell: bash
|
||||||
run: |
|
env:
|
||||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
|
DESTDIR: AppDir
|
||||||
ninja -v
|
run: . scripts/setenv -q && build -DCMAKE_BUILD_TYPE=Release
|
||||||
DESTDIR=AppDir ninja install
|
|
||||||
- name: Build AppImage
|
- name: Build AppImage
|
||||||
working-directory: bin
|
shell: bash
|
||||||
run: |
|
run: . scripts/setenv -q && build-appimage
|
||||||
./linuxdeploy*.AppImage --appimage-extract-and-run --appdir AppDir/ --output appimage --desktop-file AppDir/usr/share/applications/openrct2.desktop
|
- name: Upload artifacts (CI)
|
||||||
mkdir artifacts
|
uses: actions/upload-artifact@v1
|
||||||
mv OpenRCT2*.AppImage artifacts
|
|
||||||
- uses: actions/upload-artifact@master
|
|
||||||
with:
|
with:
|
||||||
name: OpenRCT2-AppImage
|
name: OpenRCT2-AppImage
|
||||||
path: bin/artifacts
|
path: artifacts
|
||||||
|
linux-clang:
|
||||||
|
name: Linux (Debug, [http, network, OpenGL] disabled) using clang
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: openrct2/openrct2-build:0.2.4-bionic
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Build OpenRCT2
|
||||||
|
shell: bash
|
||||||
|
run: . scripts/setenv && build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DDISABLE_NETWORK=ON -DDISABLE_HTTP_TWITCH=ON -DDISABLE_OPENGL=ON
|
||||||
|
|
49
.travis.yml
49
.travis.yml
|
@ -25,55 +25,6 @@ env:
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: linux
|
|
||||||
name: Ubuntu amd64 GCC MinSizeRel
|
|
||||||
if: type != cron
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
env:
|
|
||||||
- OPENRCT2_CMAKE_OPTS="-G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=OpenRCT2 -DPORTABLE=ON -DCMAKE_CXX_FLAGS=\"-g -gz\"" TARGET=ubuntu_amd64
|
|
||||||
- secure: "S3u2VCE2Vy8KNXoeh+DhnzjCmgTX0r95uEZrXDU+IKANOOCKn7Dg4OFDZE3LY/i1y2/EUDpnR5yLC38Ks795EUP/sv/OoMl4tjQ20yERjqWh+gcIRrgx7SdVabuAh3t4aBdaLD4Pfnj5avxeCt6rL7yGnj0wdbrbJSBZPsgSnuQ="
|
|
||||||
after_success:
|
|
||||||
- sudo chown -R $USER build
|
|
||||||
- cd build
|
|
||||||
# make install is done inside docker
|
|
||||||
- mv OpenRCT2/bin/openrct2 OpenRCT2/ && mv OpenRCT2/bin/openrct2-cli OpenRCT2/ && mv OpenRCT2/bin/libopenrct2.so OpenRCT2/ && mv OpenRCT2/share/openrct2 OpenRCT2/data && mv OpenRCT2/share/doc/openrct2 OpenRCT2/doc && mv OpenRCT2/bin/libdiscord-rpc.so OpenRCT2/
|
|
||||||
- rm -rf OpenRCT2/bin OpenRCT2/share # remove empty dirs
|
|
||||||
- tar cvzf openrct2-linux.tar.gz OpenRCT2/
|
|
||||||
- ls -lR
|
|
||||||
- if [[ "z${TRAVIS_TAG}" != "z" ]] ; then
|
|
||||||
export PUSH_BRANCH=master ;
|
|
||||||
else export PUSH_BRANCH=$TRAVIS_BRANCH ; export FILENAME_PART=-${TRAVIS_BRANCH}-$(git rev-parse --short HEAD) ;
|
|
||||||
fi
|
|
||||||
- curl -m $CURL_MAX_TIME --connect-timeout $CURL_CONNECT_TIMEOUT --upload-file openrct2-linux.tar.gz https://transfer.sh/openrct2-linux-x86_64.tar.gz -o link && cat link && echo || echo "Failed transfer.sh upload"
|
|
||||||
- if [[ "z$OPENRCT2_ORG_TOKEN" != "z" && "$TRAVIS_PULL_REQUEST" == "false" && ("${TRAVIS_BRANCH}" =~ ^(develop|push/) || "z${TRAVIS_TAG}" != "z") ]] ; then
|
|
||||||
curl -m $CURL_MAX_TIME --connect-timeout $CURL_CONNECT_TIMEOUT -o - -v --form "key=$OPENRCT2_ORG_TOKEN" --form "fileName=OpenRCT2-${OPENRCT2_VERSION}${FILENAME_PART}-linux-x86_64.tar.gz" --form "version=${OPENRCT2_VERSION}" --form "gitHash=$TRAVIS_COMMIT" --form "gitBranch=$PUSH_BRANCH" --form "flavourId=9" --form "file=@openrct2-linux.tar.gz" "https://openrct2.org/altapi/?command=push-build";
|
|
||||||
fi
|
|
||||||
- os: linux
|
|
||||||
name: Ubuntu i686 GCC Debug m32 no-build-shared-libs
|
|
||||||
if: type != cron
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
env:
|
|
||||||
- OPENRCT2_CMAKE_OPTS="-G Ninja -DFORCE32=ON -DBUILD_SHARED_LIBS=off -DCMAKE_INSTALL_PREFIX=OpenRCT2 -DCMAKE_BUILD_TYPE=debug -DCMAKE_CXX_FLAGS=\"-coverage -m32 -gz\"" TARGET=ubuntu_i686
|
|
||||||
- secure: "S3u2VCE2Vy8KNXoeh+DhnzjCmgTX0r95uEZrXDU+IKANOOCKn7Dg4OFDZE3LY/i1y2/EUDpnR5yLC38Ks795EUP/sv/OoMl4tjQ20yERjqWh+gcIRrgx7SdVabuAh3t4aBdaLD4Pfnj5avxeCt6rL7yGnj0wdbrbJSBZPsgSnuQ="
|
|
||||||
- secure: "JGMzQHmDgpnVzP2uYP5KL7h6SzzGmL4kH7vJmGQRpudKAEzhzB0n7lzjrJOU82hxwmuQQ+RKlE/uxdI32Xbgl+wzZMdfQoZGMWHZfl8Le0Ft5gfZncPuE3poCbiSyPSXok9zU12JHKpEjV/sgqXv/HwhL3jAC68GPGpmxb6xWj8="
|
|
||||||
after_success:
|
|
||||||
- sudo chown -R $USER build
|
|
||||||
- cd build
|
|
||||||
# make install is done inside docker
|
|
||||||
- mv OpenRCT2/bin/openrct2 OpenRCT2/ && mv OpenRCT2/share/openrct2 OpenRCT2/data && mv OpenRCT2/share/doc/openrct2 OpenRCT2/doc
|
|
||||||
- rm -rf OpenRCT2/bin OpenRCT2/share # remove empty dirs
|
|
||||||
- tar cvzf openrct2-linux.tar.gz OpenRCT2/
|
|
||||||
- ls -lR
|
|
||||||
- if [[ "z${TRAVIS_TAG}" != "z" ]] ; then
|
|
||||||
export PUSH_BRANCH=master ;
|
|
||||||
else export PUSH_BRANCH=$TRAVIS_BRANCH ; export FILENAME_PART=-${TRAVIS_BRANCH}-$(git rev-parse --short HEAD) ;
|
|
||||||
fi
|
|
||||||
- curl -m $CURL_MAX_TIME --connect-timeout $CURL_CONNECT_TIMEOUT --upload-file openrct2-linux.tar.gz https://transfer.sh/openrct2-linux-i686.tar.gz -o link && cat link && echo || echo "Failed transfer.sh upload"
|
|
||||||
- if [[ "z$OPENRCT2_ORG_TOKEN" != "z" && "$TRAVIS_PULL_REQUEST" == "false" && ("${TRAVIS_BRANCH}" =~ ^(develop|push/) || "z${TRAVIS_TAG}" != "z") ]] ; then
|
|
||||||
curl -m $CURL_MAX_TIME --connect-timeout $CURL_CONNECT_TIMEOUT -o - -v --form "key=$OPENRCT2_ORG_TOKEN" --form "fileName=OpenRCT2-${OPENRCT2_VERSION}${FILENAME_PART}-linux-i686.tar.gz" --form "version=${OPENRCT2_VERSION}" --form "gitHash=$TRAVIS_COMMIT" --form "gitBranch=$PUSH_BRANCH" --form "flavourId=4" --form "file=@openrct2-linux.tar.gz" "https://openrct2.org/altapi/?command=push-build";
|
|
||||||
fi
|
|
||||||
- os: linux
|
- os: linux
|
||||||
name: Ubuntu amd64 Clang
|
name: Ubuntu amd64 Clang
|
||||||
if: type != cron
|
if: type != cron
|
||||||
|
|
|
@ -5,6 +5,7 @@ set -e
|
||||||
basedir="$(readlink -f `dirname $0`/..)"
|
basedir="$(readlink -f `dirname $0`/..)"
|
||||||
cd $basedir
|
cd $basedir
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
|
||||||
# Patch version.h
|
# Patch version.h
|
||||||
if [[ "$OPENRCT2_BUILD" != "" ]]; then
|
if [[ "$OPENRCT2_BUILD" != "" ]]; then
|
||||||
echo -e "\033[0;36mPatching version.h...\033[0m"
|
echo -e "\033[0;36mPatching version.h...\033[0m"
|
||||||
|
@ -24,3 +25,13 @@ vstool msbuild openrct2.proj //t:build
|
||||||
cp bin/openrct2.exe bin/openrct2.com
|
cp bin/openrct2.exe bin/openrct2.com
|
||||||
vstool editbin //subsystem:console bin/openrct2.com
|
vstool editbin //subsystem:console bin/openrct2.com
|
||||||
vstool editbin //subsystem:windows bin/openrct2.exe
|
vstool editbin //subsystem:windows bin/openrct2.exe
|
||||||
|
else
|
||||||
|
echo -e "\033[0;36mBuilding OpenRCT2...\033[0m"
|
||||||
|
mkdir -p bin && cd bin
|
||||||
|
export DESTDIR=install
|
||||||
|
cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/usr "$@"
|
||||||
|
if [[ "$TESTPAINT" == "true" ]]; then
|
||||||
|
testpaint_target=testpaint
|
||||||
|
fi
|
||||||
|
ninja -v $testpaint_target all install
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo -e "\033[0;36mBuilding AppImage for OpenRCT2...\033[0m"
|
||||||
|
|
||||||
|
# Ensure we are in root directory
|
||||||
|
basedir="$(readlink -f `dirname $0`/..)"
|
||||||
|
cd $basedir
|
||||||
|
|
||||||
|
linuxdeploy=/tmp/linuxdeploy-x86_64.AppImage
|
||||||
|
curl -Lo $linuxdeploy https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||||
|
chmod +x $linuxdeploy
|
||||||
|
pushd bin
|
||||||
|
$linuxdeploy --appimage-extract-and-run --appdir install/ --output appimage --desktop-file install/usr/share/applications/openrct2.desktop
|
||||||
|
popd
|
||||||
|
mkdir -p artifacts
|
||||||
|
mv bin/OpenRCT2*.AppImage artifacts
|
||||||
|
rm $linuxdeploy
|
|
@ -31,14 +31,19 @@ else
|
||||||
if [[ "$#" -ne 2 ]]; then
|
if [[ "$#" -ne 2 ]]; then
|
||||||
echo 'Turn an OpenRCT2 cmake install into a portable tar.gz.'
|
echo 'Turn an OpenRCT2 cmake install into a portable tar.gz.'
|
||||||
echo ''
|
echo ''
|
||||||
echo 'Usage: create-portable-build <output-file> <install-path>'
|
echo 'Usage: build-portable <output-file> <install-path>'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
output=$1
|
output=$1
|
||||||
install=$2
|
install=$2
|
||||||
|
|
||||||
echo -e "\033[0;36mCreating $output..."
|
echo -e "\033[0;36mCreating $output...\033[0m"
|
||||||
|
outputdir=$(dirname $output)
|
||||||
|
if ! [[ -d $outputdir ]]; then
|
||||||
|
mkdir -p $outputdir
|
||||||
|
fi
|
||||||
|
|
||||||
workdir=$output-temp
|
workdir=$output-temp
|
||||||
if [[ -d "$workdir" ]]
|
if [[ -d "$workdir" ]]
|
||||||
then
|
then
|
||||||
|
@ -47,12 +52,12 @@ else
|
||||||
|
|
||||||
mkdir -p $workdir/OpenRCT2
|
mkdir -p $workdir/OpenRCT2
|
||||||
cp -r $install/bin/* $workdir/OpenRCT2
|
cp -r $install/bin/* $workdir/OpenRCT2
|
||||||
cp -r $install/share/doc $workdir/OpenRCT2
|
cp -r $install/share/doc/openrct2 $workdir/OpenRCT2/doc
|
||||||
cp -r $install/share/openrct2 $workdir/OpenRCT2/data
|
cp -r $install/share/openrct2 $workdir/OpenRCT2/data
|
||||||
pushd $workdir > /dev/null
|
pushd $workdir > /dev/null
|
||||||
tar -czf output.tar.gz OpenRCT2
|
tar -czf output.tar.gz OpenRCT2
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
mv $workdir/output.tar.gz $output
|
mv $workdir/output.tar.gz $output
|
||||||
rm -rf $workdir
|
rm -rf $workdir
|
||||||
echo -e "\033[0;32m$output created successfully"
|
echo -e "\033[0;32m$output created successfully\033[0m"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Ensure we are in root directory
|
||||||
|
basedir="$(readlink -f `dirname $0`/..)"
|
||||||
|
cd $basedir
|
||||||
|
|
||||||
|
scripts/run-clang-format.py -r src test --exclude src/openrct2/thirdparty
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
basedir="$(readlink -f `dirname $0`/..)"
|
||||||
|
cd $basedir
|
||||||
|
|
||||||
|
git clone https://github.com/discordapp/discord-rpc -b v3.4.0
|
||||||
|
git clone https://github.com/janisozaur/rapidjson discord-rpc/thirdparty/rapidjson -b patch-1
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Ensure we are in root directory
|
||||||
|
basedir="$(readlink -f `dirname $0`/..)"
|
||||||
|
cd $basedir/bin
|
||||||
|
|
||||||
|
# Scan objects first so that does not happen within a test
|
||||||
|
echo -e "\033[0;36mBuilding OpenRCT2 repository indexes...\033[0m"
|
||||||
|
./openrct2 scan-objects
|
||||||
|
|
||||||
|
echo -e "\033[0;36mRunning OpenRCT2 testpaint tests...\033[0m"
|
||||||
|
./testpaint || true
|
|
@ -5,13 +5,18 @@ set -e
|
||||||
basedir="$(readlink -f `dirname $0`/..)"
|
basedir="$(readlink -f `dirname $0`/..)"
|
||||||
cd $basedir/bin
|
cd $basedir/bin
|
||||||
|
|
||||||
# Ensure test data uses LF
|
|
||||||
dos2unix testdata/keys/*
|
|
||||||
|
|
||||||
# Scan objects first so that does not happen within a test
|
# Scan objects first so that does not happen within a test
|
||||||
echo -e "\033[0;36mBuilding OpenRCT2 repository indexes...\033[0m"
|
echo -e "\033[0;36mBuilding OpenRCT2 repository indexes...\033[0m"
|
||||||
./openrct2 scan-objects
|
./openrct2 scan-objects
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
|
||||||
|
# Ensure test data uses LF
|
||||||
|
dos2unix testdata/keys/*
|
||||||
|
|
||||||
# Now run all the tests
|
# Now run all the tests
|
||||||
echo -e "\033[0;36mRunning OpenRCT2 tests...\033[0m"
|
echo -e "\033[0;36mRunning OpenRCT2 tests...\033[0m"
|
||||||
./tests --gtest_output=xml:../artifacts/test-results.xml
|
./tests --gtest_output=xml:../artifacts/test-results.xml
|
||||||
|
else
|
||||||
|
echo -e "\033[0;36mRunning OpenRCT2 tests...\033[0m"
|
||||||
|
ctest --output-on-failure
|
||||||
|
fi
|
||||||
|
|
|
@ -50,7 +50,7 @@ fi
|
||||||
realpath() {
|
realpath() {
|
||||||
[[ $1 = /* ]] && echo "$1" || echo "$(pwd)/${1#./}"
|
[[ $1 = /* ]] && echo "$1" || echo "$(pwd)/${1#./}"
|
||||||
}
|
}
|
||||||
scriptsdir="$(realpath `dirname ${BASH_SOURCE[0]}`)"
|
scriptsdir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||||
export PATH="$scriptsdir:$PATH"
|
export PATH="$scriptsdir:$PATH"
|
||||||
|
|
||||||
# Output all the variables
|
# Output all the variables
|
||||||
|
|
Loading…
Reference in New Issue