no message #559
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "macOS Build & Test" | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
env: | |
COMMON_CMAKE_FLAGS: > | |
-DSLEEF_SHOW_CONFIG=1 | |
-DSLEEF_BUILD_INLINE_HEADERS=ON | |
-DSLEEF_BUILD_DFT=ON | |
-DSLEEF_BUILD_QUAD=ON | |
-DSLEEF_BUILD_STATIC_TEST_BINS=OFF | |
-DSLEEF_ENFORCE_TESTER=ON | |
-DSLEEF_ENFORCE_TESTER3=ON | |
-DSLEEF_ENABLE_TESTER4=OFF | |
-DSLEEF_ENABLE_TESTER=ON | |
-DSLEEF_ENFORCE_TESTER=True | |
jobs: | |
build-macos: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- "macos-14" | |
include: | |
- os: "macos-14" | |
arch: "aarch64" | |
xcode: "Xcode_15.4" | |
name: build-${{ matrix.os }}-${{ matrix.arch }} | |
steps: | |
- name: Change Xcode version | |
if: ${{ matrix.xcode != '' }} | |
run: | | |
sudo xcode-select -s /Applications/${{ matrix.xcode }}.app | |
- uses: actions/[email protected] | |
with: | |
persist-credentials: false | |
- name: Install dependencies | |
run: | | |
brew uninstall cmake || true | |
brew update | |
brew upgrade | |
brew install -q cmake ninja gmp mpfr pkg-config openssl@3 | |
- name: Build ${{ matrix.os }}-${{ matrix.arch }} | |
shell: bash -ex -o pipefail {0} | |
run: | | |
export LD_LIBRARY_PATH=$(pwd)/_install-${{ matrix.os }}-${{ matrix.arch }}/lib | |
cmake -S . -B _build-${{ matrix.os }}-${{ matrix.arch }} -GNinja \ | |
-DCMAKE_INSTALL_PREFIX=$(pwd)/_install-${{ matrix.os }}-${{ matrix.arch }} ${COMMON_CMAKE_FLAGS} | |
cmake --build _build-${{ matrix.os }}-${{ matrix.arch }} | |
cmake --install _build-${{ matrix.os }}-${{ matrix.arch }} | |
- name: Upload build-${{ matrix.os }}-${{ matrix.arch }} artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ matrix.os }}-${{ matrix.arch }} | |
path: | | |
_build-* | |
_install-* | |
if: always() | |
test-macos: | |
runs-on: ${{ matrix.os }} | |
needs: [build-macos] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- "macos-14" | |
include: | |
- os: "macos-14" | |
arch: "aarch64" | |
xcode: "Xcode_15.4" | |
name: test-${{ matrix.os }}-${{ matrix.arch }} | |
steps: | |
- name: Change Xcode version | |
if: ${{ matrix.xcode != '' }} | |
run: | | |
sudo xcode-select -s /Applications/${{ matrix.xcode }}.app | |
- uses: actions/[email protected] | |
with: | |
persist-credentials: false | |
- name: Install dependencies | |
run: | | |
brew uninstall cmake || true | |
brew update | |
brew upgrade | |
brew install -q cmake ninja gmp mpfr pkg-config openssl@3 | |
- name: Download build-${{ matrix.os }}-${{ matrix.arch }} artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-${{ matrix.os }}-${{ matrix.arch }} | |
- name: Fix _build-${{ matrix.os }}-${{ matrix.arch }} permissions | |
run: | | |
chmod +x _build-${{ matrix.os }}-${{ matrix.arch }}/bin/* | |
- name: Test ${{ matrix.os }}-${{ matrix.arch }} | |
env: | |
CTEST_OUTPUT_ON_FAILURE: "TRUE" | |
run: | | |
export LD_LIBRARY_PATH=$(pwd)/_install-${{ matrix.os }}-${{ matrix.arch }}/lib | |
cd _build-${{ matrix.os }}-${{ matrix.arch }} | |
ctest -j$(sysctl -n hw.logicalcpu) | |
- name: Upload test-${{ matrix.os }}-${{ matrix.arch }} artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-${{ matrix.os }}-${{ matrix.arch }} | |
path: | | |
_build-${{ matrix.os }}-${{ matrix.arch }}/Testing | |
if: always() |