-
Notifications
You must be signed in to change notification settings - Fork 9
132 lines (119 loc) · 3.71 KB
/
ci.yml
File metadata and controls
132 lines (119 loc) · 3.71 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
name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '**.md'
- 'docs/**'
- .github/**
- '!.github/workflows/ci.yml'
push:
branches:
- main
paths-ignore:
- '**.md'
- 'docs/**'
- .github/**
- '!.github/workflows/ci.yml'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
# Ubuntu with GCC
- os: ubuntu-22.04
cxx: g++-12
cmake_gen: Ninja
cmake_flags: ""
# Ubuntu with Clang
- os: ubuntu-22.04
cxx: clang++-15
cmake_gen: Ninja
cmake_flags: ""
# Ubuntu ARM
- os: ubuntu-22.04-arm
cxx: g++-12
cmake_gen: Ninja
cmake_flags: ""
# Ubuntu with ASAN (GCC)
- os: ubuntu-22.04
cxx: g++-12
cmake_gen: Ninja
cmake_flags: "-DMERVE_SANITIZE=ON"
name_suffix: " (ASAN)"
# Ubuntu with ASAN (Clang)
- os: ubuntu-22.04
cxx: clang++-15
cmake_gen: Ninja
cmake_flags: "-DMERVE_SANITIZE=ON"
name_suffix: " (ASAN)"
# macOS 14
- os: macos-14
cxx: clang++
cmake_gen: Ninja
cmake_flags: ""
# macOS 15
- os: macos-15
cxx: clang++
cmake_gen: Ninja
cmake_flags: ""
# macOS with ASAN
- os: macos-15
cxx: clang++
cmake_gen: Ninja
cmake_flags: "-DMERVE_SANITIZE=ON"
name_suffix: " (ASAN)"
# Windows
- os: windows-latest
cmake_gen: Visual Studio 17 2022
cmake_arch: x64
cmake_config: Release
cmake_flags: ""
# Ubuntu with simdutf
- os: ubuntu-latest
cxx: g++-13
cmake_gen: Ninja
cmake_flags: "-DMERVE_USE_SIMDUTF=ON"
name_suffix: " (simdutf)"
# Ubuntu with simdutf + ASAN
- os: ubuntu-latest
cxx: g++-13
cmake_gen: Ninja
cmake_flags: "-DMERVE_USE_SIMDUTF=ON -DMERVE_SANITIZE=ON"
name_suffix: " (simdutf, ASAN)"
name: ${{ matrix.os }} ${{ matrix.cxx || 'MSVC' }}${{ matrix.name_suffix || '' }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Ninja (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install ninja-build
- name: Setup Ninja (macOS)
if: startsWith(matrix.os, 'macos')
run: brew install ninja
- name: Configure (Unix)
if: matrix.os != 'windows-latest'
run: cmake -DMERVE_TESTING=ON ${{ matrix.cmake_flags }} -G "${{ matrix.cmake_gen }}" -B build
env:
CXX: ${{ matrix.cxx }}
- name: Configure (Windows)
if: matrix.os == 'windows-latest'
run: cmake -DMERVE_TESTING=ON ${{ matrix.cmake_flags }} -G "${{ matrix.cmake_gen }}" -A ${{ matrix.cmake_arch }} -B build
- name: Build (Unix)
if: matrix.os != 'windows-latest'
run: cmake --build build -j4
- name: Build (Windows)
if: matrix.os == 'windows-latest'
run: cmake --build build --config ${{ matrix.cmake_config }}
- name: Test (Unix)
if: matrix.os != 'windows-latest'
run: ctest --output-on-failure --test-dir build
- name: Test (Windows)
if: matrix.os == 'windows-latest'
run: ctest -C ${{ matrix.cmake_config }} --output-on-failure --test-dir build