Skip to content
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
4 changes: 3 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
use flake
CARGO_TERM_COLOR=always
RUST_BACKTRACE=full
RUST_LOG="contained=debug,info"
8 changes: 3 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
version: 2
updates:
- package-ecosystem: docker
directories:
- .
- /.docker
directories: [/, /.docker]
schedule:
interval: monthly
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
- package-ecosystem: cargo
schedule:
interval: monthly
directories:
- /contained
- /core
- /derive
- /macros
schedule:
interval: monthly
20 changes: 8 additions & 12 deletions .github/workflows/cargo-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

on:
repository_dispatch:
types: [ cargo-bench, benchmark ]
types: [cargo-bench, benchmark]
workflow_dispatch:

permissions:
Expand All @@ -27,24 +27,20 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [ x86_64-unknown-linux-gnu ]
target: [x86_64-unknown-linux-gnu]
steps:
-
name: Checkout
uses: actions/checkout@v5
-
name: Setup Rust
- name: Checkout
uses: actions/checkout@v6
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
target: ${{ matrix.target }}
-
name: Benchmark the workspace
- name: Benchmark the workspace
run: cargo bench --locked --verbose --workspace --target ${{ matrix.target }} --features full --
-
name: Upload the benchmarks
- name: Upload the benchmarks
id: artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: Benchmark Report (${{ github.event.repository.name }})
if-no-files-found: error
Expand Down
36 changes: 14 additions & 22 deletions .github/workflows/cargo-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ concurrency:

on:
pull_request:
branches: [ main, master, $default-branch ]
types: [ opened, synchronize, reopened ]
branches: [main, master]
types: [opened, reopened]
push:
branches: [ main, master, $default-branch ]
tags:
- v*.*.*
- "*-nightly"
branches: [main, master]
tags: [latest, v*.*.*, "*-nightly"]
release:
types: [ created, edited ]
types: [created, edited]
repository_dispatch:
types: [ clippy, cargo-clippy ]
types: [clippy, cargo-clippy]
workflow_dispatch:

jobs:
Expand All @@ -28,30 +26,24 @@ jobs:
security-events: write
statuses: write
steps:
-
name: Checkout
uses: actions/checkout@v5
-
name: Setup Rust
- name: Checkout
uses: actions/checkout@v6
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
components: clippy, rustfmt
toolchain: nightly
override: true
-
name: Setup the for sarif output
- name: Setup the for sarif output
run: cargo install clippy-sarif sarif-fmt
-
name: Run Clippy
run:
cargo clippy
- name: Run Clippy
run: cargo clippy
--all-features
--workspace
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
-
name: Upload analysis
uses: github/codeql-action/upload-sarif@v3
- name: Upload analysis
uses: github/codeql-action/upload-sarif@v4
continue-on-error: true
with:
sarif_file: rust-clippy-results.sarif
Expand Down
23 changes: 9 additions & 14 deletions .github/workflows/cargo-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ concurrency:

on:
repository_dispatch:
types: [ deploy, publish, cargo-publish, crates-io ]
types: [deploy, publish, cargo-publish, crates-io]
workflow_dispatch:
inputs:
publish:
default: true
description: 'Publish the crate(s) to crates.io?'
description: "Publish the crate(s) to crates.io?"
type: boolean

jobs:
Expand All @@ -24,7 +24,7 @@ jobs:
environment:
name: crates-io
outputs:
url: ${{ steps.results.outputs.url }}
url: ${{ steps.results.outputs.url }}
permissions:
contents: read
deployments: write
Expand All @@ -39,20 +39,15 @@ jobs:
- contained-macros
- contained
steps:
-
name: Checkout
uses: actions/checkout@v5
-
name: Setup Rust
- name: Checkout
uses: actions/checkout@v6
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
name: Publish (${{ matrix.package }})
- name: Publish (${{ matrix.package }})
id: publish
run: cargo publish --locked --package ${{ matrix.package }}
-
name: Set output(s)
- name: Set output(s)
id: results
run:
echo "url=https://crates.io/crates/${{ matrix.package }}" >> "$GITHUB_OUTPUT"
run: echo "url=https://crates.io/crates/${{ matrix.package }}" >> "$GITHUB_OUTPUT"
70 changes: 39 additions & 31 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
name: cleanup

on:
pull_request:
types:
- closed

jobs:
cache_cleanup:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
-
name: Cleanup
run: |
echo "Fetching list of cache keys"
cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')

## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh cache delete $cacheKey
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
name: cleanup

on:
pull_request:
types: [closed]

jobs:
cleanup:
name: Cleanup PR Cache(s)
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
permissions:
actions: write
outputs:
status: dirty
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Cleanup
run: |
echo "Fetching list of cache keys"
cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')

## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh cache delete $cacheKey
done
echo "Done"
- name: Set output(s)
run: |
echo "status=cleaned" >> "$GITHUB_OUTPUT"
26 changes: 11 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ name: release

on:
release:
types: [ published ]
types: [published]
repository_dispatch:
types: [ release ]
types: [release]
workflow_dispatch:
inputs:
draft:
default: false
description: 'Create a draft release'
description: "Create a draft release"
required: true
type: boolean
prerelease:
default: false
description: 'Create a prerelease'
description: "Create a prerelease"
required: true
type: boolean

Expand All @@ -26,16 +26,14 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v5
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.ref }}
repository: ${{ github.repository }}
-
name: Publish to crates.io
uses: peter-evans/repository-dispatch@v3
- name: Publish to crates.io
uses: peter-evans/repository-dispatch@v4
with:
event-type: cargo-publish
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
Expand All @@ -48,11 +46,9 @@ jobs:
IS_DRAFT: ${{ github.event.inputs.draft || false }}
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v5
-
name: Create release
- name: Checkout
uses: actions/checkout@v6
- name: Create release
uses: softprops/action-gh-release@v2
with:
append_body: false
Expand Down
Loading