From c1b077acc7c23ad6fab23e90556205d57d7c0c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeromos=20Kov=C3=A1cs?= Date: Tue, 19 Nov 2024 09:20:50 +0100 Subject: [PATCH 1/3] misc(ci): simplify --- .github/workflows/rust.yml | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a0e7f17..bd7e2ca 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,38 +11,20 @@ env: jobs: build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: macos-latest - target: aarch64-apple-darwin - - os: ubuntu-latest - target: x86_64-unknown-linux-gnu - - os: windows-latest - target: x86_64-pc-windows-msvc + runs-on: ["macos-latest", "ubuntu-latest", "windows-latest"] steps: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + - uses: swatinem/rust-cache@v2 - - name: Cache dependencies - uses: swatinem/rust-cache@v2 - - - name: Build - uses: ClementTsang/cargo-action@v0.0.6 - with: - args: --release --target ${{ matrix.target }} --verbose - command: build + - name: Build release + run: cargo build --release --verbose - name: Run tests - uses: ClementTsang/cargo-action@v0.0.6 - with: - args: --target ${{ matrix.target }} --verbose - command: test + run: cargo test --verbose - name: Upload executable uses: actions/upload-artifact@v4 with: - name: cgol-tui-${{ matrix.os }} - path: target/${{ matrix.target }}/release/cgol-tui* + name: cgol-tui_* + path: target/*/release/cgol-tui* From 43b45a4c9ea7d63b467a69f4523cf2e98b4e280d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeromos=20Kov=C3=A1cs?= Date: Tue, 19 Nov 2024 09:59:06 +0100 Subject: [PATCH 2/3] misc(ci): simplified --- .github/workflows/rust.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bd7e2ca..6980522 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,7 +11,10 @@ env: jobs: build: - runs-on: ["macos-latest", "ubuntu-latest", "windows-latest"] + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 @@ -26,5 +29,5 @@ jobs: - name: Upload executable uses: actions/upload-artifact@v4 with: - name: cgol-tui_* - path: target/*/release/cgol-tui* + name: cgol-tui_${{ matrix.os }} + path: target/release/cgol-tui* From e609f0f4e4fadccf19aa26d0caa55aad7d532804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeromos=20Kov=C3=A1cs?= Date: Tue, 19 Nov 2024 11:53:57 +0100 Subject: [PATCH 3/3] misc(ci): format and clippy --- .github/workflows/rust.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6980522..fdf7cde 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,6 +26,12 @@ jobs: - name: Run tests run: cargo test --verbose + - name: Run cargo fmt + run: cargo fmt --all --check + + - name: Run cargo clippy + run: cargo clippy --all-targets + - name: Upload executable uses: actions/upload-artifact@v4 with: