Skip to content

Commit a2f192d

Browse files
committed
github: add basic CI tests
1 parent 29244b7 commit a2f192d

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/test.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build and test libucontext
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- arch: x86
14+
platform: linux/386
15+
image: alpine:latest
16+
- arch: x86_64
17+
platform: linux/amd64
18+
image: alpine:latest
19+
- arch: ppc64le
20+
platform: linux/ppc64le
21+
image: alpine:latest
22+
- arch: armv7
23+
platform: linux/arm/v7
24+
image: alpine:latest
25+
- arch: aarch64
26+
platform: linux/arm64
27+
image: alpine:latest
28+
- arch: riscv64
29+
platform: linux/riscv64
30+
image: alpine:latest
31+
- arch: s390x
32+
platform: linux/s390x
33+
image: alpine:latest
34+
# Blocked by https://github.com/tonistiigi/binfmt/issues/133
35+
# - arch: loongarch64
36+
# platform: linux/loong64
37+
# image: registry.alpinelinux.org/alpine:latest
38+
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v6
42+
43+
- name: Set up QEMU user emulation
44+
uses: docker/setup-qemu-action@v3
45+
with:
46+
platforms: all
47+
48+
- name: Build and run tests using Docker
49+
run: |
50+
docker run --rm \
51+
--platform=${{matrix.platform}} \
52+
-v "$PWD:/work" \
53+
-w /work \
54+
${{matrix.image}} \
55+
sh -lc '
56+
apk add build-base
57+
make check ARCH=${{matrix.arch}}
58+
'

0 commit comments

Comments
 (0)