Skip to content

docs(rocm): Document HSA_OVERRIDE_GFX_VERSION workaround for integrat… #98

docs(rocm): Document HSA_OVERRIDE_GFX_VERSION workaround for integrat…

docs(rocm): Document HSA_OVERRIDE_GFX_VERSION workaround for integrat… #98

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: read
actions: write
jobs:
build-charm:
name: Build charm
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup LXD
uses: canonical/setup-lxd@v1
with:
channel: 5.21/stable
- name: Build charm
run: |
sudo snap install charmcraft --classic
charmcraft pack
- name: Upload charm artifact
uses: actions/upload-artifact@v4
with:
name: concourse-ci-machine-charm
path: concourse-ci-machine_amd64.charm
retention-days: 1
- name: Remove charm file
run: rm concourse-ci-machine_amd64.charm
- name: Cleanup
if: always()
run: |
sudo snap remove charmcraft --purge
sudo snap remove lxd --purge
test-auto-mode:
name: Test mode=auto
runs-on: ubuntu-latest
timeout-minutes: 30
needs: build-charm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download charm artifact
uses: actions/download-artifact@v4
with:
name: concourse-ci-machine-charm
- name: Setup LXD
uses: canonical/setup-lxd@v1
with:
channel: 5.21/stable
- name: Configure LXD IPv6
run: |
lxc network set lxdbr0 ipv6.address none
lxc network set lxdbr0 ipv6.dhcp false
lxc network set lxdbr0 ipv6.nat false
- name: Install Juju
run: |
sudo snap install juju --channel 3.6/stable
sudo snap install juju-wait --classic
- name: Bootstrap Juju
run: juju bootstrap localhost test-controller --config test-mode=true
- name: Make script executable
run: chmod +x ./scripts/deploy-test.sh
- name: Deploy
run: ./scripts/deploy-test.sh --mode=auto --skip-cleanup --steps=deploy
- name: Verify
run: ./scripts/deploy-test.sh --mode=auto --skip-cleanup --steps=verify
- name: Test Mounts
run: ./scripts/deploy-test.sh --mode=auto --skip-cleanup --steps=mounts
- name: Test Tagged
run: ./scripts/deploy-test.sh --mode=auto --skip-cleanup --steps=tagged
- name: Test GPU (if available)
run: ./scripts/deploy-test.sh --mode=auto --skip-cleanup --steps=gpu
- name: Test Upgrade
run: ./scripts/deploy-test.sh --mode=auto --skip-cleanup --steps=upgrade
- name: Test Scale Out
run: ./scripts/deploy-test.sh --mode=auto --skip-cleanup --steps=scale-out
- name: Verify Tagged After Upgrade
run: ./scripts/deploy-test.sh --mode=auto --skip-cleanup --steps=tagged
- name: Cleanup
if: always()
run: |
# Cleanup model used by script
MODEL_NAME="concourse-test-auto-none"
echo $MODEL_NAME | juju destroy-model $MODEL_NAME --destroy-storage --force --no-wait || true
# Purge tools
sudo snap remove juju --purge
sudo snap remove lxd --purge
test-web-worker-mode:
name: Test mode=web+worker
runs-on: ubuntu-latest
timeout-minutes: 30
needs: test-auto-mode
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download charm artifact
uses: actions/download-artifact@v4
with:
name: concourse-ci-machine-charm
- name: Setup LXD
uses: canonical/setup-lxd@v1
with:
channel: 5.21/stable
- name: Configure LXD IPv6
run: |
lxc network set lxdbr0 ipv6.address none
lxc network set lxdbr0 ipv6.dhcp false
lxc network set lxdbr0 ipv6.nat false
- name: Install Juju
run: |
sudo snap install juju --channel 3.6/stable
sudo snap install juju-wait --classic
- name: Bootstrap Juju
run: juju bootstrap localhost test-controller --config test-mode=true
- name: Make script executable
run: chmod +x ./scripts/deploy-test.sh
- name: Deploy
run: ./scripts/deploy-test.sh --mode=web+worker --skip-cleanup --steps=deploy
- name: Verify
run: ./scripts/deploy-test.sh --mode=web+worker --skip-cleanup --steps=verify
- name: Test Mounts
run: ./scripts/deploy-test.sh --mode=web+worker --skip-cleanup --steps=mounts
- name: Test Tagged
run: ./scripts/deploy-test.sh --mode=web+worker --skip-cleanup --steps=tagged
- name: Test GPU (if available)
run: ./scripts/deploy-test.sh --mode=web+worker --skip-cleanup --steps=gpu
- name: Test Upgrade
run: ./scripts/deploy-test.sh --mode=web+worker --skip-cleanup --steps=upgrade
- name: Test Scale Out
run: ./scripts/deploy-test.sh --mode=web+worker --skip-cleanup --steps=scale-out
- name: Verify Tagged After Upgrade
run: ./scripts/deploy-test.sh --mode=web+worker --skip-cleanup --steps=tagged
- name: Cleanup
if: always()
run: |
# Cleanup model used by script
MODEL_NAME="concourse-test-web-worker-none"
echo $MODEL_NAME | juju destroy-model $MODEL_NAME --destroy-storage --force --no-wait || true
# Purge tools
sudo snap remove juju --purge
sudo snap remove lxd --purge
test-shared-storage-auto:
name: Test shared storage (mode=auto)
runs-on: ubuntu-latest
timeout-minutes: 30
needs: build-charm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download charm artifact
uses: actions/download-artifact@v4
with:
name: concourse-ci-machine-charm
- name: Setup LXD
uses: canonical/setup-lxd@v1
with:
channel: 5.21/stable
- name: Configure LXD IPv6
run: |
lxc network set lxdbr0 ipv6.address none
lxc network set lxdbr0 ipv6.dhcp false
lxc network set lxdbr0 ipv6.nat false
- name: Install Juju
run: |
sudo snap install juju --channel 3.6/stable
sudo snap install juju-wait --classic
- name: Bootstrap Juju
run: juju bootstrap localhost test-controller --config test-mode=true
- name: Make script executable
run: chmod +x ./scripts/deploy-test.sh
- name: Deploy
run: ./scripts/deploy-test.sh --mode=auto --shared-storage=lxc --skip-cleanup --steps=deploy
- name: Verify
run: ./scripts/deploy-test.sh --mode=auto --shared-storage=lxc --skip-cleanup --steps=verify
- name: Test Mounts
run: ./scripts/deploy-test.sh --mode=auto --shared-storage=lxc --skip-cleanup --steps=mounts
- name: Test Tagged
run: ./scripts/deploy-test.sh --mode=auto --shared-storage=lxc --skip-cleanup --steps=tagged
- name: Test GPU (if available)
run: ./scripts/deploy-test.sh --mode=auto --shared-storage=lxc --skip-cleanup --steps=gpu
- name: Test Upgrade
run: ./scripts/deploy-test.sh --mode=auto --shared-storage=lxc --skip-cleanup --steps=upgrade
- name: Test Scale Out
run: ./scripts/deploy-test.sh --mode=auto --shared-storage=lxc --skip-cleanup --steps=scale-out
- name: Verify Tagged After Upgrade
run: ./scripts/deploy-test.sh --mode=auto --shared-storage=lxc --skip-cleanup --steps=tagged
- name: Cleanup
if: always()
run: |
# Cleanup model used by script
MODEL_NAME="concourse-test-auto-lxc"
echo $MODEL_NAME | juju destroy-model $MODEL_NAME --destroy-storage --force --no-wait || true
# Cleanup shared storage dir
sudo rm -fr /tmp/${MODEL_NAME}-shared || true
# Cleanup mount dirs
rm -rf /tmp/config-test-mount || true
rm -rf /tmp/config-test-mount-writable || true
# Purge tools
sudo snap remove juju --purge
sudo snap remove lxd --purge
test-shared-storage-web-worker:
name: Test shared storage (mode=web+worker)
runs-on: ubuntu-latest
timeout-minutes: 30
needs: test-shared-storage-auto
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download charm artifact
uses: actions/download-artifact@v4
with:
name: concourse-ci-machine-charm
- name: Setup LXD
uses: canonical/setup-lxd@v1
with:
channel: 5.21/stable
- name: Configure LXD IPv6
run: |
lxc network set lxdbr0 ipv6.address none
lxc network set lxdbr0 ipv6.dhcp false
lxc network set lxdbr0 ipv6.nat false
- name: Install Juju
run: |
sudo snap install juju --channel 3.6/stable
sudo snap install juju-wait --classic
- name: Bootstrap Juju
run: juju bootstrap localhost test-controller --config test-mode=true
- name: Make script executable
run: chmod +x ./scripts/deploy-test.sh
- name: Deploy
run: ./scripts/deploy-test.sh --mode=web+worker --shared-storage=lxc --skip-cleanup --steps=deploy
- name: Verify
run: ./scripts/deploy-test.sh --mode=web+worker --shared-storage=lxc --skip-cleanup --steps=verify
- name: Test Mounts
run: ./scripts/deploy-test.sh --mode=web+worker --shared-storage=lxc --skip-cleanup --steps=mounts
- name: Test Tagged
run: ./scripts/deploy-test.sh --mode=web+worker --shared-storage=lxc --skip-cleanup --steps=tagged
- name: Test GPU (if available)
run: ./scripts/deploy-test.sh --mode=web+worker --shared-storage=lxc --skip-cleanup --steps=gpu
- name: Test Upgrade
run: ./scripts/deploy-test.sh --mode=web+worker --shared-storage=lxc --skip-cleanup --steps=upgrade
- name: Test Scale Out
run: ./scripts/deploy-test.sh --mode=web+worker --shared-storage=lxc --skip-cleanup --steps=scale-out
- name: Verify Tagged After Upgrade
run: ./scripts/deploy-test.sh --mode=web+worker --shared-storage=lxc --skip-cleanup --steps=tagged
- name: Cleanup
if: always()
run: |
# Cleanup model used by script
MODEL_NAME="concourse-test-web-worker-lxc"
echo $MODEL_NAME | juju destroy-model $MODEL_NAME --destroy-storage --force --no-wait || true
# Cleanup shared storage dir
sudo rm -fr /tmp/${MODEL_NAME}-shared || true
# Cleanup mount dirs
rm -rf /tmp/config-test-mount || true
rm -rf /tmp/config-test-mount-writable || true
# Purge tools
sudo snap remove juju --purge
sudo snap remove lxd --purge
publish-charm:
name: Publish Charm to Edge
needs: [test-auto-mode, test-web-worker-mode, test-shared-storage-auto, test-shared-storage-web-worker]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download charm artifact
uses: actions/download-artifact@v4
with:
name: concourse-ci-machine-charm
- name: Install Charmcraft
run: sudo snap install charmcraft --classic
- name: Upload charm to Charmhub
env:
CHARMCRAFT_AUTH: ${{ secrets.CHARMHUB_TOKEN }}
run: |
charmcraft upload ./concourse-ci-machine_amd64.charm --release edge
cleanup-artifacts:
name: Cleanup artifacts
runs-on: ubuntu-latest
needs: [test-auto-mode, test-web-worker-mode, test-shared-storage-auto, test-shared-storage-web-worker, publish-charm]
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
steps:
- name: Delete charm artifact
run: |
# Find artifact ID
ARTIFACT_ID=$(gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" \
--jq '.artifacts[] | select(.name == "concourse-ci-machine-charm") | .id')
# Delete artifact if found
if [ -n "$ARTIFACT_ID" ]; then
echo "Deleting artifact ID: $ARTIFACT_ID"
gh api --method DELETE "repos/${{ github.repository }}/actions/artifacts/$ARTIFACT_ID"
else
echo "Artifact not found"
fi
env:
GH_TOKEN: ${{ github.token }}