Skip to content

Commit

Permalink
Refactor lint CI and run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul committed Jan 10, 2024
1 parent 3c79083 commit cb9e559
Show file tree
Hide file tree
Showing 5 changed files with 315 additions and 263 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/format-java.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/format.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: C++ Lint and Format
name: Lint and Format

on: [pull_request, push]

Expand All @@ -7,6 +7,42 @@ concurrency:
cancel-in-progress: true

jobs:
format-java:
name: "Format Java"
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run: |
cd ./choreolib
chmod +x gradlew
./gradlew spotlessCheck
format-js:
name: "Format JS"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "npm"

- run: |
npm install prettier
npm -v
npm run checkFormat
format-rust:
name: "Format Rust"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run rustfmt
working-directory: src-tauri
run: cargo fmt

wpiformat:
name: "wpiformat"
runs-on: ubuntu-latest
Expand Down
30 changes: 15 additions & 15 deletions src-tauri/build.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
fn main() {
#[cfg(target_os = "macos")]
{
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path/");
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path/../Resources/");
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path/../../");
}

#[cfg(target_os = "linux")]
{
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN/");
println!("cargo:rustc-link-arg=-Wl,-rpath,/opt/trajopt/lib");
println!("cargo:rustc-link-arg=-Wl,-rpath,/usr/local/lib");
println!("cargo:rustc-link-arg=-Wl,-rpath,/usr/lib");
}
#[cfg(target_os = "macos")]
{
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path/");
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path/../Resources/");
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path/../../");
}

tauri_build::build()
#[cfg(target_os = "linux")]
{
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN/");
println!("cargo:rustc-link-arg=-Wl,-rpath,/opt/trajopt/lib");
println!("cargo:rustc-link-arg=-Wl,-rpath,/usr/local/lib");
println!("cargo:rustc-link-arg=-Wl,-rpath,/usr/lib");
}

tauri_build::build()
}
Loading

0 comments on commit cb9e559

Please sign in to comment.