don't build atlas in pipeline #249
This file contains hidden or 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: 🧪 CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: | |
triggered_by: | |
description: 'Triggered by workflow' | |
required: false | |
default: 'manual' | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
# Check code formatting | |
fmt: | |
name: 🎨 Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
# Run clippy lints | |
clippy: | |
name: 📎 Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
# Run tests for native targets | |
test-native: | |
name: 🧪 Test Native | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: 🔧 Install system dependencies (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y fontconfig libfontconfig-dev zsh | |
- name: Make build script executable | |
run: chmod +x build.zsh | |
- name: Run tests | |
run: ./build.zsh test-native | |
# Build and test WASM targets | |
build-wasm: | |
name: 🕸️ Build WASM | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: wasm32-unknown-unknown | |
- uses: Swatinem/rust-cache@v2 | |
# Install required tools | |
- name: 📦 Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: 📦 Setup Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version: '22' | |
# Install system dependencies for font handling | |
- name: 🔧 Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y fontconfig libfontconfig-dev zsh fonts-noto fonts-noto-color-emoji | |
# Make scripts executable | |
- name: 🔧 Make scripts executable | |
run: | | |
chmod +x build.zsh | |
chmod +x scripts/*.zsh | |
# Use build.zsh for setup and build | |
- name: 🔧 Setup JS environment | |
run: ./build.zsh setup | |
#- name: 🎨 Generate font atlas (baked into library) | |
# run: ./build.zsh atlas | |
- name: 🔨 Build WASM | |
run: ./build.zsh build-wasm | |
# Run WASM tests | |
- name: 🧪 Test WASM | |
run: ./build.zsh test-wasm | |
# Upload build artifacts | |
- name: 📤 Upload WASM artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wasm-build | |
path: js/dist/ | |
# Documentation build | |
docs: | |
name: 📚 Build Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: wasm32-unknown-unknown | |
- uses: Swatinem/rust-cache@v2 | |
- name: 🔧 Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y fontconfig libfontconfig-dev zsh | |
- name: 📚 Build docs | |
run: cargo doc --no-deps --all-features | |
env: | |
RUSTDOCFLAGS: --cfg docsrs | |
- name: 📤 Upload docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: target/doc/ | |
# publish: | |
# name: 📦 Publish to crates.io | |
# runs-on: ubuntu-latest | |
# needs: [fmt, clippy, test-native, build-wasm, verify-package] | |
# if: startsWith(github.ref, 'refs/tags/v') | |
# steps: | |
# - uses: actions/checkout@v5 | |
# - uses: dtolnay/rust-toolchain@stable | |
# - name: 🔧 Install system dependencies | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y fontconfig libfontconfig-dev zsh | |
# - name: Make build script executable | |
# run: chmod +x build.zsh | |
# - name: Build Rust crates | |
# run: ./build.zsh build-rust | |
# - name: Publish beamterm-data | |
# run: cargo publish -p beamterm-data | |
# env: | |
# CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
# - name: Wait for crates.io | |
# run: sleep 30 | |
# - name: Publish beamterm-renderer | |
# run: cargo publish -p beamterm-renderer | |
# env: | |
# CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |