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