From 6311ee3c2d5603c224f412e96f2cf5e40ac6168d Mon Sep 17 00:00:00 2001 From: Mirko Galimberti Date: Sun, 16 Jul 2023 10:34:21 +0200 Subject: [PATCH] Now Github Actions provides python3 via setup-python also for Apple Silicon macs --- .ci/utils.sh | 14 --------- .github/workflows/kivy_ios.yml | 52 ++++------------------------------ 2 files changed, 6 insertions(+), 60 deletions(-) delete mode 100644 .ci/utils.sh diff --git a/.ci/utils.sh b/.ci/utils.sh deleted file mode 100644 index c3fc5703..00000000 --- a/.ci/utils.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -arm64_set_path_and_python_version(){ - python_version="$1" - if [[ $(/usr/bin/arch) = arm64 ]]; then - echo $PATH - export PATH=/usr/local/bin:$PATH - 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 -} diff --git a/.github/workflows/kivy_ios.yml b/.github/workflows/kivy_ios.yml index ca4290d7..7814c5c7 100644 --- a/.github/workflows/kivy_ios.yml +++ b/.github/workflows/kivy_ios.yml @@ -23,24 +23,16 @@ jobs: runs-on: ${{ matrix.runs_on }} strategy: matrix: - include: - - runs_on: macos-latest - python: 3.x - - runs_on: apple-silicon-m1 - python: '3.11' + runs_on: [macos-latest, apple-silicon-m1] steps: - name: Checkout kivy-ios uses: actions/checkout@v3 - name: Set up Python 3.x - # 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@v4 with: - python-version: ${{ matrix.python }} + python-version: '3.x' - name: Install requirements run: | - source .ci/utils.sh - arm64_set_path_and_python_version ${{ matrix.python }} brew install libjpeg pip3 install wheel pip3 install -r requirements.txt @@ -50,13 +42,9 @@ jobs: sudo gem install xcpretty - name: Install kivy-ios run: | - source .ci/utils.sh - arm64_set_path_and_python_version ${{ matrix.python }} python setup.py install - name: Build Python & Kivy run: | - source .ci/utils.sh - arm64_set_path_and_python_version ${{ matrix.python }} toolchain build python3 kivy - name: Checkout kivy for tests apps uses: actions/checkout@v3 @@ -65,32 +53,22 @@ jobs: path: kivy-ci-clone - name: Create & Build test project run: | - source .ci/utils.sh - arm64_set_path_and_python_version ${{ matrix.python }} .ci/test_project.sh build_python3_kivy_venv: runs-on: ${{ matrix.runs_on }} strategy: matrix: - include: - - runs_on: macos-latest - python: 3.x - - runs_on: apple-silicon-m1 - python: '3.11' + runs_on: [macos-latest, apple-silicon-m1] steps: - name: Checkout kivy-ios uses: actions/checkout@v3 - name: Set up Python 3.x - # 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@v4 with: - python-version: ${{ matrix.python }} + python-version: '3.x' - name: Install requirements run: | - source .ci/utils.sh - arm64_set_path_and_python_version ${{ matrix.python }} python -m venv venv . venv/bin/activate brew install libjpeg @@ -103,13 +81,9 @@ jobs: sudo gem install xcpretty - name: Install kivy-ios run: | - source .ci/utils.sh - arm64_set_path_and_python_version ${{ matrix.python }} python setup.py install - name: Build Python & Kivy run: | - source .ci/utils.sh - arm64_set_path_and_python_version ${{ matrix.python }} . venv/bin/activate toolchain build python3 kivy - name: Checkout kivy for tests apps @@ -119,8 +93,6 @@ jobs: path: kivy-ci-clone - name: Create & Build test project run: | - source .ci/utils.sh - arm64_set_path_and_python_version ${{ matrix.python }} . venv/bin/activate .ci/test_project.sh @@ -129,24 +101,16 @@ jobs: runs-on: ${{ matrix.runs_on }} strategy: matrix: - include: - - runs_on: macos-latest - python: 3.x - - runs_on: apple-silicon-m1 - python: '3.11' + runs_on: [macos-latest, apple-silicon-m1] steps: - name: Checkout kivy-ios uses: actions/checkout@v3 - name: Set up Python 3.x - # 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@v4 with: - python-version: ${{ matrix.python }} + python-version: '3.x' - name: Install requirements run: | - source .ci/utils.sh - arm64_set_path_and_python_version ${{ matrix.python }} brew install libjpeg pip3 install wheel pip3 install -r requirements.txt @@ -155,11 +119,7 @@ jobs: pip3 install Cython==0.29.33 - name: Install kivy-ios run: | - source .ci/utils.sh - arm64_set_path_and_python_version ${{ matrix.python }} python setup.py install - name: Build updated recipes run: | - source .ci/utils.sh - arm64_set_path_and_python_version ${{ matrix.python }} python3 .ci/rebuild_updated_recipes.py