Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

init: initial commit #24

init: initial commit

init: initial commit #24

Workflow file for this run

name: Build/Test oxidizr
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Build/Test oxidizr
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Rust
run: |
sudo apt-get update
sudo apt-get install -y build-essential
sudo snap install --classic rustup
rustup default stable
- name: Build oxidizr
run: |
cargo build
- name: Run tests
run: |
cargo test -- --show-output
define-matrix:
name: Define spread matrix
runs-on: ubuntu-24.04
outputs:
suites: ${{ steps.suites.outputs.suites }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
- name: Install
run: |
go install github.com/snapcore/spread/cmd/spread@latest
- name: Generate matrix list
id: suites
run: |
list="$(spread -list lxd | jq -r -ncR '[inputs | select(length>0)]')"
echo "suites=$list"
echo "suites=$list" >> $GITHUB_OUTPUT
spread-tests:
name: Spread (${{ matrix.suite }})
runs-on: ubuntu-24.04
needs:
- test
- define-matrix
strategy:
fail-fast: false
matrix:
test: ${{ fromJSON(needs.define-matrix.outputs.suites) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download binary artifact
uses: actions/download-artifact@v4
with:
name: binary
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Install
run: |
go install github.com/snapcore/spread/cmd/spread@latest
- name: Run integration tests
run: |
spread -v "${{ matrix.test }}"
snap:
name: Build snap
strategy:
matrix:
include:
- os: ubuntu-24.04
- os: ubuntu-24.04-arm
runs-on: ${{ matrix.os }}
steps:
- name: Check out the code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup LXD
uses: canonical/[email protected]
- name: Setup Snapcraft
run: sudo snap install --classic snapcraft
- name: Build snap
run: snapcraft --verbose