scratch #135
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a sterile build and test workflow that uses the `dev-env` container image | |
# to build and test the project in a sterile environment. | |
# Artifacts produced by this workflow are intended to be used for production. | |
name: Sterile build + test | |
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: "Run with tmate enabled" | |
required: false | |
default: false | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
just: 1.36.0 | |
permissions: | |
contents: write | |
packages: write | |
id-token: write | |
jobs: | |
compile: | |
runs-on: | |
- lab | |
strategy: | |
fail-fast: false | |
matrix: | |
dpdk_sys: | |
- main | |
rust: | |
- stable | |
- nightly | |
steps: | |
- name: login to ghcr.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: "${{ github.actor }}" | |
password: "${{ secrets.GITHUB_TOKEN }}" | |
- name: install just | |
uses: extractions/setup-just@v2 | |
with: | |
just-version: ${{env.just}} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- run: just rust="${{matrix.rust}}" sterile cargo nextest --profile ci run --locked --target=x86_64-unknown-linux-gnu | |
- run: just rust="${{matrix.rust}}" sterile cargo nextest --profile ci run --locked --target=x86_64-unknown-linux-musl | |
- run: just rust="${{matrix.rust}}" sterile cargo test --locked --profile=release --target=x86_64-unknown-linux-gnu | |
- run: just rust="${{matrix.rust}}" sterile cargo test --locked --profile=release --target=x86_64-unknown-linux-musl | |
- run: just rust="${{matrix.rust}}" profile=debug target=x86_64-unknown-linux-gnu push-container | |
- run: just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-gnu push-container | |
- run: just rust="${{matrix.rust}}" profile=debug target=x86_64-unknown-linux-musl push-container | |
- run: just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-musl push-container | |
- name: Setup tmate session for debug | |
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 30 | |
with: | |
limit-access-to-actor: true |