Skip to content

Commit

Permalink
Clean up CI
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-noland committed Nov 5, 2024
1 parent 989f59a commit 7b31177
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 142 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
# Production artifacts are produced in a sterile environment (in another CI workflow).


name: Update Version
name: "bump.yml"
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
type: "boolean"
description: "Run with tmate enabled"
required: false
default: false
Expand All @@ -24,38 +24,42 @@ on:
- cron: '18 3 * * *'

concurrency:
group: ${{ github.workflow }}:${{ github.ref }}
group: "${{ github.workflow }}:${{ github.ref }}"
cancel-in-progress: true

permissions:
contents: write
pull-requests: write
packages: read
id-token: write
contents: "write"
pull-requests: "write"
packages: "read"
id-token: "write"
jobs:
update:
runs-on: ubuntu-latest
runs-on: "ubuntu-latest"
steps:
- name: login to ghcr.io
uses: docker/login-action@v3
- name: "login to ghcr.io"
uses: "docker/login-action@v3"
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
- run: ./scripts/update-versions.sh
- uses: cargo-bins/cargo-binstall@main
- name: install just
run: cargo binstall --no-confirm just
- name: install cargo-deny
run: cargo binstall --no-confirm cargo-deny
registry: "ghcr.io"
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: "Checkout"
uses: "actions/checkout@v4"
- run: |
./scripts/update-versions.sh
- uses: "cargo-bins/cargo-binstall@main"
- name: "install just"
run: |
cargo binstall --no-confirm just
- name: "install cargo-deny"
run: |
cargo binstall --no-confirm cargo-deny
# Don't even bother with the PR if
# a) somebody introduced a license we can't accept
# b) some security vuln came up and cargo deny is yelling
- run: just cargo deny check
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
- run: |
just cargo deny check
- name: "Create Pull Request"
uses: "peter-evans/create-pull-request@v7"
with:
branch: 'bump/dpdk-sys'
title: 'bump/dpdk-sys'
Expand All @@ -67,9 +71,9 @@ jobs:
sign-commits: 'true'
body: 'bump dpdk-sys'

- name: Setup tmate session for debug
- name: "Setup tmate session for debug"
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
uses: "mxschmitt/action-tmate@v3"
timeout-minutes: 60
with:
limit-access-to-actor: true
Original file line number Diff line number Diff line change
Expand Up @@ -7,78 +7,84 @@

# Production artifacts are produced in a sterile environment (in another CI workflow).

name: Developer Experience
name: "dev.yml"
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
type: "boolean"
description: "Run with tmate enabled"
required: false
default: false
push: {}

concurrency:
group: ${{ github.workflow }}:${{ github.ref }}
group: "${{ github.workflow }}:${{ github.ref }}"
cancel-in-progress: true

permissions:
contents: write
packages: write
id-token: write
contents: "read"
packages: "write"
id-token: "write"

jobs:
build:
strategy:
fail-fast: false
matrix:
rust:
- toolchain: stable
- toolchain: "stable"
optional: false
- toolchain: beta
- toolchain: "beta"
optional: true
- toolchain: nightly
- toolchain: "nightly"
optional: true
just:
- version: 1.36.0
- version: "1.36.0"
continue-on-error: ${{ matrix.rust.optional }}
runs-on: lab
runs-on: "lab"
timeout-minutes: 45
steps:
- name: login to ghcr.io
uses: docker/login-action@v3
- 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
registry: "ghcr.io"
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: "install rust"
uses: "dtolnay/rust-toolchain@stable"
with:
just-version: ${{ matrix.just.version }}
- name: install rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust.toolchain }}
targets: x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl
- name: Checkout
uses: actions/checkout@v4
- uses: cargo-bins/cargo-binstall@main
- name: install nextest
run: cargo binstall --no-confirm cargo-nextest
- name: install cargo-deny
run: cargo binstall --no-confirm cargo-deny
- run: just cargo deny check
- name: install openssl and libssl-dev (needed for markdown-test-report)
toolchain: "${{ matrix.rust.toolchain }}"
targets: "x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl"
- name: "Checkout"
uses: "actions/checkout@v4"
- uses: "cargo-bins/cargo-binstall@main"
- name: "install just"
run: |
cargo binstall --no-confirm just
- name: "install nextest"
run: |
cargo binstall --no-confirm cargo-nextest
- name: "install cargo-deny"
run: |
cargo binstall --no-confirm cargo-deny
- run: |
just cargo deny check
- name: "install openssl and libssl-dev (needed for markdown-test-report)"
run: |
sudo apt-get update
sudo apt-get --yes --no-install-recommends install pkg-config openssl libssl-dev colorized-logs
- name: install markdown-test-report
run: cargo binstall --no-confirm markdown-test-report
- name: "install markdown-test-report"
run: |
cargo binstall --no-confirm markdown-test-report
- name: refresh-compile-env
run: just --yes refresh-compile-env
- run: just --yes fake-nix
run: |
just --yes refresh-compile-env
- run: |
just --yes fake-nix
- run: just cargo +${{matrix.rust.toolchain}} build --locked --profile=dev --target=x86_64-unknown-linux-gnu
- run: |
just cargo +${{matrix.rust.toolchain}} build --locked --profile=dev --target=x86_64-unknown-linux-gnu
continue-on-error: ${{ matrix.rust.optional }}
- name: "tests: rust ${{ matrix.rust.toolchain }} profile=dev target=x86_64-unknown-linux-gnu"
run: |
Expand All @@ -87,7 +93,8 @@ jobs:
just debug=true rust=${{matrix.rust.toolchain}} profile=dev target=x86_64-unknown-linux-gnu report
continue-on-error: ${{ matrix.rust.optional }}

