Update Toolchain.md #239
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Build on PR | |
on: | |
pull_request: | |
branches-ignore: | |
- 'master' | |
- 'release/*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: roscopeco/rosco_m68k:latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
with: | |
submodules: recursive | |
- name: Hack GITHUB_WORKSPACE 🥷 | |
run: | | |
sudo chown -R linuxbrew "$GITHUB_WORKSPACE" | |
- name: Generate build stamp & artifact output | |
run: | | |
date +%Y%m%d_%H%M%S > "$GITHUB_WORKSPACE/stamp.txt" | |
git rev-parse --short HEAD > "$GITHUB_WORKSPACE/branch.txt" | |
mkdir "$GITHUB_WORKSPACE/artifacts" | |
- name: Build software & install libs | |
run: | | |
cd code/software/libs | |
make clean install | |
cd .. | |
tar czf rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_stdlibs.tar.gz libs | |
cp rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_stdlibs.tar.gz "$GITHUB_WORKSPACE/artifacts" | |
make clean all | |
- name: Build firmware - r2 Base (SST39SF040) | |
run: | | |
cd code/firmware/rosco_m68k_firmware | |
make clean all test | |
tar czf rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x_sst39sf040.tar.gz *.rom | |
cp rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x_sst39sf040.tar.gz "$GITHUB_WORKSPACE/artifacts" | |
- name: Build firmware - r2 Flash (SST39SF040) | |
run: | | |
cd code/software/updateflash | |
ROM_BIN=../../firmware/rosco_m68k_firmware/rosco_m68k.rom make clean all | |
cp updateflash.bin "$GITHUB_WORKSPACE"/artifacts/rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x_sst39sf040_flash.bin | |
- name: Build firmware - r2 512K (SST39SF020) | |
run: | | |
cd code/firmware/rosco_m68k_firmware | |
ROMDEVICE=SST39SF020A make clean all test | |
tar czf rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x_sst39sf020.tar.gz *.rom | |
cp rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x_sst39sf020.tar.gz "$GITHUB_WORKSPACE/artifacts" | |
- name: Build firmware - r2 Flash (SST39SF020) | |
run: | | |
cd code/software/updateflash | |
ROM_BIN=../../firmware/rosco_m68k_firmware/rosco_m68k.rom make clean all | |
cp updateflash.bin "$GITHUB_WORKSPACE"/artifacts/rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x_sst39sf020_flash.bin | |
- name: Build firmware - r2 256K (SST39SF010) | |
run: | | |
cd code/firmware/rosco_m68k_firmware | |
ROMDEVICE=SST39SF010A make clean all test | |
tar czf rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x_sst39sf010.tar.gz *.rom | |
cp rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x_sst39sf010.tar.gz "$GITHUB_WORKSPACE/artifacts" | |
- name: Build firmware - r2 Flash (SST39SF010) | |
run: | | |
cd code/software/updateflash | |
ROM_BIN=../../firmware/rosco_m68k_firmware/rosco_m68k.rom make clean all | |
cp updateflash.bin "$GITHUB_WORKSPACE"/artifacts/rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x_sst39sf010_flash.bin | |
- name: Build firmware - r2 MAME | |
run: | | |
cd code/firmware/rosco_m68k_firmware | |
MAME=true make clean all mame | |
tar czf rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x_mame.tar.gz rosco_m68k.rom rosco_m68k_mame.rom.bin | |
cp rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x_mame.tar.gz "$GITHUB_WORKSPACE/artifacts" | |
- name: Build firmware - r1 Big | |
run: | | |
cd code/firmware/rosco_m68k_firmware | |
REVISION1X=true HUGEROM=false make clean all | |
tar czf rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_1.x_64kb.tar.gz *.rom | |
cp rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_1.x_64kb.tar.gz "$GITHUB_WORKSPACE/artifacts" | |
- name: Build firmware - r1 Huge | |
run: | | |
cd code/firmware/rosco_m68k_firmware | |
REVISION1X=true HUGEROM=true make clean all | |
tar czf rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_1.x_hugerom.tar.gz *.rom | |
cp rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_1.x_hugerom.tar.gz "$GITHUB_WORKSPACE/artifacts" | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-snapshots | |
path: artifacts/ | |