-
-
Notifications
You must be signed in to change notification settings - Fork 37
66 lines (65 loc) · 3.42 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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
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.tar.gz *.rom
cp rosco_m68k_fw_$(cat "$GITHUB_WORKSPACE/branch.txt")_$(cat "$GITHUB_WORKSPACE/stamp.txt")_mainboard_2.x.tar.gz "$GITHUB_WORKSPACE/artifacts"
- name: Build firmware - r2 Flash
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_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/