Skip to content

Commit 76fdbf2

Browse files
committed
Use setup-xcode action for MacOS build
1 parent 36115be commit 76fdbf2

File tree

2 files changed

+42
-6
lines changed

2 files changed

+42
-6
lines changed

.github/workflows/commit.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,40 @@ jobs:
108108
- name: Bulid docker image
109109
shell: bash
110110
run: docker build -t pisa -f- . < "${{runner.workspace}}/pisa/test/docker/headers/Dockerfile"
111+
112+
mac_tests:
113+
runs-on: macos-13
114+
strategy:
115+
matrix:
116+
name: [macos-xcode-13.2]
117+
include:
118+
- name: macos-xcode-13.2
119+
os: macos-latest
120+
compiler: "xcode"
121+
version: "13.2"
122+
steps:
123+
- uses: actions/checkout@v2
124+
125+
- name: Install (macOS)
126+
if: runner.os == 'macOS'
127+
run: |
128+
brew install autoconf automake libtool cmake
129+
130+
- name: Create Build Environment
131+
shell: bash
132+
run: cmake -E make_directory ${{runner.workspace}}/build
133+
134+
- name: Configure
135+
shell: bash
136+
working-directory: ${{runner.workspace}}/build
137+
run: cmake "$GITHUB_WORKSPACE" -DCMAKE_BUILD_TYPE=Debug -DPISA_BUILD_TOOLS=ON -DPISA_CI_BUILD=ON ..
138+
139+
- name: Build
140+
shell: bash
141+
working-directory: ${{runner.workspace}}/build
142+
run: cmake --build . --config Debug -- -j 4
143+
144+
- name: Test
145+
shell: bash
146+
working-directory: ${{runner.workspace}}/build
147+
run: ctest -VV -j 4

.github/workflows/trunk.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: docker run pisa ctest -VV -j 4
3636

3737
mac_tests:
38-
runs-on: ${{ matrix.os }}
38+
runs-on: macos-13
3939
strategy:
4040
matrix:
4141
name: [macos-xcode-13.2]
@@ -51,11 +51,10 @@ jobs:
5151
if: runner.os == 'macOS'
5252
run: |
5353
brew install autoconf automake libtool cmake
54-
sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
55-
echo "CC=$(xcrun -f clang)" >> $GITHUB_ENV
56-
echo "CXX=$(xcrun -f clang++)" >> $GITHUB_ENV
57-
echo "SDKROOT=$(xcodebuild -version -sdk macosx Path)" >> $GITHUB_ENV
58-
echo "PATH=$(dirname $(xcrun -f clang)):$PATH" >> $GITHUB_ENV
54+
55+
- uses: maxim-lobanov/setup-xcode@v1
56+
with:
57+
xcode-version: '14.3.1'
5958

6059
- name: Create Build Environment
6160
shell: bash

0 commit comments

Comments
 (0)