-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (52 loc) · 1.91 KB
/
build_firmware.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
name: build firmware
# this workflow builds firmware for selected modules
# and uploads compiled firmware as artifacts
# specify modules to build for in the matrix module property below
# possible values are: ansible, teletype, whitewhale, meadowphysics, earthsea
# the workflow has to be triggered manually
# you can configure it to trigger on other events, like push or pull_request:
# on:
# push:
# branches: [main]
# on:
# pull_request:
# types: [opened, reopened]
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
module: [ansible, teletype, whitewhale, meadowphysics, earthsea]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: '0'
- name: restore toolchain
run: |
git clone https://github.com/monome/avr32-toolchain-linux.git deps/avr32-toolchain-linux
cd deps/avr32-toolchain-linux
tar xvfz avr32-gnu-toolchain-3.4.3.820-linux.any.x86_64.tar.gz
mv avr32-gnu-toolchain-linux_x86_64 $HOME/avr32-tools
unzip avr32-headers-6.2.0.742.zip -d $HOME/avr32-tools/avr32/include
- name: build firmware
run: |
PATH="$HOME/avr32-tools/bin:$PATH"
cd monome-euro/multipass/monome_euro/${{matrix.module}}
find ../../../.. -name '*.o' -delete
make
- name: prepare files
id: get_file_name
run: |
HEX_FILE_PATH=`echo monome-euro/multipass/monome_euro/${{matrix.module}}/*.hex "$1"`
HEX_FILE=`basename $HEX_FILE_PATH`
NAMED_FILE=`echo "${HEX_FILE//multipass_/${{github.event.repository.name}}_}"`
echo ::set-output name=named_file::$NAMED_FILE
mv $HEX_FILE_PATH $NAMED_FILE
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.get_file_name.outputs.named_file }}
path: ${{ steps.get_file_name.outputs.named_file }}