Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixup clippy #55

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[env]
COMPILE_ENV = { value = "compile-env", relative = true, force = false }
SYSROOT = { value = "compile-env/sysroot", relative = true, force = false }

PATH = { value = "compile-env/bin", relative = true, force = true }
LD_LIBRARY_PATH = { value = "compile-env/lib", relative = true, force = true }
LIBCLANG_PATH = { value = "compile-env/lib", relative = true, force = true }
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Build and deploy docs

on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: "Run the build with tmate debugging enabled"
pull_request: { }
push:
branches:
Expand All @@ -20,8 +25,7 @@ permissions:
jobs:
check_changes:
name: "Deduce required tests from code changes"
runs-on:
- "lab"
runs-on: "ubuntu-latest"
outputs:
docs: "${{ steps.changes.outputs.docs }}"
steps:
Expand All @@ -46,10 +50,6 @@ jobs:
- 'design-docs/**'
- 'nix/**'
- '.github/workflows/build-and-deploy-docs.yml'
- uses: cargo-bins/cargo-binstall@main
- run: cargo binstall --no-confirm just
- run: cargo binstall --no-confirm cargo-deny
- run: just cargo deny check

build:
name: "Build and deploy documentation"
Expand Down Expand Up @@ -121,3 +121,10 @@ jobs:
NETLIFY_AUTH_TOKEN: "${{ secrets.NETLIFY_AUTH_TOKEN }}"
NETLIFY_SITE_ID: "${{ secrets.NETLIFY_SITE_ID }}"
timeout-minutes: 5

- name: Setup tmate session for debug
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60
with:
limit-access-to-actor: true
48 changes: 24 additions & 24 deletions .github/workflows/check-developer-experience.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ jobs:
just:
- version: 1.36.0
continue-on-error: ${{ matrix.rust.optional }}
runs-on:
- lab
runs-on: "ubuntu-latest"
timeout-minutes: 45
steps:
- name: login to ghcr.io
Expand Down Expand Up @@ -97,32 +96,33 @@ 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
continue-on-error: ${{ matrix.rust.optional }}
- name: "tests: rust ${{ matrix.rust.toolchain }} profile=release target=x86_64-unknown-linux-gnu"
run: |
export GITHUB_STEP_SUMMARY
just debug=true rust=${{matrix.rust.toolchain}} profile=release target=x86_64-unknown-linux-gnu test
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-gnu
# continue-on-error: ${{ matrix.rust.optional }}
# - name: "tests: rust ${{ matrix.rust.toolchain }} profile=release target=x86_64-unknown-linux-gnu"
# run: |
# export GITHUB_STEP_SUMMARY
# just debug=true rust=${{matrix.rust.toolchain}} profile=release target=x86_64-unknown-linux-gnu test
# 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
continue-on-error: ${{ matrix.rust.optional }}
- name: "tests: rust ${{ matrix.rust.toolchain }} profile=release target=x86_64-unknown-linux-musl"
run: |
export GITHUB_STEP_SUMMARY
just debug=true rust=${{matrix.rust.toolchain}} profile=release target=x86_64-unknown-linux-musl test
just debug=true rust=${{matrix.rust.toolchain}} profile=release 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-musl
# continue-on-error: ${{ matrix.rust.optional }}
# - name: "tests: rust ${{ matrix.rust.toolchain }} profile=release target=x86_64-unknown-linux-musl"
# run: |
# export GITHUB_STEP_SUMMARY
# just debug=true rust=${{matrix.rust.toolchain}} profile=release target=x86_64-unknown-linux-musl test
# 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
if: ${{ always() }}
with:
name: "test-results-${{ matrix.rust.toolchain }}"
path: target/nextest/
# - name: Setup tmate session for debug
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# timeout-minutes: 30
# with:
# limit-access-to-actor: true

- 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
101 changes: 52 additions & 49 deletions .github/workflows/sterile-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,42 @@ permissions:

jobs:
test:
runs-on:
- lab
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
dpdk_sys:
- main
rust:
- stable
- nightly
# - nightly
steps:
- name: login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"

- uses: cargo-bins/cargo-binstall@main

