-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.38 KB
/
all_push_macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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