-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into amar-tss-structured-logs
- Loading branch information
Showing
38 changed files
with
692 additions
and
879 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: "Setup, cache and execute cargo command" | ||
description: "Install dependencies, rust, cache in- and outputs and run cargo command." | ||
inputs: | ||
command: | ||
description: 'Cargo command to run' | ||
required: false | ||
default: 'build' | ||
package: | ||
description: 'Limit execution to a specific package' | ||
required: false | ||
profile: | ||
description: 'Profile under which to run cargo command' | ||
required: false | ||
default: 'release' | ||
features: | ||
description: 'Feature with which to run cargo command' | ||
required: false | ||
args: | ||
description: 'Additional argument to pass to cargo invocation' | ||
required: false | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install rust toolchain | ||
shell: bash | ||
run: rustup show | ||
- name: Install cargo-cache | ||
shell: bash | ||
run: cargo install cargo-cache | ||
- name: Cleanup cargo cache | ||
shell: bash | ||
run: cargo cache --autoclean | ||
- name: Cache cargo registry and index | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
key: cargo-cache-${{ inputs.package || 'workspace' }}-${{ inputs.features || 'default' }}-${{ hashFiles('Cargo.lock') }} | ||
restore-keys: | | ||
cargo-cache-${{ inputs.package || 'workspace' }}-${{ inputs.features || 'default' }}- | ||
cargo-cache-${{ inputs.package || 'workspace' }}-default- | ||
cargo-cache-workspace- | ||
- name: Cache cargo target folder | ||
uses: actions/cache@v4 | ||
with: | ||
path: target | ||
key: cargo-${{ inputs.command }}-${{ inputs.profile }}-${{ inputs.package || 'workspace' }}-${{ inputs.features || 'default' }}-${{ hashFiles('Cargo.lock') }} | ||
restore-keys: | | ||
cargo-${{ inputs.command }}-${{ inputs.profile }}-${{ inputs.package || 'workspace' }}-${{ inputs.features || 'default' }}- | ||
cargo-${{ inputs.command }}-${{ inputs.profile }}-${{ inputs.package || 'workspace' }}-default- | ||
cargo-${{ inputs.command }}-${{ inputs.profile }}-workspace- | ||
- name: Run cargo ${{ inputs.command }} | ||
env: | ||
CARGO_TERM_COLOR: always | ||
shell: bash | ||
run: cargo ${{ inputs.command }} ${{ inputs.package != '' && '--package' || '' }} ${{ inputs.package }} --profile '${{ inputs.profile }}' --features '${{ inputs.features }}' ${{ inputs.args }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.