From e5b9963d56b16f2326e8a1493aedee3573d2e3a2 Mon Sep 17 00:00:00 2001 From: Joseph Phillips Date: Sat, 5 Oct 2024 08:29:49 +0200 Subject: [PATCH 1/2] fix: adds Cargo as a build dependency to charmcraft.yaml. This required in order to build the binary wheel(s) required by the included COS libs. --- charmcraft.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charmcraft.yaml b/charmcraft.yaml index df1859a..4954c1c 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -2,6 +2,8 @@ type: charm parts: charm: charm-python-packages: [setuptools,markdown] + build-packages: + - cargo bases: - build-on: - name: ubuntu From 55fc19da97563df7253b8e98fa98218583faea92 Mon Sep 17 00:00:00 2001 From: Joseph Phillips Date: Fri, 8 Nov 2024 15:08:49 +0100 Subject: [PATCH 2/2] fix: use charmcraft 2.x to build Version 3 of charmcraft does not allow a run-on stanza that includes 24.04 with other versions, but 2 does. So we install this versions for our Github workflows. --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b07cd1..93b0357 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,7 @@ jobs: needs: unit-tests uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v4 with: + charmcraft-snap-channel: 2.x/stable artifact-name: charm-packed @@ -93,7 +94,7 @@ jobs: env: CHARMCRAFT_AUTH: ${{ secrets.CHARMCRAFT_AUTH }} run: | - sudo snap install charmcraft --classic + sudo snap install charmcraft --channel 2.x/stable --classic charmcraft upload ${{ steps.download.outputs.download-path }}/*.charm \ --name $CHARM_NAME \ --release ${{ needs.channel.outputs.test }} @@ -143,7 +144,7 @@ jobs: - name: Install Juju run: | - sudo snap install juju --channel 3.3/beta + sudo snap install juju --channel 3.5/stable - name: Bootstrap on LXD if: matrix.cloud == 'lxd' @@ -179,7 +180,7 @@ jobs: steps: - name: Install Charmcraft run: | - sudo snap install charmcraft --classic + sudo snap install charmcraft --channel 2.x/stable --classic - name: Get uploaded revision id: revision