From e8e2481e3dd85d04175e2315a813c055e1cbe73c Mon Sep 17 00:00:00 2001 From: Mukesh Singh Date: Sun, 6 Oct 2024 18:49:58 +0530 Subject: [PATCH] Update rust.yml --- .github/workflows/rust.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3258efe..ef4733c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -23,8 +23,13 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Install Rust and update to the latest stable version + run: | + rustup update stable + rustup default stable + - name: Determine version from release - shell: bash # Explicitly specify bash shell + shell: bash run: | if [[ "$GITHUB_REF" =~ ^refs/tags/v([0-9]+\.[0-9]+\.[0-9]+)(-alpha|-beta)?$ ]]; then VERSION="${BASH_REMATCH[1]}" @@ -34,16 +39,15 @@ jobs: exit 1 fi - # Separate Linux from macOS and Windows for Docker-specific steps - - name: Set up Docker build (Linux only) + - name: Build the project for ${{ matrix.os }} and ${{ matrix.arch }} if: runner.os == 'Linux' run: | - docker run --rm -v "$(pwd)":/app -w /app rust:1.72.0-alpine cargo build --release --verbose + docker run --rm -v "$(pwd)":/app -w /app rust:latest-alpine cargo build --release --verbose - - name: Run tests (Linux only) + - name: Run tests for ${{ matrix.os }} and ${{ matrix.arch }} if: runner.os == 'Linux' run: | - docker run --rm -v "$(pwd)":/app -w /app rust:1.72.0-alpine cargo test --verbose + docker run --rm -v "$(pwd)":/app -w /app rust:latest-alpine cargo test --verbose # Native Rust build for macOS and Windows - name: Build project (non-Linux)