name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUSTFLAGS: -D warnings
CARGO_PROFILE_DEV_DEBUG: "0"
CARGO_PROFILE_TEST_DEBUG: "0"
jobs:
fmt:
name: Formatting
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.91"
components: rustfmt
- run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.91"
components: clippy
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y ninja-build clang mold
- uses: Swatinem/rust-cache@v2
- name: Clippy default features
run: cargo clippy --locked --all-targets -- -D warnings
- name: Clippy all features
run: cargo clippy --locked --all-targets --all-features -- -D warnings
test:
name: Test Suite
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.91"
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y ninja-build clang mold
- uses: Swatinem/rust-cache@v2
- run: cargo test --locked --all-features
build-full:
name: Build crawlex (full)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.91"
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y ninja-build clang mold
- uses: Swatinem/rust-cache@v2
- name: Build crawlex (full, HTTP + render)
run: cargo build --locked --bin crawlex --all-features
build-mini:
name: Build crawlex-mini (HTTP-only)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.91"
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y ninja-build clang mold
- uses: Swatinem/rust-cache@v2
- name: Build crawlex-mini (no browser deps)
run: cargo build --locked --bin crawlex-mini --no-default-features --features cli,sqlite
package:
name: cargo publish dry-run
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.91"
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y ninja-build clang mold
- uses: Swatinem/rust-cache@v2
- name: Verify Cargo.toml + package.json version match
run: node scripts/sync-version.js --check
- name: cargo publish --dry-run
run: cargo publish --dry-run --locked