Skip to content

Commit

Permalink
Support charmcraft 3 and multi platform builds
Browse files Browse the repository at this point in the history
  • Loading branch information
chanchiwai-ray committed Feb 24, 2025
1 parent 16396f0 commit 55922bc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
- 'tox -e func -- -v --base ubuntu@24.04 --keep-models'
juju-channel: ["3.4/stable"]
exclude:
# NOTE(rgildein): The grafana-agent does not support ubuntu@24.04 on arm64. See #347
# NOTE(rgildein): The grafana-agent does not support ubuntu@24.04 on arm64. See #347
- test-command: 'tox -e func -- -v --base ubuntu@24.04 --keep-models'
runs-on: [Ubuntu_ARM64_4C_16G_01]
steps:
Expand All @@ -116,7 +116,7 @@ jobs:
with:
provider: "lxd"
juju-channel: ${{ matrix.juju-channel }}
charmcraft-channel: "2.x/stable"
charmcraft-channel: "3.x/stable"

# This is used by zaza in the functional tests for non-amd64 architectures (if applicable)
- name: Set zaza juju model constraints for architecture
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
credentials: ${{ secrets.CHARMHUB_TOKEN }}
destination-channel: ${{ steps.set-channels.outputs.destination-channel }}
origin-channel: ${{ steps.set-channels.outputs.origin-channel }}
charmcraft-channel: "2.x/stable"
charmcraft-channel: "3.x/stable"
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Pack and upload to charmhub
uses: canonical/charming-actions/upload-charm@2.6.2
with:
charmcraft-channel: "2.x/stable"
charmcraft-channel: "3.x/stable"
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
# Ensure the charm is built in an isolated environment and on the correct base in an lxd container.
Expand Down
46 changes: 9 additions & 37 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,22 @@
# Learn more about charmcraft.yaml configuration at:
# https://juju.is/docs/sdk/charmcraft-config
# This is a template `charmcraft.yaml` file for ops charms
# This file is managed by bootstack-charms-spec and should not be modified
# within individual charm repos. https://launchpad.net/bootstack-charms-spec

type: charm

parts:
charm:
plugin: charm
source: .
build-packages: [git]

bases:
- build-on:
- name: ubuntu
channel: "22.04"
architectures: ["amd64"]
run-on:
- name: ubuntu
channel: "24.04"
architectures:
- amd64
- name: ubuntu
channel: "22.04"
architectures:
- amd64
- name: ubuntu
channel: "20.04"
architectures:
- amd64
- build-on:
- name: ubuntu
channel: "22.04"
architectures: ["arm64"]
run-on:
- name: ubuntu
channel: "24.04"
architectures:
- arm64
- name: ubuntu
channel: "22.04"
architectures:
- arm64
- name: ubuntu
channel: "20.04"
architectures:
- arm64
platforms:
ubuntu@20.04:amd64:
ubuntu@22.04:amd64:
ubuntu@24.04:amd64:
ubuntu@20.04:arm64:
ubuntu@22.04:arm64:
ubuntu@24.04:arm64:

actions:
redetect-hardware:
Expand Down

0 comments on commit 55922bc

Please sign in to comment.