Skip to content

Commit

Permalink
ci: turn features to array
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianFranzen committed Jul 4, 2024
1 parent fc0b67d commit ef5abd5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/actions/cargo-command/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,23 @@ runs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-cache-${{ inputs.package || 'workspace' }}-${{ inputs.features || 'default' }}-${{ hashFiles('Cargo.lock') }}
key: cargo-cache-${{ inputs.package || 'workspace' }}-${{ joint(inputs.features,'_') || 'default' }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-cache-${{ inputs.package || 'workspace' }}-${{ inputs.features || 'default' }}-
cargo-cache-${{ inputs.package || 'workspace' }}-${{ join(inputs.features,'_') || 'default' }}-
cargo-cache-${{ inputs.package || 'workspace' }}-default-
cargo-cache-workspace-
- name: Cache cargo target folder
if: ${{ inputs.cache }}
uses: actions/cache@v4
with:
path: target
key: cargo-${{ inputs.command }}-${{ inputs.profile }}-${{ inputs.package || 'workspace' }}-${{ inputs.features || 'default' }}-${{ hashFiles('Cargo.lock') }}
key: cargo-${{ inputs.command }}-${{ inputs.profile }}-${{ inputs.package || 'workspace' }}-${{ join(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' }}-${{ join(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' || '--workspace' }} ${{ inputs.package }} --profile '${{ inputs.profile }}' --features '${{ inputs.features }}' ${{ inputs.annotate && '--message-format json' || '' }} ${{ inputs.args }} ${{ inputs.annotate && '| cargo-action-fmt' || '' }}
run: cargo ${{ inputs.command }} ${{ inputs.package && '--package' || '--workspace' }} ${{ inputs.package }} --profile '${{ inputs.profile }}' --features '${{ join(inputs.features,',') }}' ${{ inputs.annotate && '--message-format json' || '' }} ${{ inputs.args }} ${{ inputs.annotate && '| cargo-action-fmt' || '' }}
4 changes: 2 additions & 2 deletions .github/workflows/pr-test-cargo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
uses: ./.github/actions/cargo-command
with:
command: test
features: runtime-benchmarks,try-runtime
features: [runtime-benchmarks, try-runtime]
args: --no-run
- name: Run testsuite
uses: ./.github/actions/cargo-command
with:
command: test
features: runtime-benchmarks,try-runtime
features: [runtime-benchmarks, try-runtime]
cache: false
annotate: false
2 changes: 1 addition & 1 deletion .github/workflows/pr-test-clippy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ jobs:
uses: ./.github/actions/cargo-command
with:
command: clippy
features: runtime-benchmarks,try-runtime
features: [runtime-benchmarks, try-runtime]
args: --all-targets -- -D warnings

0 comments on commit ef5abd5

Please sign in to comment.