From 64ff8e74d2a6a9dec3250438f0d8b9f6808daf2f Mon Sep 17 00:00:00 2001 From: Jordan Barrett Date: Wed, 29 Mar 2023 15:00:20 +1100 Subject: [PATCH] Use build_charms_with_cache action From the Data Platform team. This caches the charmcraft build env, so should speed up our builds considerably. --- .github/workflows/ci.yml | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4337041..40361c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,30 +7,10 @@ on: jobs: build: - name: "Build" - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Install dependencies - run: | - python3 --version - sudo snap install charmcraft --classic - - - name: Set up LXD - uses: canonical/setup-lxd@90d76101915da56a42a562ba766b1a77019242fd - - - name: Pack charm - run: | - charmcraft pack -v - - - name: Upload packed charm as artifact - uses: actions/upload-artifact@v3 - with: - name: charm - path: '*.charm' + name: Build charms + uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v1 + with: + artifact-name: charm-packed bootstrap: name: "Bootstrap" @@ -50,7 +30,7 @@ jobs: id: download uses: actions/download-artifact@v3 with: - name: charm + name: ${{ needs.build.outputs.artifact-name }} - name: Rename charm file run: |