Skip to content

[ci/macos] Fixing file name type and only doing g++-12 for macos #1

[ci/macos] Fixing file name type and only doing g++-12 for macos

[ci/macos] Fixing file name type and only doing g++-12 for macos #1

Workflow file for this run

name: MacOS Build/Test
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14] # macos-14 is arm64, macos-13 is x86_64
compiler: [g++-12]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
# TODO: improve compiler setup for macos, right now we only use what's already on the github runners
# - name: Setup compiler
# run: python3 ./.github/compiler_setup.py ${{ matrix.compiler }}
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: python -m pip install cmake scikit-build-core
- name: Configure CMake
env:
CXX: ${{ matrix.compiler }}
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=${CXX}
- name: Build
run: |
cmake --build ${{github.workspace}}/build --verbose --parallel
- name: Install
run: |
cmake --install ${{github.workspace}}/build
python -m pip install ".[dev]" --no-build-isolation
- name: Test C++
env:
OMP_NUM_THREADS: 2
CPP_TEST_DIR: build/fast_pauli/cpp/tests
run: make test-cpp
- name: Test Python
run: make test-py