feat: add mystical crates.io badge to README #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
packages: 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 | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy, rustfmt | |
- 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 | |
- name: 📦 Channel to the Package Repository | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
run: | | |
# Publish the core node package | |
cargo package -p solana-oasis-node | |
cargo publish -p solana-oasis-node --token ${GITHUB_TOKEN} --registry github | |
# Publish the SDK package | |
cargo package -p solana-oasis-sdk | |
cargo publish -p solana-oasis-sdk --token ${GITHUB_TOKEN} --registry github | |
# Publish the bridge package | |
cargo package -p solana-oasis-bridge | |
cargo publish -p solana-oasis-bridge --token ${GITHUB_TOKEN} --registry github | |
# Publish the AI layer package | |
cargo package -p solana-oasis-ai | |
cargo publish -p solana-oasis-ai --token ${GITHUB_TOKEN} --registry github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |