From ade6e84a069ec1b4f6414fd8a07e621a2333ed60 Mon Sep 17 00:00:00 2001 From: Carl Csaposs Date: Fri, 1 Mar 2024 12:30:00 +0000 Subject: [PATCH] patch: Switch ARM runners from self-hosted (on Azure) to GitHub-hosted (#147) Waiting on IS to deploy Azure self-hosted runners to `canonical` GitHub org --- .github/workflows/build_charm.yaml | 11 +++++++++++ .github/workflows/build_rock.yaml | 8 ++++++++ .github/workflows/build_snap.yaml | 8 ++++++++ .../craft_tools/collect_bases.py | 8 +------- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_charm.yaml b/.github/workflows/build_charm.yaml index 50154647..cae4c905 100644 --- a/.github/workflows/build_charm.yaml +++ b/.github/workflows/build_charm.yaml @@ -90,6 +90,17 @@ jobs: runs-on: ${{ matrix.base.runner }} timeout-minutes: 120 steps: + - name: (GitHub-hosted ARM runner) Install pipx + if: ${{ matrix.base.runner == 'Ubuntu_ARM64_4C_16G_01' }} + run: | + sudo apt-get update + sudo apt-get install python3-pip python3-venv -y + python3 -m pip install pipx + python3 -m pipx ensurepath + echo "$HOME/.local/bin" >> "$GITHUB_PATH" + - name: (GitHub-hosted ARM runner) Install libpq-dev + if: ${{ matrix.base.runner == 'Ubuntu_ARM64_4C_16G_01' }} + run: sudo apt-get install libpq-dev -y - name: Install CLI run: pipx install git+https://github.com/canonical/data-platform-workflows@'${{ needs.get-workflow-version.outputs.version }}'#subdirectory=python/cli - name: Parse charmcraft version inputs diff --git a/.github/workflows/build_rock.yaml b/.github/workflows/build_rock.yaml index 14089c07..8a5d0e2f 100644 --- a/.github/workflows/build_rock.yaml +++ b/.github/workflows/build_rock.yaml @@ -67,6 +67,14 @@ jobs: runs-on: ${{ matrix.base.runner }} timeout-minutes: 15 steps: + - name: (GitHub-hosted ARM runner) Install pipx + if: ${{ matrix.base.runner == 'Ubuntu_ARM64_4C_16G_01' }} + run: | + sudo apt-get update + sudo apt-get install python3-pip python3-venv -y + python3 -m pip install pipx + python3 -m pipx ensurepath + echo "$HOME/.local/bin" >> "$GITHUB_PATH" - name: Install CLI run: pipx install git+https://github.com/canonical/data-platform-workflows@'${{ needs.get-workflow-version.outputs.version }}'#subdirectory=python/cli - name: Parse rockcraft version inputs diff --git a/.github/workflows/build_snap.yaml b/.github/workflows/build_snap.yaml index a5074e2f..45ab50d3 100644 --- a/.github/workflows/build_snap.yaml +++ b/.github/workflows/build_snap.yaml @@ -70,6 +70,14 @@ jobs: runs-on: ${{ matrix.base.runner }} timeout-minutes: 15 steps: + - name: (GitHub-hosted ARM runner) Install pipx + if: ${{ matrix.base.runner == 'Ubuntu_ARM64_4C_16G_01' }} + run: | + sudo apt-get update + sudo apt-get install python3-pip python3-venv -y + python3 -m pip install pipx + python3 -m pipx ensurepath + echo "$HOME/.local/bin" >> "$GITHUB_PATH" - name: Install CLI run: pipx install git+https://github.com/canonical/data-platform-workflows@'${{ needs.get-workflow-version.outputs.version }}'#subdirectory=python/cli - name: Parse snapcraft version inputs diff --git a/python/cli/data_platform_workflows_cli/craft_tools/collect_bases.py b/python/cli/data_platform_workflows_cli/craft_tools/collect_bases.py index 0928ee04..c7649426 100644 --- a/python/cli/data_platform_workflows_cli/craft_tools/collect_bases.py +++ b/python/cli/data_platform_workflows_cli/craft_tools/collect_bases.py @@ -25,13 +25,7 @@ logging.basicConfig(level=logging.INFO, stream=sys.stdout) RUNNERS = { craft.Architecture.X64: "ubuntu-latest", - craft.Architecture.ARM64: [ - "self-hosted", - "data-platform", - "ubuntu", - "ARM64", - "4cpu16ram", - ], + craft.Architecture.ARM64: "Ubuntu_ARM64_4C_16G_01", }