Skip to content

Commit 78a0d8f

Browse files
committed
[CI] Add shared macOS toolchain setup action
1 parent 5ce7bac commit 78a0d8f

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-latest
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: actions/download-artifact@v8
7763
with:
@@ -95,15 +81,8 @@ jobs:
9581
runs-on: macOS-latest
9682
steps:
9783
- uses: actions/checkout@v6
98-
- name: Install Xcode
99-
uses: maxim-lobanov/setup-xcode@v1
100-
with:
101-
xcode-version: 'latest-stable'
102-
- name: Setup environment
103-
run: |
104-
brew update
105-
brew install ninja mpich llvm libomp openssl
106-
brew link libomp --overwrite --force
84+
- name: Setup macOS toolchain
85+
uses: ./.github/actions/setup-macos-toolchain
10786
- name: Download installed package
10887
uses: actions/download-artifact@v8
10988
with:

.github/workflows/perf.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,10 @@ jobs:
4848
runs-on: macOS-latest
4949
steps:
5050
- uses: actions/checkout@v6
51-
- name: Install Xcode
52-
uses: maxim-lobanov/setup-xcode@v1
53-
with:
54-
xcode-version: 'latest-stable'
51+
- name: Setup macOS toolchain
52+
uses: ./.github/actions/setup-macos-toolchain
5553
- name: Setup environment
5654
run: |
57-
brew update
58-
brew install ninja mpich llvm libomp openssl
59-
brew link libomp --overwrite --force
6055
python3 -m pip install -r requirements.txt --break-system-packages
6156
- name: Download installed package
6257
uses: actions/download-artifact@v8

0 commit comments

Comments
 (0)