Skip to content
Myr

Use --locked for cargo, enable 'cargo fmt' check

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Peter · committed by David Peter · parent 78e2139 · Browse files · 1 file+12 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+12 added−5 removed

  • other:+12 added−5 removed

1 file+12 added−5 removed

modified:.github/workflows/CICD.yml+12 added-5 removed
25 unmodified lines
26 with:27 toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}28 default: true29 profile: minimal # minimal component installation (ie, no documentation)30 components: clippy30 components: clippy, rustfmt31 - name: Ensure `cargo fmt` has been run32 uses: actions-rs/cargo@v133 with:34 command: fmt35 args: -- --check36 - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)37 uses: actions-rs/cargo@v138 with:39 command: clippy35 args: --all-targets --all-features40 args: --locked --all-targets --all-features41 - name: Run tests42 uses: actions-rs/cargo@v143 with:44 command: test45 args: --locked4647 build:48 name: ${{ matrix.job.os }} (${{ matrix.job.target }})49 runs-on: ${{ matrix.job.os }}
55 unmodified lines
105 uses: actions-rs/cargo@v1106 with:107 use-cross: ${{ matrix.job.use-cross }}108 command: build103 args: --release --target=${{ matrix.job.target }}109 args: --locked --release --target=${{ matrix.job.target }}110111 - name: Strip debug information from executable112 id: strip113 shell: bash
33 unmodified lines
147 - name: Set testing options148 id: test-options149 shell: bash150 run: |151 # test only library unit tests and binary for arm-type targets152 unset CARGO_TEST_OPTIONS146 unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--bin ${PROJECT_NAME}" ;; esac;153 unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--lib --bin ${PROJECT_NAME}" ;; esac;154 echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}155156 - name: Run tests157 uses: actions-rs/cargo@v1158 with:159 use-cross: ${{ matrix.job.use-cross }}160 command: test154 args: --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}161 args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}162163 - name: Create tarball164 id: package165 shell: bash
175 unmodified lines