27 Commits
Author SHA1 Message Date
melfely 156d8858a7 fix: Updates cargo Sort to use the workspace flag
Crossplatform Linting && Build / Linting (pull_request) Failing after 1m12s
Crossplatform Linting && Build / Build (pull_request) Skipped
Crossplatform Linting && Build / Cross-Build (pull_request) Skipped
Crossplatform Linting && Build / Test (pull_request) Skipped
2026-09-10 13:02:24 -05:00
melfely 90728f9f9a fix: changed to cargo workspace rather than single project folder 2026-09-10 13:02:24 -05:00
melfely b988928732 fix: Installs rust in the Cross-Build Action 2026-09-10 13:02:24 -05:00
melfely 4a915b424d fix: Test and Cross-Build were indeneted to much 2026-09-10 13:02:24 -05:00
melfely c88da52222 feat: Added Linux Tests, and Cross Builds via Cargo Cross
These "might" work, going to have to work at it. Actions are strange.
2026-09-10 13:02:24 -05:00
melfely f4ffb73448 fix: Removed Debian apt call, apparently unreliable in CI/CD 2026-09-10 13:02:24 -05:00
melfely 66e26410fd fix: Added Debian package registry update step 2026-09-10 13:02:24 -05:00
melfely c44e7a07a8 fix: Removed massive cargo cache block, that should now be unused 2026-09-10 13:02:24 -05:00
melfely a4f927c162 fix: Syntax issue with installing of cargo sort and machete 2026-09-10 13:02:24 -05:00
melfely dc0fcbc73a fix: Changes install actions used for rust tools
Replaces the compilation+cache based cargo installer with a binary file
based one.
2026-09-10 13:02:24 -05:00
melfely 70c3df4158 fix: Removed Cross compile against aarch64 from main build
Cross compiling will be moved into an optional "nice to have" rather
than something that is required for the tooling to move on.
2026-09-10 13:02:24 -05:00
melfely 08ebdbbba2 fix: Replaced binary file (main.rs) with Library (lib.rs) 2026-09-10 13:02:24 -05:00
melfely caf76c9cdd fix: Fixed argument ordering for cargo-cross 2026-09-10 13:02:24 -05:00
melfely cdd1fdb9e4 feat: reduced number of steps. Updated tool versions
Properly uses the action workflow tools that were in use before. By using the rust installer action, to also install the tools I need.

Setup to use the cargo-cache installer for cargo-cross rather than a manual install, this should allow caching between runs
2026-09-10 13:02:24 -05:00
melfely ec3cccc79d fix: changed rust isntaller to stable rather than 1.90 2026-09-10 13:02:24 -05:00
melfely e975046921 fix: Removed --locked from cargo-cross install 2026-09-10 13:02:24 -05:00
melfely fcbc750247 fix: Corrected cross to cargo-cross for build 2026-09-10 13:02:24 -05:00
melfely 1255d11675 repo: Added .cargo/config.toml file for the Gitea Cargo Registry. 2026-09-10 13:02:24 -05:00
melfely 97b66c71e3 fix: Fixed Ordering of CLI args in build.
I had ordered the CLI arguments in the build script incorrectly, which
caused... issues.
2026-09-10 13:02:24 -05:00
melfely 1e10f21bf2 fix: readded x86-64 musl linux target 2026-09-10 13:02:24 -05:00
melfely 5b69e43593 fix: Removes Windows and Mac Builds. Replaces build with cross for non-native builds
Apparently Cross Compiling to MacOS is basically impossible.

