From 5ed6fe0a2ff526fee07ae9152a7fa50fe2ee2652 Mon Sep 17 00:00:00 2001 From: Matthew Plant Date: Tue, 5 Nov 2024 14:49:08 -0500 Subject: [PATCH] Add workflows and lto --- .github/workflows/rust.yml | 29 +++++++++++++++++++++++++++++ Cargo.toml | 5 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..533ee8c --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,29 @@ +name: Rust + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + - name: Install packages + run: sudo apt-get install libasound2-dev glslang-tools + - name: Build + run: cargo build + - name: Check formatting + run: cargo fmt -- --check + - name: Clippy + run: cargo clippy --all-targets -- -Dclippy::all -D warnings diff --git a/Cargo.toml b/Cargo.toml index c303cf3..a417914 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,4 +20,7 @@ tokio = { version = "1", features = ["full"] } unicode_categories = "0.1" reedline = "0.23" # TODO: Get rid of this dependency -derivative = "2" \ No newline at end of file +derivative = "2" + +[profile.release] +lto = true