Template
Compare commits
26
Commits
master
...
14e59d2ed2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14e59d2ed2 | ||
|
|
78d1a65bef | ||
|
|
8c529f7e8b | ||
|
|
bc3b902d04 | ||
|
|
0f22adbff4 | ||
|
|
9810cdc208 | ||
|
|
d90404741d | ||
|
|
094d50553f | ||
|
|
50ecad1842 | ||
|
|
9bcfd7d966 | ||
|
|
7f8b28bf95 | ||
|
|
f4367506a8 | ||
|
|
ae44e16b7b | ||
|
|
793dec3b7e | ||
|
|
9ac27dc546 | ||
|
|
7fbc05d521 | ||
|
|
d2f008ad5f | ||
|
|
8de78b6e1a | ||
|
|
2846cdbcc5 | ||
|
|
16d0a21b8c | ||
|
|
864ff9f044 | ||
|
|
c45bc81bf8 | ||
|
|
123c9a1da8 | ||
|
|
f2c0af5775 | ||
|
|
b408028c87 | ||
|
|
5a4191bb60 |
@@ -0,0 +1,2 @@
|
|||||||
|
[registries.gitea]
|
||||||
|
index = "sparse+https://gitea.example.com/api/packages/crates/cargo/"
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
name: Crossplatform Linting && Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main, master ]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Linting
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Project
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Install cargo sort
|
||||||
|
uses: taiki-e/install-action@v2
|
||||||
|
with:
|
||||||
|
tool: cargo-sort
|
||||||
|
|
||||||
|
- name: Install cargo machete
|
||||||
|
uses: taiki-e/install-action@v2
|
||||||
|
with:
|
||||||
|
tool: cargo-machete
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: cargo fmt --check
|
||||||
|
|
||||||
|
- name: Check import sorting
|
||||||
|
run: cargo sort --grouped --check --check-format
|
||||||
|
|
||||||
|
- name: Check for unused dependencies
|
||||||
|
run: cargo machete
|
||||||
|
|
||||||
|
- name: Clippy for Linux x86 (GNU ONLY)
|
||||||
|
run: |
|
||||||
|
cargo clippy --target x86_64-unknown-linux-gnu -- -D warnings
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: 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: Build for Linux x86 (GNU and MUSL)
|
||||||
|
run: |
|
||||||
|
cargo build --target x86_64-unknown-linux-gnu --release --locked
|
||||||
|
cargo build --target x86_64-unknown-linux-musl --release --locked
|
||||||
|
|
||||||
|
cross_build:
|
||||||
|
name: Cross-Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [lint, build]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Project
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- 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: |
|
||||||
|
cargo test --target x86_64-unknown-linux-gnu --release --locked
|
||||||
|
cargo test --target x86_64-unknown-linux-musl --release --locked
|
||||||
|
|
||||||
|
|
||||||
Generated
+7
@@ -0,0 +1,7 @@
|
|||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 4
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "temp"
|
||||||
|
version = "0.1.0"
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[package]
|
||||||
|
name = "temp"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
pub fn two() -> i32 {
|
||||||
|
2
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user