From c3d87692fa0b90e53c8a90e7933bec9d9036f03c Mon Sep 17 00:00:00 2001 From: David Boreham Date: Thu, 12 Oct 2023 21:53:47 -0600 Subject: [PATCH] python setup CI action for arm linux (#578) * Workaround for missing Python binaries for ARM * Trigger CI job * Add Python install workaround to remaining jobs * Typo --- .gitea/workflows/fixturenet-eth-plugeth-test.yml | 12 ++++++++++-- .gitea/workflows/fixturenet-eth-test.yml | 10 +++++++++- .gitea/workflows/publish.yml | 10 +++++++++- .gitea/workflows/test-deploy.yml | 10 +++++++++- .gitea/workflows/test.yml | 10 +++++++++- 5 files changed, 46 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/fixturenet-eth-plugeth-test.yml b/.gitea/workflows/fixturenet-eth-plugeth-test.yml index 027266f1..739e33b0 100644 --- a/.gitea/workflows/fixturenet-eth-plugeth-test.yml +++ b/.gitea/workflows/fixturenet-eth-plugeth-test.yml @@ -19,8 +19,16 @@ jobs: steps: - name: "Clone project repository" uses: actions/checkout@v3 - - name: "Install Python" - uses: cerc-io/setup-python@v4 + # At present the stock setup-python action fails on Linux/aarch64 + # Conditional steps below workaroud this by using deadsnakes for that case only + - name: "Install Python for ARM on Linux" + if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }} + uses: deadsnakes/action@v3.0.1 + with: + python-version: '3.8' + - name: "Install Python cases other than ARM on Linux" + if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }} + uses: actions/setup-python@v4 with: python-version: '3.8' - name: "Print Python version" diff --git a/.gitea/workflows/fixturenet-eth-test.yml b/.gitea/workflows/fixturenet-eth-test.yml index 8d0d8da1..73804df5 100644 --- a/.gitea/workflows/fixturenet-eth-test.yml +++ b/.gitea/workflows/fixturenet-eth-test.yml @@ -19,7 +19,15 @@ jobs: steps: - name: "Clone project repository" uses: actions/checkout@v3 - - name: "Install Python" + # At present the stock setup-python action fails on Linux/aarch64 + # Conditional steps below workaroud this by using deadsnakes for that case only + - name: "Install Python for ARM on Linux" + if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }} + uses: deadsnakes/action@v3.0.1 + with: + python-version: '3.8' + - name: "Install Python cases other than ARM on Linux" + if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }} uses: actions/setup-python@v4 with: python-version: '3.8' diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 973210fa..ffbb9937 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -20,7 +20,15 @@ jobs: run: | build_tag=$(./scripts/create_build_tag_file.sh) echo "build-tag=v${build_tag}" >> $GITHUB_OUTPUT - - name: "Install Python" + # At present the stock setup-python action fails on Linux/aarch64 + # Conditional steps below workaroud this by using deadsnakes for that case only + - name: "Install Python for ARM on Linux" + if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }} + uses: deadsnakes/action@v3.0.1 + with: + python-version: '3.8' + - name: "Install Python cases other than ARM on Linux" + if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }} uses: actions/setup-python@v4 with: python-version: '3.8' diff --git a/.gitea/workflows/test-deploy.yml b/.gitea/workflows/test-deploy.yml index 66c017aa..6e47c82d 100644 --- a/.gitea/workflows/test-deploy.yml +++ b/.gitea/workflows/test-deploy.yml @@ -21,7 +21,15 @@ jobs: steps: - name: "Clone project repository" uses: actions/checkout@v3 - - name: "Install Python" + # At present the stock setup-python action fails on Linux/aarch64 + # Conditional steps below workaroud this by using deadsnakes for that case only + - name: "Install Python for ARM on Linux" + if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }} + uses: deadsnakes/action@v3.0.1 + with: + python-version: '3.8' + - name: "Install Python cases other than ARM on Linux" + if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }} uses: actions/setup-python@v4 with: python-version: '3.8' diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 830b7c20..0ba1fab4 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -21,7 +21,15 @@ jobs: steps: - name: "Clone project repository" uses: actions/checkout@v3 - - name: "Install Python" + # At present the stock setup-python action fails on Linux/aarch64 + # Conditional steps below workaroud this by using deadsnakes for that case only + - name: "Install Python for ARM on Linux" + if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }} + uses: deadsnakes/action@v3.0.1 + with: + python-version: '3.8' + - name: "Install Python cases other than ARM on Linux" + if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }} uses: actions/setup-python@v4 with: python-version: '3.8'