forked from monome/teletype
-
Notifications
You must be signed in to change notification settings - Fork 2
96 lines (94 loc) · 2.8 KB
/
test.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run clang-format
run: |
curl -O https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py
python ./run-clang-format.py -r module simulator src tests --style=file
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install ragel
run: sudo apt install ragel
- name: Run tests
run: |
cd tests
make test-travis
build-simulator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install ragel
run: sudo apt install ragel
- name: Build simulator
run: |
cd simulator
make
build-firmware:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install ragel
run: sudo apt install ragel
- name: Prepare AVR32 toolchain
run: |
mkdir -p toolchain
cd toolchain
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 $GITHUB_WORKSPACE/avr32-tools
chmod u+x $GITHUB_WORKSPACE/avr32-tools/bin/*
echo $GITHUB_WORKSPACE/avr32-tools/bin >> $GITHUB_PATH
unzip avr32-headers-6.2.0.742.zip -d $GITHUB_WORKSPACE/avr32-tools/avr32/include
- name: Build module firmware
run: |
cd module
make
- name: Upload teletype.hex to artifacts
uses: actions/upload-artifact@v2
with:
path: module/teletype.hex
name: teletype.hex
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Setup TinyTeX
uses: r-lib/actions/setup-tinytex@v2
- name: Install dependencies
run: |
sudo apt-get install pandoc
pip install -r utils/requirements.pip
tlmgr install titlesec ulem
fmtutil-sys -all
- name: Build documentation
run: |
cd docs
make
- name: Upload docs to artifacts
uses: actions/upload-artifact@v2
with:
path: docs/teletype.pdf
name: teletype.pdf