Optimize Github workflow (#429)

This commit is contained in:
bladeoner 2022-01-09 17:42:08 +01:00 committed by GitHub
parent ae40abc11e
commit ef34ffa7b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,9 @@ jobs:
build: build:
name: Build VBA GX name: Build VBA GX
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
strategy:
matrix:
image: ["Wii", "GameCube"]
container: devkitpro/devkitppc:latest container: devkitpro/devkitppc:latest
steps: steps:
@ -13,31 +16,44 @@ jobs:
with: with:
submodules: true submodules: true
- name: Build - name: Build Wii
if: ${{ matrix.image == 'Wii' }}
run: | run: |
make -j2 make -f Makefile.wii -j2
- name: Copy files - name: Copy Wii artifact
if: ${{ matrix.image == 'Wii' }}
run: | run: |
mkdir -p dist/VisualBoyAdvanceGX/apps/vbagx mkdir -p dist/VisualBoyAdvanceGX/apps/vbagx
mkdir -p dist/VisualBoyAdvanceGX/vbagx/roms mkdir -p dist/VisualBoyAdvanceGX/vbagx/roms
mkdir dist/VisualBoyAdvanceGX/vbagx/saves mkdir dist/VisualBoyAdvanceGX/vbagx/saves
mkdir dist/VisualBoyAdvanceGX-GameCube/
touch dist/VisualBoyAdvanceGX/vbagx/roms/romsdir touch dist/VisualBoyAdvanceGX/vbagx/roms/romsdir
touch dist/VisualBoyAdvanceGX/vbagx/saves/savesdir touch dist/VisualBoyAdvanceGX/vbagx/saves/savesdir
cp hbc/* dist/VisualBoyAdvanceGX/apps/vbagx/ cp hbc/* dist/VisualBoyAdvanceGX/apps/vbagx/
cp executables/vbagx-wii.dol dist/VisualBoyAdvanceGX/apps/vbagx/boot.dol cp executables/vbagx-wii.dol dist/VisualBoyAdvanceGX/apps/vbagx/boot.dol
cp executables/vbagx-gc.dol dist/VisualBoyAdvanceGX-GameCube/
- name: Upload Wii Build Artifacts - name: Upload Wii artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
if: ${{ matrix.image == 'Wii' }}
with: with:
name: VisualBoyAdvanceGX name: VisualBoyAdvanceGX
path: | path: |
dist/VisualBoyAdvanceGX/ dist/VisualBoyAdvanceGX/
- 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/
- name: Upload GameCube Build Artifacts - name: Upload GameCube artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
if: ${{ matrix.image == 'GameCube' }}
with: with:
name: VisualBoyAdvanceGX-GameCube name: VisualBoyAdvanceGX-GameCube
path: | path: |