Skip to content

Commit 98493f1

Browse files
committed
feat(ci): Add compiling for arm64 on Darwin
1 parent 8c603b0 commit 98493f1

2 files changed

Lines changed: 74 additions & 6 deletions

File tree

.github/workflows/test.yaml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,41 @@ jobs:
3535
run: make test
3636
darwin:
3737
name: ${{ matrix.config.name }}
38-
runs-on: macOS-13
38+
runs-on: ${{ matrix.config.os }}
3939
strategy:
4040
fail-fast: false
4141
matrix:
4242
config:
43-
- name: darwin_gcc_12
43+
- name: darwin_gcc_12_amd64
44+
os: macOS-13
45+
arch: x64
4446
brew_package: gcc@12
4547
cc: /usr/local/opt/gcc@12/bin/gcc-12
4648
cxx: /usr/local/opt/gcc@12/bin/g++-12
47-
- name: darwin_clang_12
49+
- name: darwin_clang_12_amd64
50+
os: macOS-13
51+
arch: x64
4852
brew_package: llvm@12
4953
cc: /usr/local/opt/llvm@12/bin/clang
5054
cxx: /usr/local/opt/llvm@12/bin/clang++
51-
- name: darwin_clang_15
55+
- name: darwin_clang_15_amd64
56+
os: macOS-13
57+
arch: x64
5258
brew_package: llvm@15
5359
cc: /usr/local/opt/llvm@15/bin/clang
5460
cxx: /usr/local/opt/llvm@15/bin/clang++
61+
- name: darwin_gcc_12_arm64
62+
os: macOS-14
63+
arch: arm64
64+
brew_package: gcc@12
65+
cc: /opt/homebrew/opt/gcc@12/bin/gcc-12
66+
cxx: /opt/homebrew/opt/gcc@12/bin/g++-12
67+
- name: darwin_clang_15_arm64
68+
os: macOS-14
69+
arch: arm64
70+
brew_package: llvm@15
71+
cc: /opt/homebrew/opt/llvm@15/bin/clang
72+
cxx: /opt/homebrew/opt/llvm@15/bin/clang++
5573
env:
5674
CC: ${{ matrix.config.cc }}
5775
CXX: ${{ matrix.config.cxx }}
@@ -60,9 +78,9 @@ jobs:
6078
- name: Install
6179
run: brew install ${{ matrix.config.brew_package }}
6280
- name: Build Debug
63-
run: make CMAKE_PRESET=Unix_x64_Debug generate build
81+
run: make CMAKE_PRESET=Unix_${{ matrix.config.arch }}_Debug generate build
6482
- name: Build Release
65-
run: make CMAKE_PRESET=Unix_x64_Release generate build
83+
run: make CMAKE_PRESET=Unix_${{ matrix.config.arch }}_Release generate build
6684
- name: Test
6785
run: make test
6886
windows:

CMakePresets.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,48 @@
105105
"environment": {},
106106
"vendor": {}
107107
},
108+
{
109+
"name": "Unix_arm64_Debug",
110+
"displayName": "Unix arm64 - Debug",
111+
"description": "Unix, Makefile generator, arm64 architecture, Debug build",
112+
"generator": "Unix Makefiles",
113+
"binaryDir": "${sourceDir}/build/Debug",
114+
"architecture": {
115+
"value": "arm64",
116+
"strategy": "external"
117+
},
118+
"cacheVariables": {
119+
"CMAKE_BUILD_TYPE": "Debug",
120+
"FTL_DISABLE_ITERATOR_DEBUG": true,
121+
"FTL_FIBER_CANARY_BYTES": false,
122+
"FTL_FIBER_STACK_GUARD_PAGES": true,
123+
"FTL_WERROR": true,
124+
"FTL_CPP_17": true
125+
},
126+
"environment": {},
127+
"vendor": {}
128+
},
129+
{
130+
"name": "Unix_arm64_Release",
131+
"displayName": "Unix arm64 - Release",
132+
"description": "Unix, Makefile generator, arm64 architecture, Release build",
133+
"generator": "Unix Makefiles",
134+
"binaryDir": "${sourceDir}/build/RelWithDebInfo",
135+
"architecture": {
136+
"value": "arm64",
137+
"strategy": "external"
138+
},
139+
"cacheVariables": {
140+
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
141+
"FTL_DISABLE_ITERATOR_DEBUG": true,
142+
"FTL_FIBER_CANARY_BYTES": false,
143+
"FTL_FIBER_STACK_GUARD_PAGES": true,
144+
"FTL_WERROR": true,
145+
"FTL_CPP_17": true
146+
},
147+
"environment": {},
148+
"vendor": {}
149+
},
108150
{
109151
"name": "Valgrind",
110152
"displayName": "Valgrind",
@@ -144,6 +186,14 @@
144186
{
145187
"name": "Unix_x64_Release",
146188
"configurePreset": "Unix_x64_Release"
189+
},
190+
{
191+
"name": "Unix_arm64_Debug",
192+
"configurePreset": "Unix_arm64_Debug"
193+
},
194+
{
195+
"name": "Unix_arm64_Release",
196+
"configurePreset": "Unix_arm64_Release"
147197
}
148198
]
149199
}

0 commit comments

Comments
 (0)