Skip to content

avoid sigill

avoid sigill #107

# 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
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
just: 1.36.0
permissions:
contents: write
packages: read
id-token: write
jobs:
compile:
runs-on: ubuntu-latest
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 build --profile=debug --target=x86_64-unknown-linux-gnu
- run: just rust="${{matrix.rust}}" sterile cargo test --profile=debug --target=x86_64-unknown-linux-gnu
# - run: just rust="${{matrix.rust}}" sterile cargo build --profile=debug --target=x86_64-unknown-linux-musl
# - run: just rust="${{matrix.rust}}" sterile cargo test --profile=debug --target=x86_64-unknown-linux-musl
- run: just rust="${{matrix.rust}}" sterile cargo build --profile=release --target=x86_64-unknown-linux-gnu
# - run: just rust="${{matrix.rust}}" sterile cargo test --profile=release --target=x86_64-unknown-linux-gnu
# - run: just rust="${{matrix.rust}}" sterile cargo build --profile=release --target=x86_64-unknown-linux-musl
# - run: just rust="${{matrix.rust}}" sterile cargo test --profile=release --target=x86_64-unknown-linux-musl
- run: |
set -euxo pipefail
tar \
--format=posix \
--sort=name \
--clamp-mtime \
--mtime=0 \
--numeric-owner \
--owner=0 \
--group=0 \
--mode='go+u,go-w' \
-cnf dpdk-sys-${{ matrix.dpdk_sys }}-rust-${{ matrix.rust.toolchain }}-sterile.tar \
sterile
- run: |
set -euxo pipefail
zstd \
--single-thread \
-15 \
--long \
dpdk-sys-${{ matrix.dpdk_sys }}-rust-${{ matrix.rust.toolchain }}-sterile.tar
- uses: actions/upload-artifact@v4
with:
name: dpdk-sys-${{ matrix.dpdk_sys }}-rust-${{ matrix.rust.toolchain }}-sterile.tar.zst
path: dpdk-sys-${{ matrix.dpdk_sys }}-rust-${{ matrix.rust.toolchain }}-sterile.tar.zst
include-hidden-files: true
retention-days: 1
compression-level: 0
overwrite: true