Skip to content

Commit

Permalink
chore: test and publish the right charm
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Belanger <[email protected]>
  • Loading branch information
gruyaume committed Dec 3, 2024
1 parent 709eb44 commit 93ff3f6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
build-charm-under-test:
strategy:
matrix:
arch:
version:
- arch: amd64
base: ubuntu-22.04
runner: ubuntu-22.04
Expand All @@ -20,7 +20,7 @@ jobs:
- arch: arm64
base: ubuntu-24.04
runner: [self-hosted, linux, ARM64, medium, noble]
runs-on: ${{ matrix.arch.runner }}
runs-on: ${{ matrix.version.runner }}
steps:
- uses: actions/checkout@v4

Expand All @@ -36,8 +36,8 @@ jobs:
run: |
# Only copy the base specific charmcraft_<base>.yaml if it is not the
# latest LTS (24.04). The latest LTS is used in the bare charmcraft.yaml
if [ "${{ matrix.arch.base }}" != "ubuntu-24.04" ]; then
cp charmcraft_${{ matrix.arch.base }}.yaml charmcraft.yaml
if [ "${{ matrix.version.base }}" != "ubuntu-24.04" ]; then
cp charmcraft_${{ matrix.version.base }}.yaml charmcraft.yaml
fi
- name: Build charm under test
Expand All @@ -46,6 +46,6 @@ jobs:
- name: Archive Charm Under Test
uses: actions/upload-artifact@v4
with:
name: built-charm-${{ matrix.arch.arch }}
name: built-charm-${{ matrix.version.arch }}-${{ matrix.version.base }}
path: "*.charm"
retention-days: 5
12 changes: 8 additions & 4 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,28 @@ jobs:
integration-test:
strategy:
matrix:
arch:
version:
- arch: amd64
runner: ubuntu-24.04
base: ubuntu-22.04
runner: ubuntu-22.04
- arch: amd64
base: ubuntu-24.04
runner: ubuntu-24.04
- arch: arm64
base: ubuntu-22.04
runner: [self-hosted, linux, ARM64, medium, jammy]
- arch: arm64
base: ubuntu-24.04
runner: [self-hosted, linux, ARM64, medium, noble]
runs-on: ${{ matrix.arch.runner }}
runs-on: ${{ matrix.version.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Fetch Charm Under Test
uses: actions/download-artifact@v4
with:
name: built-charm-${{ matrix.arch.arch }}
name: built-charm-${{ matrix.version.arch }}-${{ matrix.version.base }}
path: built/

- name: Get Charm Under Test Path
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/publish-charm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,20 @@ jobs:
publish-charm:
strategy:
matrix:
arch:
version:
- arch: amd64
base: ubuntu-22.04
runner: ubuntu-22.04
- arch: amd64
base: ubuntu-24.04
runner: ubuntu-24.04
- arch: arm64
base: ubuntu-22.04
runner: [self-hosted, linux, ARM64, medium, jammy]
runs-on: ${{ matrix.arch.runner }}
- arch: arm64
base: ubuntu-24.04
runner: [self-hosted, linux, ARM64, medium, noble]
runs-on: ${{ matrix.version.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -26,7 +34,7 @@ jobs:
- name: Fetch Tested Charm
uses: actions/download-artifact@v4
with:
name: built-charm-${{ matrix.arch.arch }}
name: built-charm-${{ matrix.version.arch }}-${{ matrix.version.base }}

- name: Get Charm Under Test Path
id: charm-path
Expand Down

0 comments on commit 93ff3f6

Please sign in to comment.