-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (107 loc) · 3.14 KB
/
ci.yml
File metadata and controls
129 lines (107 loc) · 3.14 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
name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
compiler: gcc
cxx: g++
cc: gcc
name: "Linux x64 GCC"
- os: ubuntu-latest
compiler: clang
cxx: clang++
cc: clang
name: "Linux x64 Clang"
- os: windows-latest
compiler: msvc
name: "Windows x64 MSVC"
- os: macos-13
compiler: appleclang
cxx: clang++
cc: clang
name: "macOS x64 AppleClang"
- os: macos-latest
compiler: appleclang
cxx: clang++
cc: clang
name: "macOS ARM64 AppleClang"
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Configure (Unix)
if: matrix.compiler != 'msvc'
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DBITCAL_BUILD_TESTS=ON \
-DBITCAL_BUILD_EXAMPLES=ON \
-DBITCAL_NATIVE_ARCH=ON
- name: Configure (MSVC)
if: matrix.compiler == 'msvc'
shell: pwsh
run: |
cmake -S . -B build `
-DBITCAL_BUILD_TESTS=ON `
-DBITCAL_BUILD_EXAMPLES=ON `
-DBITCAL_NATIVE_ARCH=ON
- name: Build
run: cmake --build build --config Release
- name: Test
run: ctest --test-dir build --output-on-failure -C Release
build-arm64:
name: "Linux ARM64 (cross-compile)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install ARM64 toolchain
run: |
sudo apt-get update
sudo apt-get install -y g++-aarch64-linux-gnu
- name: Configure
run: |
cmake -S . -B build \
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
-DCMAKE_BUILD_TYPE=Release \
-DBITCAL_BUILD_TESTS=ON \
-DBITCAL_BUILD_EXAMPLES=ON \
-DBITCAL_NATIVE_ARCH=OFF
- name: Build
run: cmake --build build --config Release
build-arm32:
name: "Linux ARM32 (cross-compile)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install ARM32 toolchain
run: |
sudo apt-get update
sudo apt-get install -y g++-arm-linux-gnueabihf
- name: Configure
run: |
cmake -S . -B build \
-DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \
-DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc \
-DCMAKE_BUILD_TYPE=Release \
-DBITCAL_BUILD_TESTS=ON \
-DBITCAL_BUILD_EXAMPLES=ON \
-DBITCAL_NATIVE_ARCH=OFF
- name: Build
run: cmake --build build --config Release