From 7907c3efc8f14651eab636927335324b24691682 Mon Sep 17 00:00:00 2001 From: jamesETsmith Date: Tue, 1 Oct 2024 14:05:37 -0400 Subject: [PATCH] [ci/macos] Adding minimal MacOS CI --- .github/workflows/all_push.yml | 3 +- .github/workflows/all_push_masos.yml | 41 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/all_push_masos.yml diff --git a/.github/workflows/all_push.yml b/.github/workflows/all_push.yml index 6cbf9ad..d3cb45b 100644 --- a/.github/workflows/all_push.yml +++ b/.github/workflows/all_push.yml @@ -20,7 +20,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install Python dependencies - run: python -m pip install numpy pytest cmake + run: python -m pip install cmake scikit-build-core - name: Configure CMake env: CXX: ${{ matrix.compiler }} @@ -31,7 +31,6 @@ jobs: - name: Install run: | cmake --install ${{github.workspace}}/build - python -m pip install "scikit-build-core" python -m pip install ".[dev]" --no-build-isolation - name: Test C++ env: diff --git a/.github/workflows/all_push_masos.yml b/.github/workflows/all_push_masos.yml new file mode 100644 index 0000000..e89e971 --- /dev/null +++ b/.github/workflows/all_push_masos.yml @@ -0,0 +1,41 @@ +name: MacOS Build/Test +on: [push] +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-13] + compiler: [g++-12] + python-version: ["3.12"] + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - 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