Skip to content

Commit

Permalink
Upgrade dependencies (shadow#3420)
Browse files Browse the repository at this point in the history
Closes shadow#3419.

Upgrades rust dependencies (except for nix in the shadow-tests crate)
and github actions versions. The "labeler" action changed its config
format, so hopefully I updated it correctly. The tor and tgen versions
have not changed so we don't need to upgrade them.
  • Loading branch information
stevenengler authored Oct 8, 2024
2 parents d783583 + 06b23bc commit 2e032f5
Show file tree
Hide file tree
Showing 24 changed files with 267 additions and 289 deletions.
48 changes: 34 additions & 14 deletions .github/pr_labeler_conf.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,47 @@
"Component: Build":
- "**/CMakeLists.txt"
- "**/Cargo.toml"
- "**/Cargo.lock"
- changed-files:
- any-glob-to-any-file:
- "**/CMakeLists.txt"
- "**/Cargo.toml"
- "**/Cargo.lock"

"Component: Documentation":
- "**/*.md"
- "docs/**/*"
- changed-files:
- any-glob-to-any-file:
- "**/*.md"
- "docs/**/*"

"Component: Libraries":
- "src/lib/**/*"
- changed-files:
- any-glob-to-any-file:
- "src/lib/**/*"

"Component: Main":
- "src/main/**/*"
- changed-files:
- any-glob-to-any-file:
- "src/main/**/*"

# Any change in src/test or any yml file changed in .github except pr labeler.
# From https://github.com/actions/labeler:
# From a boolean logic perspective, top-level match objects are OR-ed together
# and individual match rules within an object are AND-ed. Combined with !
# negation, you can write complex matching rules.
# From a boolean logic perspective, top-level match objects, and options
# within all are AND-ed together and individual match rules within the any
# object are OR-ed.
#
# [...]
#
# If a base option is provided without a top-level key, then it will default
# to any.
"Component: Testing":
- any: ["src/test/**/*"]
- any: [".github/**/*.yml", "!.github/pr_labeler_conf.yml",
"!.github/workflows/pr_metadata.yml"]
- changed-files:
- any-glob-to-any-file:
- "src/test/**/*"
- changed-files:
- any-glob-to-any-file:
- ".github/**/*.yml"
- "!.github/pr_labeler_conf.yml"
- "!.github/workflows/pr_metadata.yml"

"Component: Tools":
- "src/tools/**/*"
- changed-files:
- any-glob-to-any-file:
- "src/tools/**/*"
1 change: 1 addition & 0 deletions .github/workflows/ci_maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- rust default nightly version (\`ci/rust-toolchain-nightly.toml\`)
- python version for the python lint (\`.github/workflows/lint.yml\`)
- tor and tgen versions for the tor tests (\`.github/workflows/extra_tests.yml\`)
- versions of github actions (\`uses: <action-name@version>\` in \`.github/workflows/*.yml\`)
Shadow's dependencies may also need to be updated.
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/extra_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
steps:
- run: apt-get update
- name: Checkout shadow
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: shadow
# Run on PR head instead of merge result. Running on the merge
Expand All @@ -72,7 +72,7 @@ jobs:
run: |
echo "month=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT
- name: Restore cargo registry cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand All @@ -85,7 +85,7 @@ jobs:
run: |
echo rustv=\"$(rustc --version)\" >> $GITHUB_OUTPUT
- name: Restore sccache cache
uses: actions/cache@v3
uses: actions/cache@v4
continue-on-error: false
with:
path: ${{ env.SCCACHE_DIR }}
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
tar --no-recursion --append -f $TARFILE \
shadow/build/src/shim/target/*/libshadow_shim.so
gzip $TARFILE
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: build-shadow
path: shadow.tar.gz
Expand All @@ -149,14 +149,14 @@ jobs:
steps:
- name: Restore cache
id: restore-tgen-build-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: opt/tgen
# Sync with env.CONTAINER, and with checkout ref below.
key: tgen-build-key-${{ env.CONTAINER }}-816d68cd3d0ff7d0ec71e8bbbae24ecd6a636117
- name: Checkout tgen
if: steps.restore-tgen-build-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: tgen
repository: shadow/tgen
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
# We need to wrap in a tarball to preserve permissions.
- name: Archive tgen
run: tar -czf tgen.tar.gz opt/tgen
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: build-tgen
path: tgen.tar.gz
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
- run: apt-get update

- name: Download shadow
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-shadow

Expand All @@ -237,7 +237,7 @@ jobs:
run: apt-get install -y libglib2.0-0

- name: Download tgen
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-tgen
path: .
Expand All @@ -256,7 +256,7 @@ jobs:
- name: Restore tor build cache
id: restore-tor-build-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: opt/tor
# sync with env.CONTAINER
Expand Down Expand Up @@ -324,14 +324,14 @@ jobs:
for f in shadow/build/src/test/tor/**/*.data; do tar -cJf "$f.tar.xz" "$f/"; done
- name: Upload shadow data directory
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.tor }}-shadow-data-dir
path: shadow/build/src/test/tor/**/*.data.tar.xz

- name: Upload shadow log file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.tor }}-shadow-log-file
Expand All @@ -358,7 +358,7 @@ jobs:
- run: apt-get update

- name: Download shadow
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-shadow

Expand All @@ -369,7 +369,7 @@ jobs:
run: apt-get install -y libglib2.0-0

- name: Download tgen
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-tgen
path: .
Expand Down Expand Up @@ -407,14 +407,14 @@ jobs:
for f in shadow/build/src/test/tgen/**/*.data; do tar -cJf "$f.tar.xz" "$f/"; done
- name: Upload shadow data directory
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: tgen-shadow-data-dir
path: shadow/build/src/test/tgen/**/*.data.tar.xz

- name: Upload shadow log file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: tgen-shadow-log-file
Expand All @@ -440,7 +440,7 @@ jobs:
- run: apt-get update

- name: Download shadow
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-shadow

Expand Down Expand Up @@ -495,14 +495,14 @@ jobs:
for f in shadow/build/examples/**/*.data; do tar -cJf "$f.tar.xz" "$f/"; done
- name: Upload shadow data directory
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: examples-shadow-data-dir
path: shadow/build/examples/**/*.data.tar.xz

- name: Upload shadow log file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: examples-shadow-log-file
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
lint-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
# Run on PR head instead of merge result. Running on the merge
# result can give confusing results, and we require PR to be up to
# date with target branch before merging, anyway.
# See https://github.com/shadow/shadow/issues/2166
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install flake8
Expand All @@ -33,7 +33,7 @@ jobs:
lint-shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
# Run on PR head instead of merge result. Running on the merge
Expand All @@ -47,7 +47,7 @@ jobs:
lint-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Run on PR head instead of merge result. Running on the merge
# result can give confusing results, and we require PR to be up to
Expand All @@ -66,7 +66,7 @@ jobs:
lint-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Run on PR head instead of merge result. Running on the merge
# result can give confusing results, and we require PR to be up to
Expand All @@ -89,7 +89,7 @@ jobs:
lint-cargo-lock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cargo update check
run: |
# This will return an error if any versions of local crates in the Cargo.lock
Expand All @@ -100,7 +100,7 @@ jobs:
lint-cargo-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Run on PR head instead of merge result. Running on the merge
# result can give confusing results, and we require PR to be up to
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Apply Labels
# Add labels based on paths modified in PR
# https://github.com/actions/labeler
uses: actions/labeler@v4
uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/pr_labeler_conf.yml
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
SCCACHE_CACHE_VERSION: 1
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
# Run on PR head instead of merge result. Running on the merge
Expand All @@ -103,7 +103,7 @@ jobs:
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Restore cargo registry cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand All @@ -119,7 +119,7 @@ jobs:
run: |
echo rustv=\"$(rustc --version)\" >> $GITHUB_OUTPUT
- name: Restore sccache cache
uses: actions/cache@v3
uses: actions/cache@v4
continue-on-error: false
with:
path: ${{ env.SCCACHE_DIR }}
Expand Down Expand Up @@ -161,14 +161,14 @@ jobs:
for f in build/**/*.data; do tar -cJf "$f.tar.xz" "$f/"; done
- name: Upload shadow data directories
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: shadow-data-dirs
path: build/**/*.data.tar.xz

- name: Upload shadow log file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: shadow-log-file
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
# Run on PR head instead of merge result. Running on the merge
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
# Run on PR head instead of merge result. Running on the merge
Expand Down
2 changes: 1 addition & 1 deletion ci/rust-toolchain-nightly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
[toolchain]
# Must be a version built with miri; check
# https://rust-lang.github.io/rustup-components-history/
channel = "nightly-2024-09-06"
channel = "nightly-2024-10-05"
# We don't add individual components here. CI individually
# adds the ones they need (e.g. clippy, miri).
Loading

0 comments on commit 2e032f5

Please sign in to comment.