From e64bf9ce7a3b09148f3b0ebccb357b166a469d8d Mon Sep 17 00:00:00 2001 From: Mirko Galimberti Date: Thu, 5 Oct 2023 18:50:56 +0200 Subject: [PATCH] Now Github Actions provides python3 via setup-python also for Apple Silicon Macs --- .ci/osx_ci.sh | 13 ------------- .github/workflows/python-package.yml | 11 ++++------- 2 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 .ci/osx_ci.sh 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 380e01b..956bb28 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -26,12 +26,13 @@ jobs: python: "3.7" - runs_on: apple-silicon-m1 python: "3.8" + - runs_on: apple-silicon-m1 + python: "3.9" 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 }} @@ -40,15 +41,11 @@ jobs: - 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