chore(repo): pin Rust version to 1.88 and remove redundant cmds #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, | |
# software distributed under the License is distributed on an | |
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
# KIND, either express or implied. See the License for the | |
# specific language governing permissions and limitations | |
# under the License. | |
name: Check Rust Version Sync | |
on: | |
pull_request: | |
paths: | |
- 'rust-toolchain.toml' | |
- 'bdd/rust/Dockerfile' | |
- 'core/bench/dashboard/server/Dockerfile' | |
- '.github/workflows/check-rust-version-sync.yml' | |
jobs: | |
ci-check-rust-version-sync: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check Rust versions are synchronized | |
run: | | |
# Extract version from rust-toolchain.toml | |
TOOLCHAIN_VERSION=$(grep 'channel' rust-toolchain.toml | sed 's/.*"\(.*\)".*/\1/') | |
echo "rust-toolchain.toml version: $TOOLCHAIN_VERSION" | |
# Check bdd/rust/Dockerfile | |
BDD_VERSION=$(grep '^FROM rust:' bdd/rust/Dockerfile | sed 's/FROM rust:\([0-9.]\+\).*/\1/') | |
echo "bdd/rust/Dockerfile version: $BDD_VERSION" | |
# Check core/bench/dashboard/server/Dockerfile | |
BENCH_VERSION=$(grep '^FROM rust:' core/bench/dashboard/server/Dockerfile | sed 's/FROM rust:\([0-9.]\+\).*/\1/') | |
echo "core/bench/dashboard/server/Dockerfile version: $BENCH_VERSION" | |
# Verify all versions match | |
if [ "$TOOLCHAIN_VERSION" != "$BDD_VERSION" ]; then | |
echo "ERROR: bdd/rust/Dockerfile uses Rust $BDD_VERSION but rust-toolchain.toml specifies $TOOLCHAIN_VERSION" | |
echo "Run ./scripts/sync-rust-version.sh to fix this" | |
exit 1 | |
fi | |
if [ "$TOOLCHAIN_VERSION" != "$BENCH_VERSION" ]; then | |
echo "ERROR: core/bench/dashboard/server/Dockerfile uses Rust $BENCH_VERSION but rust-toolchain.toml specifies $TOOLCHAIN_VERSION" | |
echo "Run ./scripts/sync-rust-version.sh to fix this" | |
exit 1 | |
fi | |
echo "All Rust versions are synchronized at $TOOLCHAIN_VERSION" |