Skip to content

Commit 5bd2f59

Browse files
CopilotCrauzer
andcommitted
Add CI workflow and fix code formatting
Co-authored-by: Crauzer <18646077+Crauzer@users.noreply.github.com>
1 parent 6473976 commit 5bd2f59

File tree

2 files changed

+80
-2
lines changed

2 files changed

+80
-2
lines changed

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
name: Build
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
runs-on: ${{ matrix.os }}
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Install Rust
24+
uses: actions-rs/toolchain@v1
25+
with:
26+
toolchain: stable
27+
override: true
28+
components: rustfmt, clippy
29+
30+
- name: Cache cargo registry
31+
uses: actions/cache@v4
32+
with:
33+
path: ~/.cargo/registry
34+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
35+
36+
- name: Cache cargo index
37+
uses: actions/cache@v4
38+
with:
39+
path: ~/.cargo/git
40+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
41+
42+
- name: Cache cargo build
43+
uses: actions/cache@v4
44+
with:
45+
path: target
46+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
47+
48+
- name: Check formatting
49+
run: cargo fmt -- --check
50+
51+
- name: Run clippy
52+
run: cargo clippy -- -D warnings
53+
54+
- name: Build
55+
run: cargo build --verbose
56+
57+
- name: Build release
58+
run: cargo build --release --verbose
59+
60+
- name: Run tests
61+
run: cargo test --verbose
62+
63+
check:
64+
name: Security Check
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- name: Install Rust
70+
uses: actions-rs/toolchain@v1
71+
with:
72+
toolchain: stable
73+
override: true
74+
75+
- name: Run cargo audit
76+
run: |
77+
cargo install cargo-audit
78+
cargo audit

src/loaders/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
//!
33
//! This module contains loaders for various League of Legends file formats.
44
5-
pub mod wad_loader;
65
pub mod mesh_loader;
76
pub mod texture_loader;
7+
pub mod wad_loader;
88

9-
pub use wad_loader::WadLoader;
109
pub use mesh_loader::MeshLoader;
1110
pub use texture_loader::TextureLoader;
11+
pub use wad_loader::WadLoader;

0 commit comments

Comments
 (0)