Skip to content

Commit

Permalink
ci: update macos workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Jun 12, 2024
1 parent a99ec78 commit 2f7ca4e
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions .github/workflows/amd64_macos.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
# ref: https://github.com/actions/runner-images
name: amd64 macOS

on: [push, pull_request, workflow_dispatch]

# Building using the github runner environement directly.
jobs:
# Building using the github runner environement directly.
macos:
runs-on: macos-latest
native:
strategy:
matrix:
build: [
["Xcode", "Release", "ALL_BUILD", "RUN_TESTS", "install"],
["Unix Makefiles", "Release", "all", "test", "install"]
cmake: [
{generator: "Xcode", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: install},
{generator: "Unix Makefiles", config: Release, build_target: all, test_target: test, install_target: install},
]
fail-fast: false
env:
GENERATOR: ${{ matrix.build[0] }}
BUILD_TYPE: ${{ matrix.build[1] }}
BUILD_TARGET: ${{ matrix.build[2] }}
TEST_TARGET: ${{ matrix.build[3] }}
INSTALL_TARGET: ${{ matrix.build[4] }}
name: MacOS • ${{ matrix.cmake.generator }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Swig install
run: brew install swig
- name: Check swig
run: swig -version
# Install .NET SDKs
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
run: |
brew install swig
swig -version
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
Expand All @@ -39,10 +30,27 @@ jobs:
- name: Check cmake
run: cmake --version
- name: Configure
run: cmake -S. -Bbuild -G "$GENERATOR" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCMAKE_INSTALL_PREFIX=install
run: >
cmake -S. -Bbuild
-G "${{ matrix.cmake.generator }}"
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
-DCMAKE_INSTALL_PREFIX=install
- name: Build
run: cmake --build build --config "$BUILD_TYPE" --target "$BUILD_TARGET" -v
run: >
cmake --build build
--config ${{ matrix.cmake.config }}
--target ${{ matrix.cmake.build_target }}
-v -j2
- name: Test
run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config "$BUILD_TYPE" --target "$TEST_TARGET" -v
run: >
CTEST_OUTPUT_ON_FAILURE=1
cmake --build build
--config ${{ matrix.cmake.config }}
--target ${{ matrix.cmake.test_target }}
-v
- name: Install
run: cmake --build build --config "$BUILD_TYPE" --target "$INSTALL_TARGET" -v
run: >
cmake --build build
--config ${{ matrix.cmake.config }}
--target ${{ matrix.cmake.install_target }}
-v

0 comments on commit 2f7ca4e

Please sign in to comment.