From 7898ab9fbecf8fd14b617766d75f95721ebd6f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com> Date: Mon, 17 Jun 2024 11:56:30 +0100 Subject: [PATCH] chore: new build strategy --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 437e886f..23f8b9f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,6 +7,38 @@ jobs: build: name: Build timeout-minutes: 10 + strategy: + matrix: + rust-version: [ + "1.74.0", + "1.75.0", + "1.76.0", + "latest" + ] + runs-on: ubuntu-latest + container: rust:${{ matrix.rust-version }} + steps: + - name: Checkout code from repository + uses: actions/checkout@v4 + - name: Install Rust components + run: | + rustup component add rustfmt + rustup component add clippy + - name: Print Rust information + run: rustc --version + - name: Verify Rust code format + run: cargo fmt --all -- --check + - name: Verify Rust code linting + run: cargo clippy -- -D warnings -A unknown-lints + - name: Run unit tests + run: cargo test + - name: Build development version + run: cargo build + - name: Build release version + run: cargo build --release + build-simple: + name: Build Simple + timeout-minutes: 10 strategy: matrix: rust-version: [ @@ -36,8 +68,6 @@ jobs: run: cargo fmt --all -- --check - name: Verify Rust code linting run: cargo clippy -- -D warnings -A unknown-lints - - name: Run unit tests - run: cargo test - name: Build development version run: cargo build - name: Build release version -- GitLab