diff --git a/.ci/osx_ci.sh b/.ci/osx_ci.sh deleted file mode 100644 index 8cdd1ac..0000000 --- a/.ci/osx_ci.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -e -x - -arm64_set_path_and_python_version(){ - python_version="$1" - if [[ $(/usr/bin/arch) = arm64 ]]; then - export PATH=/opt/homebrew/bin:$PATH - eval "$(pyenv init --path)" - pyenv install $python_version -s - pyenv global $python_version - export PATH=$(pyenv prefix)/bin:$PATH - fi -} \ No newline at end of file diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f1f06ab..d6c917c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -9,43 +9,37 @@ jobs: runs-on: ${{ matrix.runs_on }} strategy: matrix: - include: - - runs_on: macos-latest + runs_on: + - macos-latest + - apple-silicon-m1 + python: + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + exclude: + - runs_on: apple-silicon-m1 python: "3.7" - - runs_on: macos-latest + - runs_on: apple-silicon-m1 python: "3.8" - - runs_on: macos-latest - python: "3.9" - - runs_on: macos-latest - python: "3.10" - - runs_on: macos-latest - python: "3.11" - runs_on: apple-silicon-m1 python: "3.9" - - runs_on: apple-silicon-m1 - python: "3.10" - - runs_on: apple-silicon-m1 - python: "3.11" steps: - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python }} - # Needs to be skipped on our self-hosted runners tagged as 'apple-silicon-m1' - if: ${{ matrix.runs_on != 'apple-silicon-m1' }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - name: Install project run: | - source .ci/osx_ci.sh - arm64_set_path_and_python_version ${{ matrix.python }} pip install cython pytest pip install . - name: Test with pytest run: | - source .ci/osx_ci.sh - arm64_set_path_and_python_version ${{ matrix.python }} make test_lib make make tests