Skip to content

Add GitHub Actions CI for Mac #15

Add GitHub Actions CI for Mac

Add GitHub Actions CI for Mac #15

Workflow file for this run

name: CMake build
on:
push:
paths:
- '.github/**/*.yml'
- 'CMakeLists.txt'
- 'cmake/**'
- '**.cc'
- '**.h'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
cmake-linux-x86_64:
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Update apt
run: sudo apt update
- name: Install ninja
run: sudo apt install ninja-build
- name: Configure
run: cmake -Bbuild -S. -G Ninja -DCMAKE_BUILD_TYPE=Release -DFP16_BUILD_COMPARATIVE_BENCHMARKS=ON
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build
cmake-macos-x86_64:
runs-on: macos-12
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -Bbuild -S. -G Xcode -DCMAKE_CONFIGURATION_TYPES=Release -DHAVE_STD_REGEX=TRUE -DFP16_BUILD_COMPARATIVE_BENCHMARKS=ON -DCMAKE_OSX_ARCHITECTURES=x86_64
- name: Build
run: cmake --build build --config Release --parallel $(sysctl -n hw.ncpu) -- -quiet
- name: Test
run: ctest --test-dir build
cmake-macos-arm64:
runs-on: macos-14
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -Bbuild -S. -G Xcode -DCMAKE_CONFIGURATION_TYPES=Release -DHAVE_STD_REGEX=TRUE -DFP16_BUILD_COMPARATIVE_BENCHMARKS=ON -DCMAKE_OSX_ARCHITECTURES=arm64e
- name: Build
run: cmake --build build --config Release --parallel $(sysctl -n hw.ncpu) -- -quiet
- name: Test
run: ctest --test-dir build