From 6729a0f3cc8e229d15fc52b307e0527f9ac93552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 13:34:47 +0200 Subject: [PATCH 01/15] Add CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- .forgejo/workflows/ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .forgejo/workflows/ci.yml diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..3f0febb --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,23 @@ +name: Cargo Build & Test + +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: hem - latest + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - stable + - beta + steps: + - uses: actions/checkout@v4 + - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - run: cargo build --verbose + - run: cargo test --verbose From 3554afb8ebae8cedc75cbc9583c81ab6a740446d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 13:52:41 +0200 Subject: [PATCH 02/15] fixup! Add CI --- .forgejo/workflows/ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 3f0febb..7d83355 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -9,15 +9,11 @@ env: jobs: build_and_test: - name: hem - latest + name: hem - Build & Test runs-on: ubuntu-latest - strategy: - matrix: - toolchain: - - stable - - beta steps: - uses: actions/checkout@v4 - - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - name: Install Rust + uses: dtolnay/toolchain@master - run: cargo build --verbose - run: cargo test --verbose From 6792620c5703ae219b7fed737d7c3be42549ce2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 13:54:22 +0200 Subject: [PATCH 03/15] fixup! fixup! Add CI --- .forgejo/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 7d83355..b19fcfd 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -14,6 +14,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Rust - uses: dtolnay/toolchain@master + uses: https://github.com/dtolnay/toolchain@master - run: cargo build --verbose - run: cargo test --verbose From 5ef73995dc7855a00c9e37ee0b0074d363e603e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 13:55:14 +0200 Subject: [PATCH 04/15] fixup! fixup! fixup! Add CI --- .forgejo/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index b19fcfd..02e6bd9 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -14,6 +14,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Rust - uses: https://github.com/dtolnay/toolchain@master + uses: https://github.com/dtolnay/rust-toolchain@master - run: cargo build --verbose - run: cargo test --verbose From fbdefba67f1acc1dc5289f1b28c83656b915cdd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 13:57:47 +0200 Subject: [PATCH 05/15] fixup! fixup! fixup! fixup! Add CI --- .forgejo/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 02e6bd9..a12a2bd 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -14,6 +14,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Rust - uses: https://github.com/dtolnay/rust-toolchain@master + uses: https://github.com/dtolnay/rust-toolchain@1.88 - run: cargo build --verbose - run: cargo test --verbose From 72fa8be7c6860615f961592b9f337023d5a7f0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 14:00:46 +0200 Subject: [PATCH 06/15] fixup! fixup! fixup! fixup! fixup! Add CI --- .forgejo/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index a12a2bd..e19cd94 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -15,5 +15,6 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust uses: https://github.com/dtolnay/rust-toolchain@1.88 - - run: cargo build --verbose + - run: cargo clippy -- -D warnings + - run: cargo build --verbose -D warn - run: cargo test --verbose From 070957be5af501cd955033962db2159c2ac2c873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 14:01:44 +0200 Subject: [PATCH 07/15] fixup! fixup! fixup! fixup! fixup! fixup! Add CI --- .forgejo/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index e19cd94..5fef896 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -2,6 +2,8 @@ name: Cargo Build & Test on: push: + branches: + - main pull_request: env: From dcb816203307686b0e6a0d96e4f47c48ba035566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 14:05:51 +0200 Subject: [PATCH 08/15] Allow unused items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 21a1e04..56de207 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +#![expect(dead_code)] + use clap::Parser; mod cli; @@ -5,10 +7,10 @@ mod expr; fn main() -> miette::Result<()> { let args = cli::Args::parse(); - let input_delim = args.delimiter(); - let input = args.input(); + let _input_delim = args.delimiter(); + let _input = args.input(); - let expression = expr::parse(&args.expression)?; + let _expression = expr::parse(&args.expression)?; Ok(()) } From 1da57177dfbaf30ceedc8afb5337d252d19fa495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 14:07:16 +0200 Subject: [PATCH 09/15] Add formatting job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- .forgejo/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 5fef896..fdb6e5c 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -10,6 +10,14 @@ env: CARGO_TERM_COLOR: always jobs: + formatting: + name: hem - Build & Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: https://github.com/dtolnay/rust-toolchain@1.88 + - run: cargo fmt --check build_and_test: name: hem - Build & Test runs-on: ubuntu-latest From 0f7649deb8d898feb0e6c2772861df9f7edfa994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 14:08:22 +0200 Subject: [PATCH 10/15] Add caching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- .forgejo/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index fdb6e5c..2606e5c 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -25,6 +25,14 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust uses: https://github.com/dtolnay/rust-toolchain@1.88 + - name: ⚡ Cache + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - run: cargo clippy -- -D warnings - run: cargo build --verbose -D warn - run: cargo test --verbose From faf6f7791c546bc0ea02e784067389b29fae80ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 14:08:59 +0200 Subject: [PATCH 11/15] fixup! Add formatting job --- .forgejo/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 2606e5c..cc1fb05 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -11,7 +11,7 @@ env: jobs: formatting: - name: hem - Build & Test + name: hem - Formatting runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 207808b7d1db50e6268a4d847c66df4a298556b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 14:10:14 +0200 Subject: [PATCH 12/15] fixup! Add formatting job --- .forgejo/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index cc1fb05..e25c8c2 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -17,6 +17,8 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust uses: https://github.com/dtolnay/rust-toolchain@1.88 + with: + components: rustfmt - run: cargo fmt --check build_and_test: name: hem - Build & Test From ef0ccda1112284d170ad7870b253bbeef00d1086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 14:10:14 +0200 Subject: [PATCH 13/15] fixup! Add caching --- .forgejo/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index e25c8c2..af1b641 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -27,6 +27,8 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust uses: https://github.com/dtolnay/rust-toolchain@1.88 + with: + components: clippy - name: ⚡ Cache uses: actions/cache@v2 with: From 0c921bedc72362eb1cfb342d863de55a3ff32628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 14:12:24 +0200 Subject: [PATCH 14/15] fixup! fixup! fixup! fixup! fixup! fixup! Add CI --- .forgejo/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index af1b641..416fb30 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -38,5 +38,5 @@ jobs: target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - run: cargo clippy -- -D warnings - - run: cargo build --verbose -D warn + - run: cargo build --verbose - run: cargo test --verbose From 799bd9f6ad6ddb2dcade06d20d8ca46edd98839f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 29 Jun 2025 14:18:51 +0200 Subject: [PATCH 15/15] Add cachekey MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- .forgejo/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 416fb30..cb7824c 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -27,6 +27,7 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust uses: https://github.com/dtolnay/rust-toolchain@1.88 + id: toolchain with: components: clippy - name: ⚡ Cache @@ -36,7 +37,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - run: cargo clippy -- -D warnings + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ steps.toolchain.outputs.cachekey }} + - run: cargo clippy --all-targets -- -D warnings - run: cargo build --verbose - run: cargo test --verbose