Skip to content

Commit

Permalink
Use pixi for native dependency management on CI (#177)
Browse files Browse the repository at this point in the history
* try pixi on ci

* add to path

* add linux-x64

* set gdal path in ci

* Set GEOS paths

* set pkg config path
  • Loading branch information
kylebarron authored Aug 25, 2023
1 parent 8000a3a commit 4d5988a
Show file tree
Hide file tree
Showing 5 changed files with 5,133 additions and 11 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,31 @@ jobs:

- uses: Swatinem/rust-cache@v2

- name: Cargo fmt
run: cargo fmt --all -- --check

# Note not sure why this is needed
- name: Install protobuf
- name: Install Pixi
run: |
sudo apt-get install libprotobuf-dev protobuf-compiler
curl -fsSL https://pixi.sh/install.sh | bash
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
echo "GDAL_HOME=$(pwd)/build/.pixi/env" >> "$GITHUB_ENV"
echo "LD_LIBRARY_PATH=$(pwd)/build/.pixi/env/lib" >> "$GITHUB_ENV"
echo "GEOS_LIB_DIR=$(pwd)/build/.pixi/env/lib" >> "$GITHUB_ENV"
echo "GEOS_VERSION=3.12.0" >> "$GITHUB_ENV"
echo "PKG_CONFIG_PATH=$(pwd)/build/.pixi/env/lib/pkgconfig" >> "$GITHUB_ENV"
- name: Install build requirements
run: |
cd build
pixi install
- run: sudo apt install libgeos-dev
- name: Cargo fmt
run: cargo fmt --all -- --check

# Don't use --all-features as we don't have GDAL 3.6 available in CI
- name: "clippy --all"
run: cargo clippy --all --features geos --features geozero --tests -- -D warnings
run: cargo clippy --all --all-features --tests -- -D warnings

- name: "cargo check"
run: cargo check --all --features geos --features geozero
run: cargo check --all --all-features

- name: "cargo test"
run: |
cargo test --all
cargo test --all --features geos --features geozero
cargo test --all --all-features
2 changes: 2 additions & 0 deletions build/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GitHub syntax highlighting
pixi.lock linguist-language=YAML
2 changes: 2 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# pixi environments
.pixi
Loading

0 comments on commit 4d5988a

Please sign in to comment.