-
Notifications
You must be signed in to change notification settings - Fork 46
56 lines (46 loc) · 1.5 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
name: GithubCI
on:
push:
branches: [ master ]
pull_request:
env:
CALCROM_DISCORD_WEBHOOK_USERNAME: ${{ secrets.CALCROM_DISCORD_WEBHOOK_USERNAME }}
CALCROM_DISCORD_WEBHOOK_AVATAR_URL: ${{ secrets.CALCROM_DISCORD_WEBHOOK_AVATAR_URL }}
CALCROM_DISCORD_WEBHOOK_URL: ${{ secrets.CALCROM_DISCORD_WEBHOOK_URL }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
- name: Checkout agbcc
uses: actions/checkout@master
with:
path: agbcc
repository: pret/agbcc
- name: Install xdelta and ARM GCC
run: |
sudo apt-get install xdelta3 gcc-arm-none-eabi binutils-arm-none-eabi
- name: Install agbcc
run: |
./build.sh
./install.sh ../
working-directory: agbcc
- name: Build tools and baserom
run: |
cd $GITHUB_WORKSPACE
make tools
head -c 33554432 /dev/zero > tmp.bin
xdelta3 -d -s tmp.bin baserom.xdelta baserom.gba
rm tmp.bin
- name: Build via Makefile
run: |
make -j${nproc} compare
# only run OK when pushed to master
- name: Run OK webhook
shell: bash
if: ${{ github.event_name == 'push' }}
run: |
sudo chmod 755 $GITHUB_WORKSPACE/.github/calcrom/webhook.sh
$GITHUB_WORKSPACE/.github/calcrom/webhook.sh pmd_red "$CALCROM_DISCORD_WEBHOOK_URL"
continue-on-error: true