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 76fdbf2
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,40 @@ 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

- name: Install (macOS)
if: runner.os == 'macOS'
run: |
brew install autoconf automake libtool cmake
- 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
11 changes: 5 additions & 6 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 @@ -51,11 +51,10 @@ jobs:
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 76fdbf2

Please sign in to comment.