-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from qognitive/ci/macos
[CI] Adding MacOS support
- Loading branch information
Showing
3 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains 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