Skip to content

Commit 90af39c

Browse files
committed
Merge branch 'main' of github.com:Psy-Fer/ruSTAR
2 parents c6aeee5 + e2f3581 commit 90af39c

14 files changed

Lines changed: 984 additions & 9 deletions

File tree

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
target/
2+
.git/
3+
.github/
4+
test/
5+
tests/
6+
docs/
7+
*.md
8+
LICENSE
9+
.gitignore
10+
.dockerignore

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
8+
- package-ecosystem: "cargo"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
# rustsec/audit-check posts results as a check run on the commit.
15+
checks: write
16+
17+
env:
18+
CARGO_TERM_COLOR: always
19+
# Override the [profile.release] settings from Cargo.toml for CI: fat-LTO +
20+
# codegen-units=1 are great for release binaries but ~10× slower to compile
21+
# than thin-LTO, which bites hard on every matrix leg. Release binaries in
22+
# release.yml unset these so they get the real profile.
23+
CARGO_PROFILE_RELEASE_LTO: "thin"
24+
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "16"
25+
26+
jobs:
27+
test:
28+
name: Test (${{ matrix.name }})
29+
runs-on: ${{ matrix.os }}
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
include:
34+
- name: linux-x86_64
35+
os: ubuntu-latest
36+
- name: linux-x86_64-v3
37+
os: ubuntu-latest
38+
target_cpu: x86-64-v3
39+
- name: linux-aarch64
40+
os: ubuntu-24.04-arm
41+
- name: macos-aarch64
42+
os: macos-latest
43+
- name: windows-x86_64
44+
os: windows-latest
45+
steps:
46+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6.0.2
47+
48+
- name: Install Rust toolchain
49+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # ratchet:dtolnay/rust-toolchain@stable
50+
51+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # ratchet:Swatinem/rust-cache@v2.9.1
52+
53+
- name: Detect host triple
54+
if: matrix.target_cpu
55+
shell: bash
56+
run: echo "HOST_TRIPLE=$(rustc -vV | awk '/^host:/ {print $2}')" >> "$GITHUB_ENV"
57+
58+
- name: Build
59+
shell: bash
60+
run: >
61+
cargo build --release
62+
${TARGET_CPU:+--target "$HOST_TRIPLE" --config "target.'$HOST_TRIPLE'.rustflags=['-C', 'target-cpu=$TARGET_CPU']"}
63+
env:
64+
TARGET_CPU: ${{ matrix.target_cpu || '' }}
65+
66+
- name: Test
67+
shell: bash
68+
run: >
69+
cargo test --release
70+
${TARGET_CPU:+--target "$HOST_TRIPLE" --config "target.'$HOST_TRIPLE'.rustflags=['-C', 'target-cpu=$TARGET_CPU']"}
71+
env:
72+
TARGET_CPU: ${{ matrix.target_cpu || '' }}
73+
74+
fmt:
75+
name: Formatting
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6.0.2
79+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # ratchet:dtolnay/rust-toolchain@stable
80+
with:
81+
components: rustfmt
82+
- run: cargo fmt --check
83+
84+
clippy:
85+
name: Clippy
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6.0.2
89+
90+
- name: Install Rust toolchain
91+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # ratchet:dtolnay/rust-toolchain@stable
92+
with:
93+
components: clippy
94+
95+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # ratchet:Swatinem/rust-cache@v2.9.1
96+
97+
- run: cargo clippy -- -D warnings
98+
99+
msrv:
100+
name: MSRV check
101+
runs-on: ubuntu-latest
102+
steps:
103+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6.0.2
104+
105+
- name: Install Rust MSRV toolchain
106+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # ratchet:dtolnay/rust-toolchain@master
107+
with:
108+
toolchain: "1.88"
109+
110+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # ratchet:Swatinem/rust-cache@v2.9.1
111+
112+
- name: Check MSRV compiles
113+
run: cargo check
114+
115+
audit:
116+
name: Security audit
117+
runs-on: ubuntu-latest
118+
steps:
119+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6.0.2
120+
- uses: rustsec/audit-check@v2
121+
with:
122+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)