Skip to content

Bump esbuild and fumadocs-mdx in /docs #2

Bump esbuild and fumadocs-mdx in /docs

Bump esbuild and fumadocs-mdx in /docs #2

Workflow file for this run

name: 馃И CI - Test & Build
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test Suite
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable]
steps:
- name: 馃摜 Checkout code
uses: actions/checkout@v4
- name: 馃 Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- name: 馃摝 Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: 馃攳 Check formatting
run: cargo fmt -- --check
- name: 馃搸 Clippy lints
run: cargo clippy --all-targets --all-features -- -D warnings
- name: 馃И Run tests
run: cargo test --verbose
- name: 馃敤 Build release
run: cargo build --release --verbose
- name: 馃拵 Self-analyze with Lucent
if: matrix.os == 'ubuntu-latest'
run: |
cargo run --release -- . --format pretty
cargo run --release -- . --format json > self-analysis.json
- name: 馃摛 Upload self-analysis
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
with:
name: lucent-self-analysis
path: self-analysis.json
retention-days: 90
build-binaries:
name: Build Release Binaries
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
needs: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: lucent
asset_name: lucent-linux-x86_64
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: lucent
asset_name: lucent-macos-x86_64
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: lucent
asset_name: lucent-macos-aarch64
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact_name: lucent.exe
asset_name: lucent-windows-x86_64.exe
steps:
- name: 馃摜 Checkout code
uses: actions/checkout@v4
- name: 馃 Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
- name: 馃敤 Build release binary
run: cargo build --release --target ${{ matrix.target }}
- name: 馃摝 Package binary
shell: bash
run: |
cd target/${{ matrix.target }}/release
if [ "${{ matrix.os }}" = "windows-latest" ]; then
7z a ../../../${{ matrix.asset_name }}.zip ${{ matrix.artifact_name }}
else
tar czf ../../../${{ matrix.asset_name }}.tar.gz ${{ matrix.artifact_name }}
fi
- name: 馃摛 Upload binary artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.asset_name }}
path: |
${{ matrix.asset_name }}.tar.gz
${{ matrix.asset_name }}.zip
retention-days: 30
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: 馃摜 Checkout code
uses: actions/checkout@v4
- name: 馃 Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: llvm-tools-preview
- name: 馃摝 Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: 馃И Generate coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: 馃搳 Upload to Codecov
uses: codecov/codecov-action@v3
with:
files: lcov.info
fail_ci_if_error: false