mirror of https://github.com/OpenRCT2/OpenRCT2.git
ci.yml: Make windows-mingw and linux-portable into matrix
Artifact name improvements had to be bunched in here. Change build configuration to Release.
This commit is contained in:
parent
87de1971d9
commit
58cd2e2609
|
@ -77,47 +77,42 @@ jobs:
|
||||||
echo 'Not going to push build'
|
echo 'Not going to push build'
|
||||||
fi
|
fi
|
||||||
windows-mingw:
|
windows-mingw:
|
||||||
name: Windows (win32) using mingw
|
name: Windows (${{ matrix.platform_name }}) using mingw
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [check-code-formatting]
|
|
||||||
container:
|
|
||||||
image: openrct2/openrct2-build:0.3.1-mingw
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: ccache
|
|
||||||
uses: hendrikmuhs/ccache-action@v1
|
|
||||||
with:
|
|
||||||
key: windows-mingw
|
|
||||||
- name: Build OpenRCT2
|
|
||||||
run: |
|
|
||||||
sudo su
|
|
||||||
mkdir bin && cd bin
|
|
||||||
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DCMAKE_BUILD_TYPE=MinSizeRel -DDISABLE_IPO=on -DFORCE32=on -DBUILD_SHARED_LIBS=ON -DENABLE_SCRIPTING=OFF
|
|
||||||
ninja -k0
|
|
||||||
windows-mingw-nt51:
|
|
||||||
name: Windows (win32, WinNT5.1) using mingw
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: check-code-formatting
|
needs: check-code-formatting
|
||||||
container:
|
container:
|
||||||
image: openrct2/openrct2-build:0.3.1-mingw
|
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
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
with:
|
with:
|
||||||
key: windows-mingw-nt51
|
key: ${{ matrix.cache_key }}
|
||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
run: |
|
run: |
|
||||||
sudo su
|
sudo su
|
||||||
mkdir bin && cd bin
|
mkdir bin && cd bin
|
||||||
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DCMAKE_BUILD_TYPE=MinSizeRel -DDISABLE_IPO=on -DDISABLE_HTTP=Off -DFORCE32=on -DENABLE_SCRIPTING=ON -DCMAKE_CXX_FLAGS="-Wno-error=cast-function-type -Wno-error=unused-function" -DSTATIC=on -DMINGW_TARGET_NT5_1=ON
|
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DCMAKE_BUILD_TYPE=Release -DDISABLE_IPO=on -DFORCE32=on ${{ matrix.build_flags }}
|
||||||
ninja -k0
|
ninja -k0
|
||||||
- name: Upload artifacts (CI)
|
- name: Upload artifacts (CI)
|
||||||
|
if: matrix.platform == 'NT5.1'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: "OpenRCT2-NT5.1"
|
name: OpenRCT2-${{ matrix.platform }}
|
||||||
path: bin/openrct2.exe
|
path: bin/openrct2.exe
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
macos-xcode:
|
macos-xcode:
|
||||||
|
@ -182,62 +177,41 @@ jobs:
|
||||||
path: artifacts/openrct2-macos.zip
|
path: artifacts/openrct2-macos.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
linux-portable:
|
linux-portable:
|
||||||
name: Linux (x64, portable)
|
name: Linux (${{ matrix.platform }}, portable)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: check-code-formatting
|
needs: check-code-formatting
|
||||||
container:
|
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
|
image: openrct2/openrct2-build:0.3.1-bionic
|
||||||
steps:
|
cache_key: linux-portable
|
||||||
- name: Checkout
|
build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz"
|
||||||
uses: actions/checkout@v1
|
- platform: i686
|
||||||
- name: ccache
|
|
||||||
uses: hendrikmuhs/ccache-action@v1
|
|
||||||
with:
|
|
||||||
key: linux-portable
|
|
||||||
- name: Get pre-reqs
|
|
||||||
run: . scripts/setenv && get-discord-rpc
|
|
||||||
- name: Build OpenRCT2
|
|
||||||
run: . scripts/setenv -q && build -DWITH_TESTS=on -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=ON -DPORTABLE=ON -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz"
|
|
||||||
- name: Build artifacts
|
|
||||||
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
|
|
||||||
run: . scripts/setenv -q && run-tests
|
|
||||||
- name: Upload artifacts (openrct2.org)
|
|
||||||
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
|
|
||||||
needs: [check-code-formatting]
|
|
||||||
container:
|
|
||||||
image: openrct2/openrct2-build:0.3.1-bionic32
|
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:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
with:
|
with:
|
||||||
key: linux-portable-32
|
key: ${{ matrix.cache_key }}
|
||||||
- name: Get pre-reqs
|
- name: Get pre-reqs
|
||||||
run: . scripts/setenv && get-discord-rpc
|
run: . scripts/setenv && get-discord-rpc
|
||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
run: . scripts/setenv -q && build -DWITH_TESTS=on -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=ON -DPORTABLE=ON -DFORCE32=ON -DENABLE_SCRIPTING=OFF -DCMAKE_CXX_FLAGS="-m32 -gz"
|
run: . scripts/setenv -q && build -DWITH_TESTS=on -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPORTABLE=ON ${{ matrix.build_flags }}
|
||||||
- name: Build artifacts
|
- name: Build artifacts
|
||||||
run: . scripts/setenv -q && build-portable artifacts/OpenRCT2-Linux-i686.tar.gz bin/install/usr
|
run: . scripts/setenv -q && build-portable artifacts/OpenRCT2-${{ runner.os }}-${{ matrix.platform }}.tar.gz bin/install/usr
|
||||||
- name: Upload artifacts (CI)
|
- name: Upload artifacts (CI)
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: "OpenRCT2-Linux-i686"
|
name: OpenRCT2-${{ runner.os }}-${{ matrix.platform }}
|
||||||
path: artifacts
|
path: artifacts
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
|
@ -246,7 +220,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
. scripts/setenv -q
|
. scripts/setenv -q
|
||||||
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
||||||
upload-build artifacts/OpenRCT2-Linux-i686.tar.gz linux-i686 $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
upload-build artifacts/OpenRCT2-${{ runner.os }}-${{ matrix.platform }}.tar.gz linux-${{ matrix.platform }} $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
||||||
else
|
else
|
||||||
echo 'Not going to push build'
|
echo 'Not going to push build'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue