Skip to content

Commit

Permalink
ci: cleanup and reorg all workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianFranzen committed Jul 1, 2024
1 parent b15122f commit 7192b9b
Show file tree
Hide file tree
Showing 28 changed files with 536 additions and 815 deletions.
55 changes: 55 additions & 0 deletions .github/actions/cargo-command/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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: Clear cargo registry and index
shell: bash
run: rm -rf ~/.cargo/registry ~/.cargo/git
- 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 }}
14 changes: 0 additions & 14 deletions .github/actions/rust-init/action.yaml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/benchmark.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/build-chronicle.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/build-docs.yaml

This file was deleted.

79 changes: 0 additions & 79 deletions .github/workflows/build-node.yaml

This file was deleted.

Loading

0 comments on commit 7192b9b

Please sign in to comment.