Skip to content

Commit

Permalink
Use --locked on all cargo install in CI, also remove non-locked e…
Browse files Browse the repository at this point in the history
…xample (#8369)

* Use `--locked` on all `cargo install` in CI

Prevents any updates to rustc or crates from accidentally causing issues
by ensuring that the same set of deps is used over time.

* Remove rust/WASI markdown parser example

The documentation referring to this example was removed in #6994 and
that forgot to remove this as well. This example is building without a
lock file which is causing issues in #8368.
  • Loading branch information
alexcrichton committed Apr 15, 2024
1 parent ef041e7 commit ebbe7a7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-cargo-vet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ runs:
key: cargo-vet-bin-${{ inputs.version }}
- run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH
shell: bash
- run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ inputs.version }} cargo-vet
- run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ inputs.version }} cargo-vet --locked
shell: bash
11 changes: 5 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,9 @@ jobs:
key: cargo-mdbook-bin-${{ env.CARGO_MDBOOK_VERSION }}
- run: |
echo "${{ runner.tool_cache }}/mdbook/bin" >> $GITHUB_PATH
cargo install --root ${{ runner.tool_cache }}/mdbook --version ${{ env.CARGO_MDBOOK_VERSION }} mdbook
cargo install --root ${{ runner.tool_cache }}/mdbook --version ${{ env.CARGO_MDBOOK_VERSION }} mdbook --locked
- run: (cd docs && mdbook build)
- run: cargo build -p wasi-common --features wasmtime/wat,wasmtime/cranelift
- run: (cd docs/rust_wasi_markdown_parser && cargo build)
- run: (cd docs && mdbook test -L ../target/debug/deps)

# Build Rust API documentation.
Expand Down Expand Up @@ -360,7 +359,7 @@ jobs:
path: ${{ runner.tool_cache }}/cargo-ndk
key: cargo-ndk-bin-${{ env.CARGO_NDK_VERSION }}
- run: echo "${{ runner.tool_cache }}/cargo-ndk/bin" >> $GITHUB_PATH
- run: cargo install --root ${{ runner.tool_cache }}/cargo-ndk --version ${{ env.CARGO_NDK_VERSION }} cargo-ndk
- run: cargo install --root ${{ runner.tool_cache }}/cargo-ndk --version ${{ env.CARGO_NDK_VERSION }} cargo-ndk --locked
- run: cargo ndk -t arm64-v8a check -p wasmtime

# Run clippy configuration
Expand Down Expand Up @@ -426,7 +425,7 @@ jobs:
#
# Install the OCaml packages necessary for fuzz targets that use the
# `wasm-spec-interpreter`.
- run: cargo install cargo-fuzz --vers "^0.11"
- run: cargo install cargo-fuzz --vers "^0.11" --locked
- run: sudo apt-get update && sudo apt install -y ocaml-nox ocamlbuild ocaml-findlib libzarith-ocaml-dev
- run: cargo fetch
working-directory: ./fuzz
Expand All @@ -437,7 +436,7 @@ jobs:
#
# Afterwards make sure the generated header file is up to date by ensuring
# that the regeneration process didn't change anything in-tree.
- run: cargo install cbindgen --vers "^0.26"
- run: cargo install cbindgen --vers "^0.26" --locked
- run: rustup component add rust-src
- run: ./build.sh ./embedding/x86_64-unknown-unknown.json
working-directory: ./examples/min-platform
Expand Down Expand Up @@ -747,7 +746,7 @@ jobs:
path: ${{ runner.tool_cache }}/cargo-nextest
key: cargo-nextest-bin-${{ env.CARGO_NEXTEST_VERSION }}
- run: echo "${{ runner.tool_cache }}/cargo-nextest/bin" >> $GITHUB_PATH
- run: cargo install --root ${{ runner.tool_cache }}/cargo-nextest --version ${{ env.CARGO_NEXTEST_VERSION }} cargo-nextest
- run: cargo install --root ${{ runner.tool_cache }}/cargo-nextest --version ${{ env.CARGO_NEXTEST_VERSION }} cargo-nextest --locked
- run: |
cargo miri nextest run -j4 --no-fail-fast \
-p wasmtime \
Expand Down
10 changes: 0 additions & 10 deletions docs/rust_wasi_markdown_parser/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions docs/rust_wasi_markdown_parser/example_markdown.md

This file was deleted.

46 changes: 0 additions & 46 deletions docs/rust_wasi_markdown_parser/src/main.rs

This file was deleted.

0 comments on commit ebbe7a7

Please sign in to comment.