File tree Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Security Audit
2+
3+ on :
4+ push :
5+ paths :
6+ - ' **/Cargo.toml'
7+ - ' **/Cargo.lock'
8+ schedule :
9+ - cron : ' 0 0 * * 0' # Run weekly on Sunday at midnight
10+ workflow_dispatch : # Allow manual triggering
11+
12+ jobs :
13+ audit :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v3
17+
18+ - name : Install Rust
19+ uses : dtolnay/rust-toolchain@stable
20+
21+ - name : Install cargo-audit
22+ run : cargo install cargo-audit
23+
24+ - name : Run cargo-audit
25+ run : cargo audit
Original file line number Diff line number Diff line change 1+ name : Build and Test
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build :
11+ name : Build and Test
12+ runs-on : ${{ matrix.os }}
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ include :
17+ - os : ubuntu-latest
18+ target : x86_64-unknown-linux-gnu
19+ - os : macos-latest
20+ target : x86_64-apple-darwin
21+ - os : macos-latest
22+ target : aarch64-apple-darwin
23+ - os : windows-latest
24+ target : x86_64-pc-windows-msvc
25+
26+ steps :
27+ - uses : actions/checkout@v3
28+
29+ - name : Install Rust
30+ uses : dtolnay/rust-toolchain@stable
31+ with :
32+ targets : ${{ matrix.target }}
33+
34+ - name : Cache Rust dependencies
35+ uses : actions/cache@v3
36+ with :
37+ path : |
38+ ~/.cargo/registry
39+ ~/.cargo/git
40+ target
41+ key : ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
42+
43+ - name : Build
44+ run : |
45+ cargo build --release --target ${{ matrix.target }}
46+
47+ - name : Run tests
48+ run : |
49+ cargo test --target ${{ matrix.target }}
50+ # Skip tests for cross-compilation targets that can't run natively
51+ if : ${{ !(matrix.os == 'macos-latest' && matrix.target == 'aarch64-apple-darwin' && runner.arch == 'X64') }}
You can’t perform that action at this time.
0 commit comments