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

Backtracking #172

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft
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
7 changes: 2 additions & 5 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
[env]
COMPILE_ENV = { value = "compile-env", relative = true, force = false }
LIBCLANG_PATH = { value = "compile-env/lib/libclang.so", relative = true, force = true }
CLANG_PATH = { value = "compile-env/bin/clang", relative = true, force = true }
PATH = { value = "compile-env/bin", relative = true, force = true }
LIBCLANG_PATH = { value = "compile-env/lib", relative = true, force = true }

[build]
target = "x86_64-unknown-linux-gnu"

[alias]
just = ["just", "cargo"]
sterile = ["just", "sterile", "cargo"]
3 changes: 1 addition & 2 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ jobs:
uses: "actions/checkout@v4"
- name: "install rust"
uses: "dtolnay/rust-toolchain@stable"
- uses: "cargo-bins/cargo-binstall@main"
- name: "install cargo-deny"
run: |
cargo binstall --no-confirm cargo-deny
cargo install cargo-deny
- name: "deny check"
run: |
cargo deny check
Expand Down
96 changes: 38 additions & 58 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The primary point of this workflow is to ensure that the developer experience is good.
# We take a very vanilla ubuntu image, install all necessary dependencies via "normal" means,
# We take a very vanilla image, install all necessary dependencies via "normal" means,
# and then run the build and test steps as described in the README.md file.

# The artifacts produced by these builds are not intended to be used for anything other than
Expand All @@ -10,12 +10,12 @@
name: "dev.yml"

on:
pull_request: {}
pull_request: { }
push:
branches:
- "main"
merge_group:
types: ["checks_requested"]
types: [ "checks_requested" ]
workflow_dispatch:
inputs:
debug_enabled:
Expand All @@ -39,7 +39,7 @@ jobs:
permissions:
contents: "read"
pull-requests: "read"
runs-on: "ubuntu-latest"
runs-on: "ubuntu-24.04"
outputs:
devfiles: "${{ steps.changes.outputs.devfiles }}"
steps:
Expand All @@ -64,12 +64,16 @@ jobs:
strategy:
fail-fast: false
matrix:
runner:
- "lab"
- "ubuntu-22.04"
- "ubuntu-24.04"
rust:
- "stable"
- "beta"
- "nightly"
name: "Developer build"
runs-on: "lab"
runs-on: "${{matrix.runner}}"
timeout-minutes: 45
steps:
- name: "login to ghcr.io"
Expand All @@ -88,31 +92,38 @@ jobs:
with:
persist-credentials: "false"
fetch-depth: "0"
- 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 debug=true 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
cargo install just
- name: refresh-compile-env
run: |
just --yes debug=true refresh-compile-env
- run: |
just --yes debug=true fake-nix

# At this stage, for Pull Requests, we're back to the HEAD of the branch,
# start running tests for different configurations.
- name: "test debug (glibc)"
run: |
just cargo +${{matrix.rust}} build --locked --profile=debug --target=x86_64-unknown-linux-gnu
just cargo +${{matrix.rust}} test --locked --profile=debug --target=x86_64-unknown-linux-gnu

- name: "test release (glibc)"
run: |
just cargo +${{matrix.rust}} build --locked --profile=release --target=x86_64-unknown-linux-gnu
just cargo +${{matrix.rust}} test --locked --profile=release --target=x86_64-unknown-linux-gnu

- name: "test debug (musl)"
run: |
just cargo +${{matrix.rust}} build --locked --profile=debug --target=x86_64-unknown-linux-musl
just cargo +${{matrix.rust}} test --locked --profile=debug --target=x86_64-unknown-linux-musl

- name: "test release (musl)"
run: |
just cargo +${{matrix.rust}} build --locked --profile=release --target=x86_64-unknown-linux-musl
just cargo +${{matrix.rust}} test --locked --profile=release --target=x86_64-unknown-linux-musl


- run: |
# Run a simple build for each separate commit (for "pull_request")
# or for the HEAD of the branch (other events).
Expand All @@ -131,43 +142,11 @@ jobs:
printf "::notice::HEAD remains at %s\n" "$(git log --oneline --no-decorate -n 1)"
continue-on-error: ${{ matrix.rust.optional }}

