From aa462af2a7ab3be491664768692607a3b0a8b089 Mon Sep 17 00:00:00 2001 From: David Osipov Date: Mon, 23 Mar 2026 13:07:18 +0400 Subject: [PATCH] Update .github/workflows/openbsd-build.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/openbsd-build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/openbsd-build.yml b/.github/workflows/openbsd-build.yml index 5b7f3bc..f2fafd7 100644 --- a/.github/workflows/openbsd-build.yml +++ b/.github/workflows/openbsd-build.yml @@ -53,6 +53,17 @@ jobs: pkg_add rust run: | set -e + required_major=1 + required_minor=85 + rustc_version="$(rustc --version | awk '{print $2}')" + rustc_major="${rustc_version%%.*}" + rustc_rest="${rustc_version#*.}" + rustc_minor="${rustc_rest%%.*}" + if [ "$rustc_major" -lt "$required_major" ] || { [ "$rustc_major" -eq "$required_major" ] && [ "$rustc_minor" -lt "$required_minor" ]; }; then + echo "Installed rustc version ($rustc_version) is older than the required minimum ${required_major}.${required_minor}.x for this project (e.g., edition = \"2024\")." + echo "Please update the OpenBSD rust package or adjust the workflow to use a newer toolchain." + exit 1 + fi cargo build --release --locked --verbose env: RUSTFLAGS: ${{ matrix.rustflags }}