- run: just cargo +${{matrix.rust.toolchain}} build --locked --profile=dev --target=x86_64-unknown-linux-musl
- run: |
just cargo +${{matrix.rust.toolchain}} build --locked --profile=dev --target=x86_64-unknown-linux-musl
continue-on-error: ${{ matrix.rust.optional }}
- name: "tests: rust ${{ matrix.rust.toolchain }} profile=dev target=x86_64-unknown-linux-musl"
run: |
Expand All @@ -96,7 +103,8 @@ jobs:
just debug=true rust=${{matrix.rust.toolchain}} profile=dev target=x86_64-unknown-linux-musl report
continue-on-error: ${{ matrix.rust.optional }}

- run: just cargo +${{matrix.rust.toolchain}} build --locked --profile=release --target=x86_64-unknown-linux-gnu
- run: |
just cargo +${{matrix.rust.toolchain}} build --locked --profile=release --target=x86_64-unknown-linux-gnu
continue-on-error: ${{ matrix.rust.optional }}
- name: "tests: rust ${{ matrix.rust.toolchain }} profile=release target=x86_64-unknown-linux-gnu"
run: |
Expand All @@ -105,7 +113,8 @@ jobs:
just debug=true rust=${{matrix.rust.toolchain}} profile=release target=x86_64-unknown-linux-gnu report
continue-on-error: ${{ matrix.rust.optional }}

- run: just cargo +${{matrix.rust.toolchain}} build --locked --profile=release --target=x86_64-unknown-linux-musl
- run: |
just cargo +${{matrix.rust.toolchain}} build --locked --profile=release --target=x86_64-unknown-linux-musl
continue-on-error: ${{ matrix.rust.optional }}
- name: "tests: rust ${{ matrix.rust.toolchain }} profile=release target=x86_64-unknown-linux-musl"
run: |
Expand All @@ -114,15 +123,15 @@ jobs:
just debug=true rust=${{matrix.rust.toolchain}} profile=release target=x86_64-unknown-linux-musl report
continue-on-error: ${{ matrix.rust.optional }}

- uses: actions/upload-artifact@v4
- uses: "actions/upload-artifact@v4"
if: ${{ always() }}
with:
name: "test-results-${{ matrix.rust.toolchain }}"
path: target/nextest/
path: "target/nextest/"

- name: Setup tmate session for debug
- name: "Setup tmate session for debug"
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 30
uses: "mxschmitt/action-tmate@v3"
timeout-minutes: 60
with:
limit-access-to-actor: true
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Build and deploy docs
name: "docs.yml"

on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
type: "boolean"
description: "Run the build with tmate debugging enabled"
pull_request: { }
push:
Expand Down Expand Up @@ -58,8 +58,9 @@ jobs:
runs-on: "ubuntu-latest"
steps:

- uses: cargo-bins/cargo-binstall@main
- run: cargo binstall --no-confirm just
- uses: "cargo-bins/cargo-binstall@main"
- run: |
cargo binstall --no-confirm just
- name: "Checkout"
uses: "actions/checkout@v4"
Expand Down Expand Up @@ -122,9 +123,9 @@ jobs:
NETLIFY_SITE_ID: "${{ secrets.NETLIFY_SITE_ID }}"
timeout-minutes: 5

- name: Setup tmate session for debug
- name: "Setup tmate session for debug"
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
uses: "mxschmitt/action-tmate@v3"
timeout-minutes: 60
with:
limit-access-to-actor: true
Loading

0 comments on commit 7b31177

Please sign in to comment.