Skip to content

Commit

Permalink
Use setup-xcode action for MacOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
elshize committed Dec 10, 2024
1 parent 36115be commit be86df8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,39 @@ jobs:
- name: Bulid docker image
shell: bash
run: docker build -t pisa -f- . < "${{runner.workspace}}/pisa/test/docker/headers/Dockerfile"

mac_tests:
runs-on: macos-13
strategy:
matrix:
name: [macos-xcode-13.2]
include:
- name: macos-xcode-13.2
os: macos-latest
compiler: "xcode"
version: "13.2"
steps:
- uses: actions/checkout@v2

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3.1'

- name: Create Build Environment
shell: bash
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake "$GITHUB_WORKSPACE" -DCMAKE_BUILD_TYPE=Debug -DPISA_BUILD_TOOLS=ON -DPISA_CI_BUILD=ON ..

- name: Build
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config Debug -- -j 4

- name: Test
shell: bash
working-directory: ${{runner.workspace}}/build
run: ctest -VV -j 4
14 changes: 4 additions & 10 deletions .github/workflows/trunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: docker run pisa ctest -VV -j 4

mac_tests:
runs-on: ${{ matrix.os }}
runs-on: macos-13
strategy:
matrix:
name: [macos-xcode-13.2]
Expand All @@ -47,15 +47,9 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install (macOS)
if: runner.os == 'macOS'
run: |
brew install autoconf automake libtool cmake
sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
echo "CC=$(xcrun -f clang)" >> $GITHUB_ENV
echo "CXX=$(xcrun -f clang++)" >> $GITHUB_ENV
echo "SDKROOT=$(xcodebuild -version -sdk macosx Path)" >> $GITHUB_ENV
echo "PATH=$(dirname $(xcrun -f clang)):$PATH" >> $GITHUB_ENV
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3.1'

- name: Create Build Environment
shell: bash
Expand Down

0 comments on commit be86df8

Please sign in to comment.