-
Notifications
You must be signed in to change notification settings - Fork 0
164 lines (135 loc) · 3.95 KB
/
test.yaml
File metadata and controls
164 lines (135 loc) · 3.95 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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: Test
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:
inputs:
logLevel:
description: Log Level
default: info
type: choice
options:
- debug
- error
- fatal
- info
- panic
- warning
environment:
description: Environment
default: test
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install mise
run: |
curl https://mise.run | sh
mise settings experimental=true
- name: Trust workspace
run: mise trust
- name: Install dependencies
run: mise exec -- mise install
- name: Configure project
run: mise exec -- make configure
- name: Run formatting checks
run: mise exec -- make format
- name: Run lint
run: mise exec -- make lint
- name: Run static analysis
run: mise exec -- make check
- name: Build project
run: mise exec -- make build
- name: Run tests
run: mise exec -- make test
test-amd64:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- platform: linux/amd64
dockerfile: Dockerfile.amd64
tag: tinyclib:amd64
test: amd64
steps:
- name: Docker Setup QEMU
if: matrix.platform != 'linux/amd64'
uses: docker/setup-qemu-action@v4 # v4 - latest as of 2026-03-21
with:
platforms: all
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v4 # v4 - latest as of 2026-03-21
- name: Checkout code
uses: actions/checkout@v6
- name: Create Buildx
run: |
docker buildx create --name tests --use
docker buildx inspect --bootstrap
- name: Build images
run: |
docker images
docker buildx ls --no-trunc
docker buildx build --platform ${{ matrix.platform }} -f scripts/tests/docker/${{ matrix.dockerfile }} -t ${{ matrix.tag }} . --load
docker images
- name: Test
run: |
for platform in ${{ matrix.platform }}; do
for tag in ${{ matrix.tag }}; do
echo "Running container for platform: $platform, tag: $tag"
docker run --platform $platform $tag
done
done
test-arm64:
needs: test
runs-on: ubuntu-24.04-arm
strategy:
matrix:
include:
- platform: linux/arm64
dockerfile: Dockerfile.arm64
tag: tinyclib:arm64
test: arm64
- platform: linux/arm/v6
dockerfile: Dockerfile.armv6
tag: tinyclib:armv6
test: armv6
- platform: linux/arm/v7
dockerfile: Dockerfile.armv7
tag: tinyclib:armv7
test: armv7
- platform: linux/arm64/v8
dockerfile: Dockerfile.armv8
tag: tinyclib:armv8
test: armv8
steps:
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v4 # v4 - latest as of 2026-03-21
- name: Checkout code
uses: actions/checkout@v6
- name: Create Buildx
run: |
docker buildx create --name tests --use
docker buildx inspect --bootstrap
- name: Build images
run: |
docker images
docker buildx ls --no-trunc
docker buildx build --platform ${{ matrix.platform }} -f scripts/tests/docker/${{ matrix.dockerfile }} -t ${{ matrix.tag }} . --load
docker images
- name: Test
run: |
for platform in ${{ matrix.platform }}; do
for tag in ${{ matrix.tag }}; do
echo "Running container for platform: $platform, tag: $tag"
docker run --platform $platform $tag
done
done