From 450566ce01df963e46d093e65d3b29136e79126a Mon Sep 17 00:00:00 2001 From: Ghaith Hachem Date: Mon, 10 Jun 2024 16:16:31 +0200 Subject: [PATCH] ci: Split the windows and linux workflows (#1242) Separate the windows workflow into its own file so we can disable it --- .github/workflows/rust.yml | 40 +--------------------------- .github/workflows/windows.yml | 50 +++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3360e5c17f..f75ef4446c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,4 +1,4 @@ -name: Build +name: Build Linux on: # Triggers the workflow on push or pull request events but only for the master branch @@ -63,44 +63,6 @@ jobs: name: stdlib path: output - test-windows: - name: Test Windows - runs-on: windows-2022 - env: - toolchain-version: 1.77.0 - llvm-version: 14.0.6 - steps: - - - uses: actions/checkout@v3 - - - name: Install Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.toolchain-version }} - - - name: Install LLVM - uses: ghaith/install-llvm-action@latest - with: - version: ${{ env.llvm-version }} - directory: "./llvm" - - - name: Cargo test (Unit) - run: cargo test --lib -- --nocapture - - - name: Cargo test (Correctness) - run: cargo test correctness -- --nocapture --test-threads=1 - - - name: Cargo test (Integration) - run: cargo test integration -- --nocapture --test-threads=1 - - - name: Release Build - run: cargo build --release --workspace - - - uses: actions/upload-artifact@master - with: - name: plc.exe - path: target/release/plc.exe - style: name: Check Style runs-on: ubuntu-latest diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000000..5545029b5b --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,50 @@ +name: Build Windows + +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + name: Windows Build + runs-on: windows-2022 + env: + toolchain-version: 1.77.0 + llvm-version: 14.0.6 + steps: + + - uses: actions/checkout@v3 + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.toolchain-version }} + + - name: Install LLVM + uses: ghaith/install-llvm-action@latest + with: + version: ${{ env.llvm-version }} + directory: "./llvm" + + - name: Cargo test (Unit) + run: cargo test --lib -- --nocapture + + - name: Cargo test (Correctness) + run: cargo test correctness -- --nocapture --test-threads=1 + + - name: Cargo test (Integration) + run: cargo test integration -- --nocapture --test-threads=1 + + - name: Release Build + run: cargo build --release --workspace + + - uses: actions/upload-artifact@master + with: + name: plc.exe + path: target/release/plc.exe +