Repository navigation
145 lines (122 loc) · 5.36 KB
/
Copy pathci.yml
File metadata and controls
145 lines (122 loc) · 5.36 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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# ── GCC 14 · Linux x86-64 ────────────────────────────────────────
- name: GCC 14 · Linux
os: ubuntu-24.04
cc: gcc-14
cxx: g++-14
# ── Clang 18 · Linux x86-64 (SSE2 path) ─────────────────────────
- name: Clang 18 · Linux
os: ubuntu-24.04
cc: clang-18
cxx: clang++-18
# ── AppleClang · macOS ARM64 (NEON path) ─────────────────────────
- name: AppleClang · macOS ARM64
os: macos-15
# ── MSVC 2022 · Windows x64 ──────────────────────────────────────
# Pin to windows-2022 for stable Visual Studio 2022 availability.
# The configure step below deliberately omits -G so CMake auto-selects
# the best matching generator present on the runner image.
- name: MSVC 2022 · Windows
os: windows-2022
steps:
- uses: actions/checkout@v4
# ── Linux: ensure requested compiler version is installed ─────────────
- name: Install compiler (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -q
sudo apt-get install -y ${{ matrix.cc }} ${{ matrix.cxx }}
# ── CMake configure ───────────────────────────────────────────────────
- name: Configure (Linux)
if: runner.os == 'Linux'
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DPH_BUILD_BENCHMARKS=OFF
- name: Configure (macOS)
if: runner.os == 'macOS'
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DPH_BUILD_BENCHMARKS=OFF
- name: Configure (Windows)
if: runner.os == 'Windows'
# Omit explicit -G so CMake auto-detects the installed Visual Studio on the runner image.
# This is more robust across GitHub-hosted Windows images (windows-2022 / windows-latest).
run: cmake -B build -A x64 -DPH_BUILD_BENCHMARKS=OFF
# ── Build ─────────────────────────────────────────────────────────────
- name: Build
run: cmake --build build --config Release
# ── Test ──────────────────────────────────────────────────────────────
- name: Test
run: ctest --test-dir build -C Release --output-on-failure
# ── Fil-C · Linux x86-64 (memory-safe C++, scalar path) ───────────────────
# Fil-C panics on any out-of-bounds access, so this job checks that the
# library never reads past a key when the SIMD paths are compiled out.
filc:
name: Fil-C · Linux
runs-on: ubuntu-24.04
env:
FILC_VERSION: "0.687"
steps:
- uses: actions/checkout@v4
- name: Install Fil-C
run: |
sudo apt-get update -q
sudo apt-get install -y patchelf
curl -sSfL -o "$RUNNER_TEMP/filc.tar.xz" \
"https://github.com/pizlonator/fil-c/releases/download/v${FILC_VERSION}/filc-${FILC_VERSION}-linux-x86_64.tar.xz"
tar xf "$RUNNER_TEMP/filc.tar.xz" -C "$RUNNER_TEMP"
cd "$RUNNER_TEMP/filc-${FILC_VERSION}-linux-x86_64"
./setup.sh
echo "FILC_BIN=$PWD/build/bin" >> "$GITHUB_ENV"
- name: Configure
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER="$FILC_BIN/filcc" \
-DCMAKE_CXX_COMPILER="$FILC_BIN/fil++" \
-DPH_BUILD_BENCHMARKS=OFF
- name: Build
run: cmake --build build -j 4
- name: Test
run: ctest --test-dir build --output-on-failure
singleheader:
name: Single-header amalgamation
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install compiler
run: |
sudo apt-get update -q
sudo apt-get install -y g++-14
# The release attaches the checked-in header, so it must never be stale.
- name: singleheader/perfect_hash.h is up to date
run: python3 singleheader/amalgamate.py --check --fetch
- name: It compiles against nothing but the standard library
env:
CXX: g++-14
run: python3 tools/test_packaging.py --only dropin
- name: It still works as a CMake dependency
env:
CC: gcc-14
CXX: g++-14
run: python3 tools/test_packaging.py --only fetchcontent find_package