Skip to content

Commit

Permalink
Test changes on automation for building the snap on arm64 is working (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcocenza authored Sep 18, 2024
1 parent cddf5da commit 74e8a92
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,36 +48,51 @@ jobs:
run: tox -e lint

build:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [[ubuntu-22.04], [self-hosted, jammy, ARM64]]
needs:
- lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Complete git history is required to generate the version from git tags.

- name: Verify snap builds successfully
id: build
uses: snapcore/action-build@v1

- name: Determine system architecture
run: echo "SYSTEM_ARCH=$(uname -m)" >> $GITHUB_ENV

- name: Upload the built snap
uses: actions/upload-artifact@v4
with:
name: SNAP_FILE
path: dcgm*.snap
name: snap_${{ env.SYSTEM_ARCH }}
path: ${{ steps.build.outputs.snap }}

func:
needs:
- build
runs-on: ubuntu-22.04
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [[ubuntu-22.04], [self-hosted, jammy, ARM64]]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Complete git history is required to generate the version from git tags.

- name: Determine system architecture
run: echo "SYSTEM_ARCH=$(uname -m)" >> $GITHUB_ENV

- name: Download the built snap
uses: actions/download-artifact@v4
with:
name: SNAP_FILE
name: snap_${{ env.SYSTEM_ARCH }}

- name: Set up Python 3.10
uses: actions/setup-python@v5
Expand All @@ -89,5 +104,5 @@ jobs:
python -m pip install --upgrade pip
python -m pip install 'tox<5'
- name: Run unit tests
- name: Run functional tests
run: tox -e func
6 changes: 5 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ jobs:
secrets: inherit

release:
runs-on: ubuntu-22.04
runs-on: ${{ matrix.runs-on }}
needs: check
strategy:
fail-fast: false
matrix:
runs-on: [[ubuntu-22.04], [self-hosted, ARM64]]
outputs:
snap: ${{ steps.build.outputs.snap }}
steps:
Expand Down

0 comments on commit 74e8a92

Please sign in to comment.