-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (46 loc) · 1.47 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
name: Test
on:
workflow_dispatch:
push:
jobs:
build_and_lint:
strategy:
fail-fast: false
matrix:
architecture: [arm, arm64]
runs-on: buildjet-4vcpu-ubuntu-2204-arm
container:
image: ghcr.io/viam-modules/raspberry-pi:${{ matrix.architecture }}
volumes:
# override /__e/node20 on 32-bit because it is 64-bit
- /tmp/node20:/__e${{matrix.architecture != 'arm' && '-armhf' || ''}}/node20
timeout-minutes: 30
steps:
- name: Unbork NodeJS for 32-bit
if: matrix.architecture == 'arm'
run: |
curl -L https://nodejs.org/download/release/v20.18.0/node-v20.18.0-linux-armv7l.tar.xz | tar -xJ -C /__e/node20 --strip-components=1 --overwrite
file /__e/node20/bin/node
/__e/node20/bin/node --version
echo "Node Installed"
- uses: actions/checkout@v3
- name: Verify no uncommitted changes from make lint
run: |
git init
git add .
chown -R testbot:testbot .
sudo -u testbot bash -lc 'make lint'
if [ -n "$GEN_DIFF" ]; then
echo '"make lint" resulted in changes not in git' 1>&2
git status
exit 1
fi
- name: make build
run: |
sudo -u testbot bash -lc 'make'
# test_on_pi:
# # The following steps are run on an external runner "rpibull"
# runs-on: pi-4
# steps:
# - uses: actions/checkout@v3
# - run: make test