forked from X16Community/x16-rom
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 1.79 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
name: ROM Build CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y make build-essential libsdl2-dev
git clone https://github.com/cc65/cc65.git
cd cc65
make -j4
sudo make install
cd ..
git clone https://github.com/emmanuel-marty/lzsa
cd lzsa
make
cp -av lzsa /usr/local/bin
- name: Build ROM
if: startsWith(github.ref, 'refs/tags/r') != true
run: |
make
- name: Build Release ROM
if: startsWith(github.ref, 'refs/tags/r')
run: |
RELEASE_VERSION=$(echo "$GITHUB_REF_NAME" | grep -oP '[0-9]+$') make
- name: Build Test Emulator
run: |
git clone https://github.com/X16Community/x16-emulator.git
cd x16-emulator
git checkout 65c816
make all
- name: Run Unit Tests
run: |
export PATH="$(pwd)/x16-emulator:$PATH"
make test
- name: Archive Build Result
run: |
mkdir artifact
cp build/x16/*.h artifact/.
cp build/x16/*.sym artifact/.
cp build/x16/rom.bin artifact/.
- name: Upload Artifacts (non-release)
if: startsWith(github.ref, 'refs/tags/r') != true
uses: actions/upload-artifact@v3
with:
name: ROM Image
path: artifact
- name: Upload Artifacts (release)
if: startsWith(github.ref, 'refs/tags/r')
uses: actions/upload-artifact@v3
with:
name: Release ROM Image
path: artifact