Improve benches #29
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: Rust | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
lint-test: | |
name: Lint and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install Pixi | |
run: | | |
curl -fsSL https://pixi.sh/install.sh | bash | |
echo "$HOME/.pixi/bin" >> $GITHUB_PATH | |
echo "GDAL_HOME=$(pwd)/scripts/setup/.pixi/envs/default" >> "$GITHUB_ENV" | |
echo "LD_LIBRARY_PATH=$(pwd)/scripts/setup/.pixi/envs/default/lib" >> "$GITHUB_ENV" | |
echo "GEOS_LIB_DIR=$(pwd)/scripts/setup/.pixi/envs/default/lib" >> "$GITHUB_ENV" | |
echo "GEOS_VERSION=3.12.1" >> "$GITHUB_ENV" | |
echo "PKG_CONFIG_PATH=$(pwd)/scripts/setup/.pixi/envs/default/lib/pkgconfig" >> "$GITHUB_ENV" | |
- name: Install build requirements | |
run: | | |
cd scripts/setup | |
pixi install | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Run cargo clippy | |
run: cargo clippy --all --all-features --tests -- -D warnings | |
- name: Run cargo test | |
run: cargo test --all | |
- name: Run cargo test with all features | |
run: cargo test --all --all-features |