diff --git a/.github/actions/cargo-command/action.yaml b/.github/actions/cargo-command/action.yaml index 9575e6d51d..c50f6a7d95 100644 --- a/.github/actions/cargo-command/action.yaml +++ b/.github/actions/cargo-command/action.yaml @@ -44,9 +44,9 @@ 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 @@ -54,13 +54,13 @@ runs: 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' || '' }} diff --git a/.github/workflows/pr-test-cargo.yaml b/.github/workflows/pr-test-cargo.yaml index 75c8b6904b..706b9f6ed4 100644 --- a/.github/workflows/pr-test-cargo.yaml +++ b/.github/workflows/pr-test-cargo.yaml @@ -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 diff --git a/.github/workflows/pr-test-clippy.yaml b/.github/workflows/pr-test-clippy.yaml index 4cf57b849c..a7339aea76 100644 --- a/.github/workflows/pr-test-clippy.yaml +++ b/.github/workflows/pr-test-clippy.yaml @@ -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