# At this stage, for Pull Requests, we're back to the HEAD of the branch,
# start running tests for different configurations.
- name: "tests: rust ${{ matrix.rust }} profile=dev target=x86_64-unknown-linux-gnu"
run: |
export GITHUB_STEP_SUMMARY
just debug=true rust=${{matrix.rust}} profile=dev target=x86_64-unknown-linux-gnu test
just debug=true rust=${{matrix.rust}} profile=dev target=x86_64-unknown-linux-gnu report

- run: |
just cargo +${{matrix.rust}} build --locked --profile=dev --target=x86_64-unknown-linux-musl
- name: "tests: rust ${{ matrix.rust }} profile=dev target=x86_64-unknown-linux-musl"
run: |
export GITHUB_STEP_SUMMARY
just debug=true rust=${{matrix.rust}} profile=dev target=x86_64-unknown-linux-musl test
just debug=true rust=${{matrix.rust}} profile=dev target=x86_64-unknown-linux-musl report

- run: |
just debug=true cargo +${{matrix.rust}} build --locked --profile=release --target=x86_64-unknown-linux-gnu
- name: "tests: rust ${{ matrix.rust }} profile=release target=x86_64-unknown-linux-gnu"
- name: "install cargo-deny"
run: |
export GITHUB_STEP_SUMMARY
just debug=true rust=${{matrix.rust}} profile=release target=x86_64-unknown-linux-gnu test
just debug=true rust=${{matrix.rust}} profile=release target=x86_64-unknown-linux-gnu report

cargo install cargo-deny
- run: |
just debug=true cargo +${{matrix.rust}} build --locked --profile=release --target=x86_64-unknown-linux-musl
- name: "tests: rust ${{ matrix.rust }} profile=release target=x86_64-unknown-linux-musl"
run: |
export GITHUB_STEP_SUMMARY
just debug=true rust=${{matrix.rust}} profile=release target=x86_64-unknown-linux-musl test
just debug=true rust=${{matrix.rust}} profile=release target=x86_64-unknown-linux-musl report

- uses: "actions/upload-artifact@v4"
if: ${{ always() }}
with:
name: "test-results-${{ matrix.rust }}"
path: "target/nextest/"
just debug=true cargo deny check

- name: "Setup tmate session for debug"
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
Expand All @@ -176,9 +155,10 @@ jobs:
with:
limit-access-to-actor: true


summary:
name: "Summary"
runs-on: "ubuntu-latest"
runs-on: "ubuntu-24.04"
needs:
- build
if: ${{ always() && needs.build.result != 'skipped' }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ jobs:
runs-on: "ubuntu-latest"
steps:

- uses: "cargo-bins/cargo-binstall@main"
- name: "install rust"
uses: "dtolnay/rust-toolchain@stable"

- run: |
cargo binstall --no-confirm just
cargo install just

- name: "Checkout"
uses: "actions/checkout@v4"
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/sterile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ jobs:
toolchain: "${{ matrix.rust }}"
targets: "x86_64-unknown-linux-gnu"

- uses: "cargo-bins/cargo-binstall@main"
- name: "install just"
run: |
cargo binstall --no-confirm just
cargo install just

- name: "Checkout"
uses: "actions/checkout@v4"
Expand Down Expand Up @@ -122,7 +121,7 @@ jobs:
libssl-dev \
openssl \
pkg-config
cargo binstall --no-confirm markdown-test-report
cargo install markdown-test-report

- name: "dev/gnu report"
if: ${{ always() }}
Expand Down Expand Up @@ -193,10 +192,9 @@ jobs:
toolchain: "${{ matrix.rust }}"
targets: "x86_64-unknown-linux-gnu"

- uses: "cargo-bins/cargo-binstall@main"
- name: "install just"
run: |
cargo binstall --no-confirm just
cargo install just

- name: "Checkout"
uses: "actions/checkout@v4"
Expand All @@ -207,9 +205,8 @@ jobs:
toolchain: "${{ matrix.rust }}"
targets: "x86_64-unknown-linux-gnu"

- uses: "cargo-bins/cargo-binstall@main"
- run: |
cargo binstall --no-confirm cargo-deny
cargo install cargo-deny
- run: |
just debug=true cargo deny check
- run: |
Expand Down
Loading