Crossing Compiling to Windows is painful but doable, not setting it up
here ngl
2026-09-10 13:02:24 -05:00
melfely 65517ef9bb fix: Cargo.Lock file update to date 2026-09-10 13:02:24 -05:00
melfely 6f0d480492 fix: Removed Linting of multiple targets.
Fixes improper target for build of aarch-64 to aarch64
2026-09-10 13:02:24 -05:00
melfely 1b2aaee7bc fix: Installs Missing Cargo Clippy for Linting 2026-09-10 13:02:24 -05:00
melfely c901cdf644 fix: Installes Required rustfmt 2026-09-10 13:02:24 -05:00
melfely e28361f965 fix: Fixed x86-64 to the correct x86_64 for --target 2026-09-10 13:02:24 -05:00
melfely 732b0e8f57 fix: Fixed the build job not requiring the lint job to complete first 2026-09-10 13:02:24 -05:00
8 changed files with 93 additions and 73 deletions
+2
View File
@@ -0,0 +1,2 @@
[registries.gitea]
index = "sparse+https://gitea.example.com/api/packages/crates/cargo/"
+57 -66
View File
@@ -15,99 +15,90 @@ jobs:
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Setup Rust - name: Setup Rust
uses: dtolnay/rust-toolchain@1.90.0 uses: dtolnay/rust-toolchain@stable
with: with:
targets: x86-64-pc-windows-gnu aarch64-apple-darwin aarch64-unknown-linux-gnu x86_64-unknown-linux-musl aarch64-unknown-linux-musl components: rustfmt, clippy
- name: Install cargo sort - name: Install cargo sort
uses: taiki-e/cache-cargo-install-action@caa6f48d18d42462f9c30df89e2b4f71a42b7c2c # v2.0.1 uses: taiki-e/install-action@v2
with: with:
tool: cargo-sort@1.0.9 tool: cargo-sort
- name: Install cargo machete - name: Install cargo machete
uses: taiki-e/cache-cargo-install-action@caa6f48d18d42462f9c30df89e2b4f71a42b7c2c # v2.0.1 uses: taiki-e/install-action@v2
with: with:
tool: cargo-machete@0.7.0 tool: cargo-machete
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-lint-
- name: Check formatting - name: Check formatting
run: cargo fmt --check run: cargo fmt --check
- name: Check import sorting - name: Check import sorting
run: cargo sort --grouped --check --check-format run: cargo sort --workspace --grouped --check --check-format
- name: Check for unused dependencies - name: Check for unused dependencies
run: cargo machete run: cargo machete
- name: Clippy for Linux x86 (GNU and MUSL) - name: Clippy for Linux x86 (GNU ONLY)
run: | run: |
cargo clippy --target x86-64-unknown-linux-gnu -- -D warnings cargo clippy --target x86_64-unknown-linux-gnu -- -D warnings
cargo clippy --target x86-64-unknown-linux-musl -- -D warnings
- name: Clippy for Linux aarch64 (GNU and MUSL)
run: |
cargo clippy --target aarch-64-unknown-linux-gnu -- -D warnings
cargo clippy --target aarch-64-unknown-linux-musl -- -D warnings
- name: Clippy for x86 Windows
run: cargo clippy --target x86-64-pc-windows-gnu -- -D warnings
- name: Clippy for MacOS aarch64
run: cargo clippy --target aarch64-apple-darwin -- -D warnings
build: build:
name: Build name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
requires: lint needs: lint
steps: steps:
- name: Checkout Project - name: Checkout Project
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Setup Rust - name: Setup Rust
uses: dtolnay/rust-toolchain@1.90.0 uses: dtolnay/rust-toolchain@stable
with: with:
targets: x86-64-pc-windows-gnu aarch64-apple-darwin aarch64-unknown-linux-gnu x86_64-unknown-linux-musl aarch64-unknown-linux-musl targets: x86_64-unknown-linux-musl
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-lint-
- name: Build for Linux x86 (GNU and MUSL) - name: Build for Linux x86 (GNU and MUSL)
run: | run: |
cargo build --target x86-64-unknown-linux-gnu --locked cargo build --target x86_64-unknown-linux-gnu --release --locked
cargo build --target x86-64-unknown-linux-musl --locked cargo build --target x86_64-unknown-linux-musl --release --locked
- name: Build for Linux aarch64 (GNU and MUSL)
cross_build:
name: Cross-Build
runs-on: ubuntu-latest
needs: [lint, build]
steps:
- name: Checkout Project
uses: actions/checkout@v5
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Crosscompile for aarch64 linux, windows, macos
uses: zijiren233/cargo-cross@v1
with:
targets: |
aarch64-unknown-linux-musl
aarch64-unknown-linux-gnu
x86_64-pc-windows-gnu
aarch64-apple-darwin
test:
name: Test
runs-on: ubuntu-latest
needs: [build, lint]
steps:
- name: Checkout Project
uses: actions/checkout@v5
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl
- name: Test for Linux x86 (GNU and MUSL)
run: | run: |
cargo build --target aarch-64-unknown-linux-gnu --locked cargo test --target x86_64-unknown-linux-gnu --release --locked
cargo build --target aarch-64-unknown-linux-musl --locked cargo test --target x86_64-unknown-linux-musl --release --locked
- name: Build for x86 Windows
run: cargo build --target x86-64-pc-windows-gnu --locked
- name: Build for MacOS aarch64
run: cargo build --target aarch64-apple-darwin --locked
Generated
+5 -1
View File
@@ -3,5 +3,9 @@
version = 4 version = 4
[[package]] [[package]]
name = "workflows" name = "example_bin"
version = "0.1.0"
[[package]]
name = "example_lib"
version = "0.1.0" version = "0.1.0"
+3 -6
View File
@@ -1,6 +1,3 @@
[package] [workspace]
name = "temp" resolver = "3"
version = "0.1.0" members = ["example_bin","example_lib"]
edition = "2024"
[dependencies]
+6
View File
@@ -0,0 +1,6 @@
[package]
name = "example_bin"
version = "0.1.0"
edition = "2024"
[dependencies]
+6
View File
@@ -0,0 +1,6 @@
[package]
name = "example_lib"
version = "0.1.0"
edition = "2024"
[dependencies]
+14
View File
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}