Author SHA1 Message Date
melfely 566a55a252 ci: Updated MacOS CI to pass on build fails, added cargo check to MacOS CI
Crossplatform Linting && Build / Linting (pull_request) Successful in 1m13s
Crossplatform Linting && Build / Build (pull_request) Successful in 55s
Crossplatform Linting && Build / Test (pull_request) Successful in 1m31s
Crossplatform Linting && Build / Cross-Build-Windows (pull_request) Successful in 1m52s
Crossplatform Linting && Build / Cross-Build-Linux (pull_request) Successful in 2m23s
Crossplatform Linting && Build / Cross-Build-MacOS (pull_request) Successful in 2m46s
2026-09-10 14:11:36 -05:00
melfely 3b95af1270 ci: Changed Cross-Build CI to be split amongst multiple workflows
Crossplatform Linting && Build / Linting (pull_request) Successful in 1m19s
Crossplatform Linting && Build / Build (pull_request) Successful in 1m0s
Crossplatform Linting && Build / Test (pull_request) Successful in 1m23s
Crossplatform Linting && Build / Cross-Build-Windows (pull_request) Successful in 2m9s
Crossplatform Linting && Build / Cross-Build-Linux (pull_request) Successful in 2m23s
Crossplatform Linting && Build / Cross-Build-MacOS (pull_request) Failing after 2m40s
2026-09-10 14:01:42 -05:00
melfely bdf4b63bba fix: Push updated cargo.lock
Crossplatform Linting && Build / Linting (pull_request) Successful in 1m15s
Crossplatform Linting && Build / Build (pull_request) Successful in 55s
Crossplatform Linting && Build / Test (pull_request) Successful in 1m9s
Crossplatform Linting && Build / Cross-Build (pull_request) Failing after 3m22s
2026-09-10 13:23:15 -05:00
melfely e3d9b763ca fix: Pushed up to date Cargo.Lock and Cargo.Toml
Crossplatform Linting && Build / Linting (pull_request) Successful in 1m12s
Crossplatform Linting && Build / Build (pull_request) Failing after 57s
Crossplatform Linting && Build / Cross-Build (pull_request) Skipped
Crossplatform Linting && Build / Test (pull_request) Skipped
2026-09-10 13:18:02 -05:00
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
melfely f2c0af5775 feat: Added base level rust project.
Crossplatform Linting && Build / Build (push) Failing after 56s
Crossplatform Linting && Build / Linting (push) Failing after 1m0s
2026-09-08 16:59:26 -05:00
melfely b408028c87 fix: fixed a issue with the syntax of the lint.yml file
Reworked the multiple line linux builds and lints(since they build both musl and gnu)
2026-09-08 16:46:32 -05:00
melfely 5a4191bb60 feat: Added lint.yml which tests for linting and build on multiple platforms 2026-09-08 16:43:50 -05:00
11 changed files with 8 additions and 189 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
[registries.gitea] [registries.gitea]
index = "sparse+https://gitea.melfely.com/api/packages/crates/cargo/" index = "sparse+https://gitea.example.com/api/packages/crates/cargo/"
+1 -1
View File
@@ -1,4 +1,4 @@
name: Lint & Build name: Crossplatform Linting && Build
on: on:
push: push:
-81
View File
@@ -1,81 +0,0 @@
name: Release-plz
on:
push:
branches: [main, master]
jobs:
# Release unpublished packages.
release-plz-release:
name: Release-plz release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- &setup-git-user
name: Config Git User
run: |
git config --global user.name "ci-bot"
git config --global user.email "bot@email.melfely.com"
- &checkout
name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- &install-rust
name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- &install-cargo-semver
name: Install Cargo SemVer Checks
uses: taiki-e/install-action@fa23953489c080190314742a9b907f8e97c6767c # v2.87.10
with:
tool: cargo-semver-checks
- &install-release-plz
name: Install release-plz
uses: taiki-e/install-action@fa23953489c080190314742a9b907f8e97c6767c # v2.87.10
with:
tool: release-plz
- name: Run release-plz release
run: |
release-plz release --forge gitea --git-token ${{ secrets.GITEA_TOKEN }} --registry gitea --token "Bearer ${{ secrets.CARGO_REGISTRIES_GITEA_TOKEN }}"
# Create a PR with the new versions and changelog, preparing the next releases
release-plz-pr:
name: Release-plz PR
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- *setup-git-user
- *checkout
- *install-rust
- *install-cargo-semver
- *install-release-plz
- name: Fill Credentials
run: |
git config --global credential.helper store
echo "https://ci-bot:${{ secrets.GITEA_TOKEN }}@gitea.melfely.com" > ~/.git-credentials
- name: Run release-plz release-pr
run: |
release-plz release-pr --forge gitea --git-token ${{ secrets.GITEA_TOKEN }} --registry gitea
Generated
+2 -5
View File
@@ -4,11 +4,8 @@ version = 4
[[package]] [[package]]
name = "example_bin" name = "example_bin"
version = "0.1.1" version = "0.1.0"
dependencies = [
"example_lib",
]
[[package]] [[package]]
name = "example_lib" name = "example_lib"
version = "0.1.1" version = "0.1.0"
+2 -56
View File
@@ -1,57 +1,3 @@
# Rust Workspace Template with Pre-Configured Workflows # rust_workflow_template
This Setup does ALOT of checking and analyis before letting you push to main/master. Requiring a massive amount of Cross-Platform support.
## Why?
This automates everything from linting, to CI/CD. This allows us to just work on projects, as long as we follow the rules, without having to worry about deployement.
Fully automating out an entire departement in most companies called DevOps.
**You just need to pay attention to the following**
## How to use properly.
This is an EXAMPLE workspace, look around at the how the Cargo.Toml files are setup, they are important. Once you get comfortable, delete the existing stuff, and start making your own.
A few major points.
### Git Commits
This uses a tool to auto generate change logs and version indexing. As LONG as you feed it good data, one of such requirements are good commits
This project **REQUIRES** you to use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format. This allows for a whole HOST of good automated tooling. That you will love, in comparison to doing it all by hand. WHILE adding a bit of a requirement to making good split up commits.
Any commits **not** following this standard should be rejected or reworded. If a commit is *to large* or some other problem to not fit the mold. Then change the commit, do **NOT** break the rules.
### Gitea Registry
We don't publish to crates.io, instead we publish to the pre-configured gitea crates repo. Which keeps everything private. Does have the disadvantage of reqiuring a bit of extra work to use.
In the example_bin Cargo.toml file you can see
```toml
example_lib = { version = "0.1.1", path = "../example_lib", registry = "gitea" }
```
This line is VERY important, it uses a PATH based dependency to find the project. Which allows for it to be live.
Note that the version number will need to be updated, along WITH the fact that you need to make sure that it uses the "gitea" regsitry here as well. That is where cargo will expect to find it at later.
### Workspace
in the root level Cargo.toml is the workspace config
```toml
[workspace]
resolver = "3"
members = ["example_bin", "example_lib"]
```
notice how it LISTS all the crates that are members of the workspace? That is important!
### Cargo Lock files
All of the workflow tools remotely use --locked versions of cargo build and check, so therefore it **CANNOT** update the lock files.
The lock files are what versions of a package you are using when it was built. This is all about the philophsy of [reproducible builds](https://reproducible-builds.org/)
Rust Cargo Template with CI/CD Setup.
-14
View File
@@ -1,14 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.1.1](https://gitea.melfely.com/melfely/rust_workflow_template/compare/example_bin-v0.1.0...example_bin-v0.1.1) - 2026-09-11
### Added
- bin example now references the local example_lib
+1 -2
View File
@@ -1,7 +1,6 @@
[package] [package]
name = "example_bin" name = "example_bin"
version = "0.1.1" version = "0.1.0"
edition = "2024" edition = "2024"
[dependencies] [dependencies]
example_lib = { version = "0.1.0", path = "../example_lib", registry = "gitea" }
-8
View File
@@ -1,11 +1,3 @@
use example_lib::*;
fn main() { fn main() {
println!("Hello, world!"); println!("Hello, world!");
let result = add(1, 1);
assert_eq!(result, 2);
let result = sub(1, 1);
assert_eq!(result, 0);
} }
-14
View File
@@ -1,14 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.1.1](https://gitea.melfely.com/melfely/rust_workflow_template/compare/example_lib-v0.1.0...example_lib-v0.1.1) - 2026-09-11
### Added
- added pub fn sub()
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "example_lib" name = "example_lib"
version = "0.1.1" version = "0.1.0"
edition = "2024" edition = "2024"
[dependencies] [dependencies]
-6
View File
@@ -2,10 +2,6 @@ pub fn add(left: u64, right: u64) -> u64 {
left + right left + right
} }
pub fn sub(left: u64, right: u64) -> u64 {
left - right
}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
@@ -14,7 +10,5 @@ mod tests {
fn it_works() { fn it_works() {
let result = add(2, 2); let result = add(2, 2);
assert_eq!(result, 4); assert_eq!(result, 4);
let result = sub(2, 2);
assert_eq!(result, 0);
} }
} }