mirror of
https://github.com/pret/pokeheartgold.git
synced 2026-06-01 05:01:11 -05:00
144 lines
3.7 KiB
YAML
144 lines
3.7 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
LM_LICENSE_FILE: "$GITHUB_WORKSPACE/tools/mwccarm/license.dat"
|
|
CC: gcc-10
|
|
CXX: g++-10
|
|
CALCROM_DISCORD_WEBHOOK_AVATAR_URL: "https://i.imgur.com/38BQHdd.png"
|
|
CALCROM_DISCORD_WEBHOOK_USERNAME: OK
|
|
CALCROM_WEBHOOK_URL: ${{ secrets.WEBHOOKURL }}
|
|
|
|
jobs:
|
|
build-heartgold:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build ROM
|
|
env:
|
|
GAME_VERSION: HEARTGOLD
|
|
GAME_LANGUAGE: ENGLISH
|
|
GAME_REVISION: 0
|
|
NONMATCHING: 0
|
|
COMPARE: 1
|
|
BUILD_OUT: build/heartgold.us/
|
|
uses: ./.github/workflows/build-rom
|
|
|
|
build-soulsilver:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build ROM
|
|
env:
|
|
GAME_VERSION: SOULSILVER
|
|
GAME_LANGUAGE: ENGLISH
|
|
GAME_REVISION: 0
|
|
NONMATCHING: 0
|
|
COMPARE: 1
|
|
BUILD_OUT: build/soulsilver.us/
|
|
uses: ./.github/workflows/build-rom
|
|
|
|
build-nonmatching-heartgold:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build ROM
|
|
env:
|
|
GAME_VERSION: HEARTGOLD
|
|
GAME_LANGUAGE: ENGLISH
|
|
GAME_REVISION: 0
|
|
NONMATCHING: 1
|
|
COMPARE: 0
|
|
uses: ./.github/workflows/build-rom
|
|
|
|
build-nonmatching-soulsilver:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build ROM
|
|
env:
|
|
GAME_VERSION: SOULSILVER
|
|
GAME_LANGUAGE: ENGLISH
|
|
GAME_REVISION: 0
|
|
NONMATCHING: 1
|
|
COMPARE: 0
|
|
uses: ./.github/workflows/build-rom
|
|
|
|
post-merge:
|
|
runs-on: ubuntu-22.04
|
|
if: |
|
|
always() &&
|
|
(github.event_name == 'push') &&
|
|
contains(join(needs.*.result, ','), 'success')
|
|
needs: [build-heartgold, build-soulsilver, build-nonmatching-heartgold, build-nonmatching-soulsilver]
|
|
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download HeartGold build artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: HEARTGOLD-build
|
|
|
|
- name: Download SoulSilver build/ artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: SOULSILVER-build
|
|
|
|
- name: Extract build artifacts
|
|
run: |
|
|
mkdir HEARTGOLD_build/
|
|
mkdir SOULSILVER_build/
|
|
mkdir -p build/heartgold.us/
|
|
mkdir -p build/soulsilver.us/
|
|
mkdir -p sub/build/
|
|
tar -xzvhf HEARTGOLD_build.tar.gz -C HEARTGOLD_build/
|
|
tar -xzvhf SOULSILVER_build.tar.gz -C SOULSILVER_build/
|
|
cp -r HEARTGOLD_build/build/heartgold.us/ build/
|
|
cp -r SOULSILVER_build/build/soulsilver.us/ build/
|
|
cp -r HEARTGOLD_build/sub/build/ sub/
|
|
|
|
- name: Webhook
|
|
run: |
|
|
sudo chmod 755 $GITHUB_WORKSPACE/.github/calcrom/webhook.sh
|
|
$GITHUB_WORKSPACE/.github/calcrom/webhook.sh pokeheartgold "$CALCROM_WEBHOOK_URL"
|
|
continue-on-error: true
|
|
|
|
- name: Checkout xMAP
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: 'xmap'
|
|
ref: 'xmap'
|
|
|
|
- name: Move xMAP
|
|
run: |
|
|
mkdir -p xmap
|
|
cp build/heartgold.us/*.xMAP xmap/heartgoldus.xMAP
|
|
cp build/soulsilver.us/*.xMAP xmap/soulsilverus.xMAP
|
|
echo "XMAP_COMMIT_MSG=$( git log --format=%s ${GITHUB_SHA} )" >> $GITHUB_ENV
|
|
|
|
- name: Update xMAP
|
|
uses: EndBug/add-and-commit@v9
|
|
with:
|
|
cwd: "./xmap"
|
|
add: "*.xMAP"
|
|
message: ${{ env.XMAP_COMMIT_MSG }}
|