Skip to content

Commit

Permalink
Update rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CA-MKSingh authored Oct 6, 2024
1 parent 44278ed commit e8e2481
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]}"
Expand All @@ -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)
Expand Down

0 comments on commit e8e2481

Please sign in to comment.