-
Notifications
You must be signed in to change notification settings - Fork 4
107 lines (96 loc) · 3.08 KB
/
ci.yaml
File metadata and controls
107 lines (96 loc) · 3.08 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
name: Multi-Arch CI Pipeline
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
spell-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for Typos
uses: codespell-project/actions-codespell@v2
with:
ignore_words_list: "mpsc,daking,hdr"
skip: "./.git,./out,./build"
# Linux (x86_64 & ARM64)
build-linux:
needs: spell-check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
preset: [
"linux-clang-relwithstack-asan",
"linux-clang-relwithstack-tsan",
"linux-gcc-release",
"linux-clang-release"
]
exclude:
- arch: arm64
preset: "linux-clang-relwithstack-asan"
- arch: arm64
preset: "linux-clang-relwithstack-tsan"
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: matrix.arch == 'arm64'
uses: docker/setup-qemu-action@v3
- name: "[x64] Install Tools & Build"
if: matrix.arch == 'x64'
run: |
sudo apt-get update && sudo apt-get install -y ninja-build clang g++
cmake --preset ${{ matrix.preset }}
cmake --build --preset ${{ matrix.preset }}
cd out/build/${{ matrix.preset }}
./mpsc_tests
./mpsc_log_system_example
./mpsc_command_dispatcher_example
- name: "[arm64] Build and Test in Container"
if: matrix.arch == 'arm64'
run: |
docker run --rm --platform linux/arm64/v8 \
-v ${{ github.workspace }}:/src \
-w /src \
-e DEBIAN_FRONTEND=noninteractive \
-e ASAN_OPTIONS='halt_on_error=1' \
-e TSAN_OPTIONS='halt_on_error=1' \
arm64v8/ubuntu:24.04 /bin/bash -c "
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
ninja-build \
clang \
cmake && \
cmake --version && \
cmake --preset ${{ matrix.preset }} && \
cmake --build --preset ${{ matrix.preset }} && \
cd out/build/${{ matrix.preset }} && \
echo '>>> Running ARM64 Tests' && \
./mpsc_tests && \
./mpsc_log_system_example && \
./mpsc_command_dispatcher_example
"
# MSVC (x86_64)
build-windows:
needs: spell-check
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Install Ninja
run: choco install ninja
- name: Configure and Build
run: |
cmake --preset msvc-x64-release
cmake --build --preset msvc-x64-release
- name: Run Tests
shell: pwsh
run: |
cd out/build/msvc-x64-release
./mpsc_tests.exe
./mpsc_log_system_example.exe
./mpsc_command_dispatcher_example.exe