mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-28 13:02:13 +01:00
126 lines
3.6 KiB
YAML
126 lines
3.6 KiB
YAML
name: Build & Deploy Engine
|
|
on: [push, pull_request]
|
|
jobs:
|
|
# cleanup:
|
|
# runs-on: self-hosted
|
|
# steps:
|
|
# - name: Cleanup
|
|
# run: rm -rf .* || true
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
continue-on-error: true
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-20.04
|
|
targetos: linux
|
|
targetarch: amd64
|
|
- os: ubuntu-20.04
|
|
targetos: linux
|
|
targetarch: i386
|
|
# - os: ubuntu-aarch64-20.04
|
|
# targetos: linux
|
|
# targetarch: aarch64
|
|
|
|
# - os: ubuntu-20.04
|
|
# targetos: android
|
|
# targetarch: 32
|
|
# - os: ubuntu-20.04
|
|
# targetos: android
|
|
# targetarch: 64
|
|
|
|
# - os: ubuntu-20.04
|
|
# targetos: motomagx
|
|
# targetarch: armv6
|
|
|
|
- os: ubuntu-20.04
|
|
targetos: nswitch
|
|
targetarch: arm64
|
|
- os: ubuntu-20.04
|
|
targetos: psvita
|
|
targetarch: armv7hf
|
|
- os: windows-latest
|
|
targetos: win32
|
|
targetarch: amd64
|
|
- os: windows-latest
|
|
targetos: win32
|
|
targetarch: i386
|
|
env:
|
|
SDL_VERSION: 2.26.2
|
|
GH_CPU_ARCH: ${{ matrix.targetarch }}
|
|
ANDROID_SDK_TOOLS_VER: 4333796
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: Install dependencies
|
|
run: bash scripts/gha/deps_${{ matrix.targetos }}.sh
|
|
- name: Build engine
|
|
run: bash scripts/gha/build_${{ matrix.targetos }}.sh
|
|
- name: Upload engine (artifacts)
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
|
|
path: artifacts/*
|
|
flatpak:
|
|
name: "Flatpak"
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- app: su.xash.Engine.Compat.i386
|
|
container:
|
|
image: bilelmoussaoui/flatpak-github-actions:freedesktop-22.08
|
|
options: --privileged
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: Build flatpak (Compat.i386)
|
|
uses: FWGS/flatpak-github-actions/flatpak-builder@v5
|
|
with:
|
|
bundle: ${{ matrix.app }}.flatpak
|
|
manifest-path: scripts/flatpak/${{ matrix.app }}.yml
|
|
- name: Upload engine (artifacts)
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
|
|
path: artifacts/*
|
|
release:
|
|
name: "Upload releases"
|
|
runs-on: ubuntu-latest
|
|
needs: [build, flatpak]
|
|
if: ${{ github.event_name == 'push' }}
|
|
steps:
|
|
- name: Fetch artifacts
|
|
uses: actions/download-artifact@v3.0.1
|
|
with:
|
|
path: artifacts/
|
|
- name: Repackage binaries
|
|
run: |
|
|
cd artifacts/
|
|
for i in artifact-* su.xash.Engine.*; do
|
|
mv "$i"/* .
|
|
rm -rf "$i"
|
|
done
|
|
ls -R .
|
|
cd ../
|
|
- name: Remove old release
|
|
uses: FWGS/delete-tag-and-release@v0.2.1-dev
|
|
with:
|
|
tag_name: ${{ github.ref_name == 'master' && 'continuous' || format('continuous-{0}', github.ref_name) }}
|
|
delete_release: true
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Upload new release
|
|
uses: FWGS/upload-release-action@2.5.1
|
|
with:
|
|
release_name: Xash3D FWGS Continuous ${{ github.ref_name }} Build
|
|
tag: ${{ github.ref_name == 'master' && 'continuous' || format('continuous-{0}', github.ref_name) }}
|
|
prerelease: true
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
file_glob: true
|
|
file: artifacts/*
|