Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: upgrade dependencies job #728

Merged
merged 19 commits into from
Aug 15, 2024
Merged
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
39 changes: 23 additions & 16 deletions .github/workflows/update-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,39 @@ jobs:

- name: "⚒️ Completely delete bazel cache and then recreate it"
run: |
set -eExou pipefail
#
# Update dependencies and export files that bazel can consume
#
git fetch
git reset --hard origin/main
cargo install cargo-upgrade
cargo upgrade --exclude opentelemetry --recursive
# https://github.com/rustls/rustls/issues/1967#issuecomment-2279067420
sudo apt remove gcc-9 -y
sudo apt install clang -y

cargo install cargo-upgrades
cargo install cargo-edit
cargo upgrade --recursive

# Install taplo cli
TAPLO=taplo-linux-x86_64
curl -L "https://github.com/tamasfe/taplo/releases/latest/download/$TAPLO.gz" -O
gunzip $TAPLO.gz
chmod +x ./$TAPLO
OTEL_VER=$(./$TAPLO get -f Cargo.lock -o json | jq '.package[] | select(.name == "axum-otel-metrics")'| grep -oP '"opentelemetry\s\K[\d.]+' || echo "")
if [[ -n "$OTEL_VER" ]]; then
cargo upgrade --package opentelemetry@$OTEL_VER
fi
rm ./$TAPLO

# Reinstall gcc
sudo apt install gcc -y

poetry update
CARGO_BAZEL_REPIN=true bazel query >/dev/null
./bin/poetry.sh
#
# Completely delete the bazel cache and then recreate it
# Cache should have everything that bazel build requires, and nothing more
#
sudo rm -rf ~/.cache/bazel/*
CARGO_BAZEL_REPIN=true bazel build ...
bazel test

- name: "🆕 Create a new Pull Request with the changes"
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore: Update dependencies"
branch: bot-update-deps
title: "chore: Update dependencies"
body: "This PR updates poetry (Python) and cargo (Rust) dependencies and recreates the bazel cache."
body: "This PR updates poetry (Python) and cargo (Rust) dependencies and IC repository dependencies"
token: ${{ secrets.GIX_CREATE_PR_PAT }}

- name: "🪓 Tear down runner"
Expand Down
Loading