This repository was archived by the owner on May 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
105 lines (105 loc) · 3.32 KB
/
ci.yaml
File metadata and controls
105 lines (105 loc) · 3.32 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
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
Linux:
name: Linux (${{ matrix.display_platform }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- display_platform: linux/amd64
platform: linux/amd64
runner: ubuntu-24.04
native_platform: linux/amd64
qemu_platforms: ""
run_sanitizers: "true"
- display_platform: linux/arm64
platform: linux/arm64
runner: ubuntu-24.04-arm
native_platform: linux/arm64
qemu_platforms: ""
run_sanitizers: "true"
- display_platform: linux/s390x
platform: linux/s390x
runner: ubuntu-24.04
native_platform: linux/amd64
qemu_platforms: s390x
run_sanitizers: "false"
- display_platform: linux/arm/v7
platform: linux/arm/v7
runner: ubuntu-24.04
native_platform: linux/amd64
qemu_platforms: arm
run_sanitizers: "false"
- display_platform: linux/i386
platform: linux/386
runner: ubuntu-24.04
native_platform: linux/amd64
qemu_platforms: "386"
run_sanitizers: "false"
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Setup QEMU
if: matrix.qemu_platforms != ''
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
with:
platforms: ${{ matrix.qemu_platforms }}
- name: Setup buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Build container
run: |
docker buildx build \
--pull \
--no-cache \
--load \
--platform "${{ matrix.platform }}" \
--build-arg PLATFORM="${{ matrix.platform }}" \
--tag "test" \
.
- name: Test
run: |
docker run \
--platform "${{ matrix.platform }}" \
--privileged \
--cap-add SYS_ADMIN \
--security-opt seccomp:unconfined \
-e NATIVE_PLATFORM="${{ matrix.native_platform }}" \
-e RUN_SANITIZERS="${{ matrix.run_sanitizers }}" \
-v "$(pwd):/workspaces/libgeohex" \
-w "/workspaces/libgeohex" \
-i "test" \
./ci.sh
macOS:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Configure
run: cmake -S . -B build -DBUILD_TESTS=ON
- name: Build
run: cmake --build build --parallel
- name: Test
run: ctest --test-dir build --output-on-failure
Windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Configure
run: cmake -S . -B build -DBUILD_TESTS=ON
- name: Build
run: cmake --build build --config Debug --parallel
- name: Test
run: ctest --test-dir build --build-config Debug --output-on-failure