mirror of
https://github.com/ApfelTeeSaft/vanilla.git
synced 2026-09-03 04:13:43 +00:00
93 lines
3.1 KiB
YAML
93 lines
3.1 KiB
YAML
name: Build
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'README.md'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'README.md'
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
- os: linux
|
|
arch: x86_64
|
|
artifact: vanilla-linux-x86_64.tar.gz
|
|
- os: linux
|
|
arch: aarch64
|
|
artifact: vanilla-linux-aarch64.tar.gz
|
|
- os: windows
|
|
arch: x86_64
|
|
artifact: vanilla-windows-x86_64.zip
|
|
- os: android
|
|
arch: universal
|
|
artifact: vanilla-android-universal.apk
|
|
- os: macos
|
|
arch: universal
|
|
artifact: vanilla-macos-universal.zip
|
|
- os: raspberrypi0w
|
|
arch: armv6l
|
|
artifact: vanilla-raspberrypi0w-image.zip
|
|
- os: raspberrypizero2w
|
|
arch: aarch64
|
|
artifact: vanilla-raspberrypizero2w-image.zip
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install dependencies for cross-compiling
|
|
if: ${{ matrix.platform.arch != 'x86_64' && matrix.platform.os == 'linux' }}
|
|
run: sudo apt -y update && sudo apt -y install qemu-user-static binfmt-support
|
|
|
|
- name: Restore Docker cache
|
|
uses: actions/cache@v4
|
|
id: cache
|
|
with:
|
|
path: /var/lib/docker/overlay2
|
|
key: ${{ matrix.platform.os }}-${{ matrix.platform.arch }}
|
|
|
|
- name: Build Docker image
|
|
run: |
|
|
cd docker/${{ matrix.platform.os }}
|
|
docker build --build-arg ARCH=${{ matrix.platform.arch }} -t vanilla-${{ matrix.platform.os }}-${{ matrix.platform.arch }} .
|
|
|
|
- name: Run Docker container
|
|
run: |
|
|
docker run -v "${{ github.workspace }}:/vanilla" -v "${{ github.workspace }}/build:/install" -e ANDROID_SIGNING_KEY=${{ secrets.ANDROID_SIGNING_KEY }} vanilla-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
|
|
|
|
- name: Archive (Linux)
|
|
if: ${{ matrix.platform.os == 'linux' }}
|
|
run: |
|
|
tar czf ${{ matrix.platform.artifact }} -C "${{ github.workspace }}/build" .
|
|
|
|
- name: Archive (Windows/macOS/Raspberry Pi)
|
|
if: ${{ matrix.platform.os == 'windows' || matrix.platform.os == 'macos' || matrix.platform.os == 'raspberrypi0w' || matrix.platform.os == 'raspberrypizero2w' }}
|
|
run: |
|
|
cd build
|
|
zip -r ../${{ matrix.platform.artifact }} .
|
|
|
|
- name: Archive (Android)
|
|
if: ${{ matrix.platform.os == 'android' }}
|
|
run: |
|
|
cp build/app-release.apk ${{ matrix.platform.artifact }}
|
|
|
|
- name: Upload a Build Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.platform.os }} ${{ matrix.platform.arch }}
|
|
path: ${{ matrix.platform.artifact }}
|
|
|
|
- name: Upload Continuous Release
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'vanilla-wiiu/vanilla' }}
|
|
shell: bash
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
curl -fLOSs --retry 2 --retry-delay 60 https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
|
bash upload.sh ${{ matrix.platform.artifact }}
|
|
|