Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,9 @@ jobs:
rustup toolchain install --no-self-update --profile minimal $TOOLCHAIN
rustup default $TOOLCHAIN

- name: cargo update compiler & tools
# Remove first line that always just says "Updating crates.io index"
run: |
echo -e "\ncompiler & tools dependencies:" >> cargo_update.log
cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
- name: cargo update library
run: |
echo -e "\nlibrary dependencies:" >> cargo_update.log
cargo update --manifest-path library/Cargo.toml 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
- name: cargo update rustbook
run: |
echo -e "\nrustbook dependencies:" >> cargo_update.log
cargo update --manifest-path src/tools/rustbook/Cargo.toml 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
- name: cargo update
run: ./src/tools/update-lockfile.sh

- name: upload Cargo.lock artifact for use in PR
uses: actions/upload-artifact@v4
with:
Expand Down
18 changes: 18 additions & 0 deletions src/tools/update-lockfile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

# Updates the workspaces in `.`, `library` and `src/tools/rustbook`
# Logs are written to `cargo_update.log`
# Used as part of regular dependency bumps

set -euo pipefail

echo -e "\ncompiler & tools dependencies:" > cargo_update.log
# Remove first line that always just says "Updating crates.io index"
cargo update 2>&1 | sed '/crates.io index/d' | \
tee -a cargo_update.log
echo -e "\nlibrary dependencies:" >> cargo_update.log
cargo update --manifest-path library/Cargo.toml 2>&1 | sed '/crates.io index/d' | \
tee -a cargo_update.log
echo -e "\nrustbook dependencies:" >> cargo_update.log
cargo update --manifest-path src/tools/rustbook/Cargo.toml 2>&1 | sed '/crates.io index/d' | \
tee -a cargo_update.log
Loading