-
Notifications
You must be signed in to change notification settings - Fork 21
57 lines (57 loc) · 1.84 KB
/
Copy pathtest.yml
File metadata and controls
57 lines (57 loc) · 1.84 KB
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
name: test
on:
pull_request:
push:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
name: linting
steps:
- name: Checkout
uses: actions/checkout@v4
- name: shellcheck
run: shellcheck builder.sh
testnix:
runs-on: ubuntu-24.04
name: test nix builds
strategy:
matrix:
example: ["x86_64", "x86_64-snapshot", "rpi4", "glinet-gl-ar750", "glinet-gl-mt300n-v2", "nexx-wt3020", "rpi2", "wrt1043nd"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: test build example
run: |
sh <(curl -L https://nixos.org/nix/install) --no-daemon
. $HOME/.nix-profile/etc/profile.d/nix.sh
mkdir -p output
time ./builder.sh build example-${{ matrix.example }}.conf --nix
- name: check artefacts
run: |
./.test/run_all.sh example-${{ matrix.example }}.conf output/
testcontainer:
runs-on: ubuntu-24.04
name: test container builds
strategy:
matrix:
example: ["x86_64", "x86_64-snapshot", "rpi4", "glinet-gl-ar750", "glinet-gl-mt300n-v2", "nexx-wt3020", "rpi2", "wrt1043nd"]
option: ["--docker --sudo", "--podman", "--podman --sudo"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: test build example
run: |
if [[ "${{ matrix.option }}" =~ "podman" ]]; then
sudo apt-get -y update
sudo apt-get -y install podman
fi
mkdir -p output
time ./builder.sh build-docker-image \
example-${{ matrix.example }}.conf ${{ matrix.option }} &&\
time ./builder.sh build \
example-${{ matrix.example }}.conf ${{ matrix.option }}
- name: check artefacts
run: |
./.test/run_all.sh example-${{ matrix.example }}.conf output/