Skip to content

Commit c5fc491

Browse files
authored
Add CI MacOS Arm64 support (#356)
* Add CI MacOS Arm64 support * Update CMAKE_INSTALL_PREFIX * Rename aarch64 to arm64 for macos github workflows * Add comment after macos-latest
1 parent 8816900 commit c5fc491

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# ref: https://github.com/actions/runner-images
2+
name: Arm64 MacOS Bazel
3+
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# min hours day(month) month day(week)
9+
- cron: '0 0 7,22 * *'
10+
11+
jobs:
12+
# Building using the github runner environement directly.
13+
bazel:
14+
runs-on: macos-latest # Using M1 processors, ref: https://github.com/actions/runner-images
15+
steps:
16+
- name: Check out repository code
17+
uses: actions/checkout@v3
18+
- name: Install Bazel
19+
run: |
20+
brew update
21+
brew unlink bazelisk
22+
brew install bazel
23+
- name: Check Bazel
24+
run: bazel version
25+
- name: Build
26+
run: >
27+
bazel build
28+
-c opt
29+
--subcommands=true
30+
...
31+
- name: Test
32+
run: >
33+
bazel test
34+
-c opt
35+
--test_output=errors
36+
...
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# ref: https://github.com/actions/runner-images
2+
name: Arm64 MacOS CMake
3+
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# min hours day(month) month day(week)
9+
- cron: '0 0 7,22 * *'
10+
11+
jobs:
12+
# Building using the github runner environement directly.
13+
xcode:
14+
runs-on: macos-latest # Using M1 processors, ref: https://github.com/actions/runner-images
15+
env:
16+
CTEST_OUTPUT_ON_FAILURE: 1
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Check cmake
20+
run: cmake --version
21+
- name: Configure
22+
run: cmake -S. -Bbuild -G "Xcode" -DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_INSTALL_PREFIX:PATH=destination
23+
- name: Build
24+
run: cmake --build build --config Release --target ALL_BUILD -v
25+
- name: Test
26+
run: cmake --build build --config Release --target RUN_TESTS -v
27+
- name: Install
28+
run: cmake --build build --config Release --target install -v
29+
make:
30+
runs-on: macos-latest # Using M1 processors, ref: https://github.com/actions/runner-images
31+
env:
32+
CTEST_OUTPUT_ON_FAILURE: 1
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Check cmake
36+
run: cmake --version
37+
- name: Configure
38+
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=destination
39+
- name: Build
40+
run: cmake --build build --target all -v
41+
- name: Test
42+
run: cmake --build build --target test -v
43+
- name: Install
44+
run: cmake --build build --target install -v

0 commit comments

Comments
 (0)