-
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (58 loc) · 1.67 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: ⚡ Arcane Rust Rituals
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Define mystical permissions for the digital realm
permissions:
actions: read
contents: read
security-events: write
pull-requests: write
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
ROCKSDB_LIB_DIR: /usr/lib/x86_64-linux-gnu
ROCKSDB_STATIC: 1
RUSTFLAGS: "-C target-cpu=native"
jobs:
summoning:
name: 🕯️ Summon and Test the Digital Essence
runs-on: ubuntu-latest
steps:
# Pin actions to specific versions for security
- name: 🌒 Channel the Repository
uses: actions/checkout@v4
- name: ⚔️ Install Mystical Dependencies
run: |
sudo apt-get update
sudo apt-get install -y librocksdb-dev clang
- name: ⛧ Invoke Rust
run: |
rustup toolchain install stable --profile minimal -c clippy rustfmt
rustup default stable
- name: 🐍 Summon Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: 📓 Cache Ancient Knowledge
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: 🔍 Verify Sacred Format
run: cargo fmt -- --check
- name: 🕯️ Invoke Clippy's Wisdom
run: cargo clippy -- -D warnings
- name: ⚡ Forge the Artifacts
run: cargo build --verbose
- name: 🗝️ Perform the Test Rituals
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
./tests/run_local_tests.sh