From 79066127f58c852eaf4adda11610e815a426878c Mon Sep 17 00:00:00 2001 From: Nikola Milosavljevic <73236646+NikolaMilosa@users.noreply.github.com> Date: Thu, 15 Aug 2024 23:31:08 +0200 Subject: [PATCH] fix: upgrade dependencies job (#728) Co-authored-by: sa-github-api <138766536+sa-github-api@users.noreply.github.com> --- .github/workflows/update-dependencies.yaml | 39 +++++++++++++--------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/update-dependencies.yaml b/.github/workflows/update-dependencies.yaml index 9d263ebc4..1056a39d0 100644 --- a/.github/workflows/update-dependencies.yaml +++ b/.github/workflows/update-dependencies.yaml @@ -29,24 +29,31 @@ 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 @@ -54,7 +61,7 @@ jobs: 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"