Skip to content

Release 0.15.0-alpha1 #309

Release 0.15.0-alpha1

Release 0.15.0-alpha1 #309

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
rustfmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check
ubuntu:
needs: [rustfmt]
name: Test ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-22.04']
services:
trextestdb:
image: sourcepole/trextestdb
ports:
- 5439:5432
minio:
image: minio/minio
env:
MINIO_REGION_NAME: my-region
MINIO_ACCESS_KEY: miniostorage
MINIO_SECRET_KEY: miniostorage
ports:
- 9000:9000
# Service does not start because of missing command arguments
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Start MinIO
run: docker run -d --rm -p 9000:9000 -e MINIO_REGION_NAME=my-region -e MINIO_ACCESS_KEY=miniostorage -e MINIO_SECRET_KEY=miniostorage minio/minio server /data
- name: Install MinIO Client
run: |
curl -o mc -L https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
- name: Create S3 Bucket
run: |
./mc config host add local-docker http://localhost:9000 miniostorage miniostorage
./mc mb local-docker/trex
./mc policy set download local-docker/trex
- name: Install libgdal-dev
run: sudo apt update && sudo apt install -y libgdal-dev
- name: Cargo build
run: cargo build --all-features
- run: ldd target/debug/t_rex
- name: Execute tests
run: cargo test --all-features --all --no-fail-fast
- name: Execute DB tests
run: cargo test --all-features --all --no-fail-fast -- --ignored
env:
DBCONN: "postgresql://t_rex:t_rex@127.0.0.1:5439/t_rex_tests"
# S3TEST: "true"
# Currenly fails at s3cache_test.rs:74 with "403 Forbidden" response
macos:
needs: [rustfmt]
name: Test ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['macOS-latest']
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
# - name: Execute tests
# run: cargo test ${{ matrix.features }} --all --no-fail-fast
# Builds also t-rex-gdal, so we test each workspace
- run: cargo test --no-default-features --no-fail-fast
- run: cd t-rex-core && cargo test --no-default-features --no-fail-fast
# - run: cd t-rex-service && cargo test --no-default-features --no-fail-fast
# - run: cd t-rex-webserver && cargo test --no-default-features --no-fail-fast
# - run: otool -L target/debug/t_rex
windows:
needs: [rustfmt]
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install GDAL
shell: bash
run: |
curl -S -O https://download.gisinternals.com/sdk/downloads/release-1928-x64-dev.zip
7z x release-1928-x64-dev.zip
mv release-1928-x64/bin/gdal/apps/* release-1928-x64/bin/
- name: Build
shell: bash
run: |
rustc -Vv
cargo -V
vswhere
export GDAL_HOME=$PWD/release-1928-x64
export GDAL_DATA=$GDAL_HOME/bin/gdal-data
export PATH=$GDAL_HOME/bin:$PATH
ogrinfo --version
export GDAL_VERSION=$(ogrinfo --version | sed 's/GDAL \(.*\), .*/\1/')
echo $PATH
cargo build --all-features || true
# FIXME: Currently fails with "No pre-built bindings available for GDAL version 3.6"
# cargo run -- --version
# cargo test --all --no-fail-fast