Skip to content

Commit

Permalink
Check if the new Rust release is out already. (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi authored Apr 15, 2024
1 parent d49f22d commit 74bfdb7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/add_new_rust_to_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@ jobs:
wget "https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_amd64" -O yq &&\
chmod +x ./yq
- name: check if the new Rust release is out
run: |
set -euxo pipefail
UPCOMING="$(yq '.jobs.rust-tests.strategy.matrix.toolchain as $versions |
[$versions[] | select(. != "beta" and . != "stable")] as $numerical_versions |
[$versions[] | select(. == "beta" or . == "stable")] as $non_numerical_versions |
(
[$numerical_versions[] | sub("\d+\.(\d+)(?:\.\d+)?", "${1}") | to_number]
| sort
| .[-1]
) as $max_named_minor |
"1.\($max_named_minor + 2).0"
' .github/workflows/ci.yml)"
# This line will fail if that release isn't out yet.
wget "https://github.com/rust-lang/rust/releases/tag/${UPCOMING}" --server-response -O /dev/null
- name: add next minor to test matrix
run: |
set -euxo pipefail
Expand Down

0 comments on commit 74bfdb7

Please sign in to comment.