Skip to content

Commit 4c62009

Browse files
authored
[CI] Add shared macOS toolchain setup action (#815)
1 parent 910b86b commit 4c62009

3 files changed

Lines changed: 23 additions & 34 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: 'Setup macOS Toolchain'
2+
description: 'Configure Xcode, Homebrew packages, MPI, LLVM, OpenMP, OpenSSL, and ninja'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: Install Xcode
7+
uses: maxim-lobanov/setup-xcode@v1
8+
with:
9+
xcode-version: 'latest-stable'
10+
- name: Setup environment
11+
shell: bash
12+
run: |
13+
brew update
14+
brew install ninja mpich llvm libomp openssl
15+
brew link libomp --overwrite --force

.github/workflows/mac.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,8 @@ jobs:
2222
- uses: actions/checkout@v6
2323
with:
2424
submodules: recursive
25-
- name: Install Xcode
26-
uses: maxim-lobanov/setup-xcode@v1
27-
with:
28-
xcode-version: 'latest-stable'
29-
- name: Setup environment
30-
run: |
31-
brew update
32-
brew install ninja mpich llvm libomp openssl
33-
brew link libomp --overwrite --force
25+
- name: Setup macOS toolchain
26+
uses: ./.github/actions/setup-macos-toolchain
3427
- name: ccache
3528
uses: hendrikmuhs/ccache-action@v1.2
3629
with:
@@ -63,15 +56,8 @@ jobs:
6356
runs-on: macOS-26
6457
steps:
6558
- uses: actions/checkout@v6
66-
- name: Install Xcode
67-
uses: maxim-lobanov/setup-xcode@v1
68-
with:
69-
xcode-version: 'latest-stable'
70-
- name: Setup environment
71-
run: |
72-
brew update
73-
brew install ninja mpich llvm libomp openssl
74-
brew link libomp --overwrite --force
59+
- name: Setup macOS toolchain
60+
uses: ./.github/actions/setup-macos-toolchain
7561
- name: Download installed package
7662
uses: ./.github/actions/download-install
7763
with:
@@ -92,15 +78,8 @@ jobs:
9278
runs-on: macOS-26
9379
steps:
9480
- uses: actions/checkout@v6
95-
- name: Install Xcode
96-
uses: maxim-lobanov/setup-xcode@v1
97-
with:
98-
xcode-version: 'latest-stable'
99-
- name: Setup environment
100-
run: |
101-
brew update
102-
brew install ninja mpich llvm libomp openssl
103-
brew link libomp --overwrite --force
81+
- name: Setup macOS toolchain
82+
uses: ./.github/actions/setup-macos-toolchain
10483
- name: Download installed package
10584
uses: ./.github/actions/download-install
10685
with:

.github/workflows/perf.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,10 @@ jobs:
4545
runs-on: macOS-26
4646
steps:
4747
- uses: actions/checkout@v6
48-
- name: Install Xcode
49-
uses: maxim-lobanov/setup-xcode@v1
50-
with:
51-
xcode-version: 'latest-stable'
48+
- name: Setup macOS toolchain
49+
uses: ./.github/actions/setup-macos-toolchain
5250
- name: Setup environment
5351
run: |
54-
brew update
55-
brew install ninja mpich llvm libomp openssl
56-
brew link libomp --overwrite --force
5752
python3 -m pip install -r requirements.txt --break-system-packages
5853
- name: Download installed package
5954
uses: ./.github/actions/download-install

0 commit comments

Comments
 (0)