Skip to content

Commit

Permalink
Update rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameo007 authored Aug 9, 2023
1 parent 0714e22 commit 6ecbbb6
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,48 @@ env:
CARGO_TERM_COLOR: always

jobs:
build-linux-windows:
build-linux:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup
run: sudo apt-get install libudev-dev && rustup target add x86_64-pc-windows-gnu && sudo apt-get install gcc-mingw-w64-x86-64
run: sudo apt-get install libudev-dev
- name: Build Linux
run: cd "Rust Middleware" && cargo build --release --verbose
- name: Run tests
run: cd "Rust Middleware" && cargo test --verbose
- name: Prepare Upload (create build folder)
run: mkdir "build"
- name: Prepare Upload (copy binaries)
run: mv "Rust Middleware/target/release/crs" "build/"
- name: Upload Build Artifacts
uses: actions/[email protected]
with:
name: "Linux"
path: "build/*"

build-windows:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup
run: sudo apt-get install libudev-dev && rustup target add x86_64-pc-windows-gnu && sudo apt-get install gcc-mingw-w64-x86-64
- name: Build Windows
run: cd "Rust Middleware" && cargo build --release --target x86_64-pc-windows-gnu --verbose
- name: Run tests
run: cargo test --verbose
run: cd "Rust Middleware" && cargo test --verbose
- name: Prepare Upload (create build folder)
run: mkdir "build"
- name: Prepare Upload (copy binaries)
run: mv "Rust Middleware/target/release/crs" "Rust Middleware/target/x86_64-pc-windows-gnu/release/crs.exe" "build/"
run: mv "Rust Middleware/target/x86_64-pc-windows-gnu/release/crs.exe" "build/"
- name: Upload Build Artifacts
uses: actions/[email protected]
with:
name: "Builds"
name: "Windows"
path: "build/*"

build-macOS:
Expand All @@ -43,13 +63,11 @@ jobs:
- name: Build
run: cd "Rust Middleware" && cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
run: cd "Rust Middleware" && cargo test --verbose
- name: Prepare Upload (create build folder)
run: mkdir "build"
- name: Prepare Upload (copy binaries)
run: mv "Rust Middleware/target/release/crs" "Rust Middleware/target/x86_64-pc-windows-gnu/release/crs.exe" "build/"
- name: Upload Build Artifacts
uses: actions/[email protected]
with:
name: "Builds"
path: "build/*"
name: "macOS"
path: Rust Middleware/target/release/*"

0 comments on commit 6ecbbb6

Please sign in to comment.