2020-07-22 17:21:35 +02:00
|
|
|
name: VBA GX Build
|
2020-07-21 23:11:31 +02:00
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-12-02 17:47:34 +01:00
|
|
|
name: Build
|
2022-02-27 18:57:42 +01:00
|
|
|
runs-on: ubuntu-latest
|
2022-01-09 17:42:08 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
image: ["Wii", "GameCube"]
|
2020-07-21 23:11:31 +02:00
|
|
|
container: devkitpro/devkitppc:latest
|
|
|
|
|
|
|
|
steps:
|
2022-02-25 19:39:07 +01:00
|
|
|
- name: Checkout vbagx repo
|
2022-10-21 17:55:44 +02:00
|
|
|
uses: actions/checkout@v3
|
2020-07-21 23:11:31 +02:00
|
|
|
with:
|
2022-02-27 18:57:42 +01:00
|
|
|
fetch-depth: 0
|
2020-07-21 23:11:31 +02:00
|
|
|
|
2022-01-09 17:42:08 +01:00
|
|
|
- name: Build Wii
|
|
|
|
if: ${{ matrix.image == 'Wii' }}
|
2020-07-21 23:11:31 +02:00
|
|
|
run: |
|
2022-01-09 17:42:08 +01:00
|
|
|
make -f Makefile.wii -j2
|
2020-10-25 17:19:56 +01:00
|
|
|
|
2022-02-07 15:04:15 +01:00
|
|
|
- name: Copy Wii artifacts
|
2022-01-09 17:42:08 +01:00
|
|
|
if: ${{ matrix.image == 'Wii' }}
|
2020-10-25 17:19:56 +01:00
|
|
|
run: |
|
2020-10-25 19:31:39 +01:00
|
|
|
mkdir -p dist/VisualBoyAdvanceGX/apps/vbagx
|
|
|
|
mkdir -p dist/VisualBoyAdvanceGX/vbagx/roms
|
|
|
|
mkdir dist/VisualBoyAdvanceGX/vbagx/saves
|
2020-12-24 19:11:46 +01:00
|
|
|
touch dist/VisualBoyAdvanceGX/vbagx/roms/romsdir
|
|
|
|
touch dist/VisualBoyAdvanceGX/vbagx/saves/savesdir
|
2020-10-25 19:31:39 +01:00
|
|
|
cp hbc/* dist/VisualBoyAdvanceGX/apps/vbagx/
|
|
|
|
cp executables/vbagx-wii.dol dist/VisualBoyAdvanceGX/apps/vbagx/boot.dol
|
2020-07-21 23:11:31 +02:00
|
|
|
|
2022-01-09 17:42:08 +01:00
|
|
|
- name: Upload Wii artifacts
|
2022-10-21 17:55:44 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-01-09 17:42:08 +01:00
|
|
|
if: ${{ matrix.image == 'Wii' }}
|
2020-07-21 23:11:31 +02:00
|
|
|
with:
|
2020-10-25 19:46:10 +01:00
|
|
|
name: VisualBoyAdvanceGX
|
2020-10-25 17:19:56 +01:00
|
|
|
path: |
|
2020-10-25 19:31:39 +01:00
|
|
|
dist/VisualBoyAdvanceGX/
|
2022-01-09 17:42:08 +01:00
|
|
|
|
|
|
|
- name: Build GameCube
|
|
|
|
if: ${{ matrix.image == 'GameCube' }}
|
|
|
|
run: |
|
|
|
|
make -f Makefile.gc -j2
|
|
|
|
|
|
|
|
- name: Copy GameCube artifact
|
|
|
|
if: ${{ matrix.image == 'GameCube' }}
|
|
|
|
run: |
|
|
|
|
mkdir -p dist/VisualBoyAdvanceGX-GameCube
|
|
|
|
cp executables/vbagx-gc.dol dist/VisualBoyAdvanceGX-GameCube/
|
2020-10-25 17:19:56 +01:00
|
|
|
|
2022-01-09 17:42:08 +01:00
|
|
|
- name: Upload GameCube artifact
|
2022-10-21 17:55:44 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-01-09 17:42:08 +01:00
|
|
|
if: ${{ matrix.image == 'GameCube' }}
|
2020-10-25 17:19:56 +01:00
|
|
|
with:
|
2020-10-25 19:46:10 +01:00
|
|
|
name: VisualBoyAdvanceGX-GameCube
|
2020-10-25 17:19:56 +01:00
|
|
|
path: |
|
2020-10-25 19:31:39 +01:00
|
|
|
dist/VisualBoyAdvanceGX-GameCube/
|
2022-12-02 17:47:34 +01:00
|
|
|
|
|
|
|
release:
|
|
|
|
name: Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [build]
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
|
|
|
|
steps:
|
2023-01-06 17:10:05 +01:00
|
|
|
- name: Checkout vbagx repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Download Artifacts
|
|
|
|
uses: actions/download-artifact@v3
|
2022-12-02 17:47:34 +01:00
|
|
|
with:
|
|
|
|
path: dist
|
|
|
|
|
|
|
|
- name: Re-zip artifacts
|
|
|
|
run: |
|
|
|
|
cd dist
|
|
|
|
rm -r VisualBoyAdvanceGX/vbagx/roms/*
|
|
|
|
rm -r VisualBoyAdvanceGX/vbagx/saves/*
|
|
|
|
zip -r VisualBoyAdvanceGX.zip VisualBoyAdvanceGX
|
|
|
|
zip -r VisualBoyAdvanceGX-GameCube.zip VisualBoyAdvanceGX-GameCube
|
|
|
|
|
|
|
|
- name: Update Git Tag
|
|
|
|
run: |
|
|
|
|
git tag -f Pre-release
|
|
|
|
git push -f origin Pre-release
|
|
|
|
|
|
|
|
- name: Create Release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
prerelease: true
|
|
|
|
allowUpdates: true
|
|
|
|
removeArtifacts: true
|
|
|
|
replacesArtifacts: false
|
|
|
|
tag: Pre-release
|
|
|
|
artifacts: "dist/*.zip"
|