- name: install just
uses: extractions/setup-just@v2
with:
just-version: ${{env.just}}
run: cargo binstall --no-confirm just

- name: install openssl and libssl-dev (needed for markdown-test-report)
if: ${{ always() }}
run: |
sudo apt-get update
sudo apt-get --yes --no-install-recommends install \
colorized-logs \
libssl-dev \
openssl \
pkg-config

- name: install markdown-test-report
if: ${{ always() }}
run: cargo binstall --no-confirm markdown-test-report

- name: Checkout
uses: actions/checkout@v4

Expand All @@ -62,39 +77,27 @@ jobs:
just rust="${{matrix.rust}}" profile=dev target=x86_64-unknown-linux-musl sterile test
mkdir dev.musl
cp -a ./target/nextest dev.musl
- name: release/gnu sterile test
run: |
export GITHUB_STEP_SUMMARY
just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-gnu sterile test
mkdir release.gnu
cp -a ./target/nextest release.gnu
- name: release/musl sterile test
run: |
export GITHUB_STEP_SUMMARY
just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-musl sterile test
mkdir release.musl
cp -a ./target/nextest release.musl
#- name: release/gnu sterile test
# run: |
# export GITHUB_STEP_SUMMARY
# just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-gnu sterile test
# mkdir release.gnu
# cp -a ./target/nextest release.gnu
#- name: release/musl sterile test
# run: |
# export GITHUB_STEP_SUMMARY
# just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-musl sterile test
# mkdir release.musl
# cp -a ./target/nextest release.musl

# NOTE: we don't even install rust till the sterile tests are done (lowers contamination risk)
- name: install rust
uses: dtolnay/rust-toolchain@stable
if: ${{ always() }}
with:
toolchain: ${{ matrix.rust }}
targets: x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl

- uses: cargo-bins/cargo-binstall@main

- name: install openssl and libssl-dev (needed for markdown-test-report)
run: |
sudo apt-get update
sudo apt-get --yes --no-install-recommends install \
colorized-logs \
libssl-dev \
openssl \
pkg-config
- name: install markdown-test-report
run: cargo binstall --no-confirm markdown-test-report

- name: dev/gnu report
run: |
export GITHUB_STEP_SUMMARY
Expand All @@ -109,19 +112,19 @@ jobs:
just rust="${{matrix.rust}}" profile=dev target=x86_64-unknown-linux-musl report
if: ${{ always() }}

- name: release/gnu report
run: |
export GITHUB_STEP_SUMMARY
export CARGO_TARGET_DIR=release.gnu
just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-gnu report
if: ${{ always() }}
#- name: release/gnu report
# run: |
# export GITHUB_STEP_SUMMARY
# export CARGO_TARGET_DIR=release.gnu
# just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-gnu report
# if: ${{ always() }}

- name: release/musl report
run: |
export GITHUB_STEP_SUMMARY
export CARGO_TARGET_DIR=release.musl
just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-musl report
if: ${{ always() }}
#- name: release/musl report
# run: |
# export GITHUB_STEP_SUMMARY
# export CARGO_TARGET_DIR=release.musl
# just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-musl report
# if: ${{ always() }}

- uses: actions/upload-artifact@v4
if: ${{ always() }}
Expand All @@ -137,16 +140,15 @@ jobs:
limit-access-to-actor: true

push:
runs-on:
- lab
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
dpdk_sys:
- main
rust:
- stable
- nightly
# - nightly
steps:
- name: login to ghcr.io
uses: docker/login-action@v3
Expand All @@ -172,11 +174,12 @@ jobs:
# we want to avoid pushing any container which fails our carg-deny checks
- run: just cargo deny check
- 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=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
# - run: just rust="${{matrix.rust}}" profile=release target=x86_64-unknown-linux-musl push-container

- name: Setup tmate session for debug
if: ${{ failure() }}
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 30
with:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/update-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
name: Update Version
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: "Run with tmate enabled"
required: false
default: false
schedule:
# Check for updates at 3:18am every day.
# I avoid midnight because everyone uses midnight and
Expand Down Expand Up @@ -58,3 +64,10 @@ jobs:
commit-message: 'bump dpdk-sys'
sign-commits: 'true'
body: 'bump dpdk-sys'

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