Skip to content

feat: add projections #132

feat: add projections

feat: add projections #132

Workflow file for this run

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: Run tests
jobs:
test:
name: Run tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup mambaforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: s2geography-dev
use-mamba: true
mamba-version: "*"
- name: Get Date
id: get-date
shell: bash -l {0}
# cache will last one day
run: echo "::set-output name=today::$(/bin/date -u '+%Y%m%d')"
- name: Set environment file
id: env-file
shell: bash -l {0}
run: echo "env_file=ci/environment.yml" >> $GITHUB_ENV
- name: Check environment variables
id: check-env
run: |
echo "env.env_file: ${{ env.env_file }}"
- name: Cache environment
uses: actions/cache@v2
with:
path: ${{ env.CONDA }}/envs
key: ${{ runner.os }}-conda-${{ hashFiles( env.env_file ) }}-${{ steps.get-date.outputs.today }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if ci/environment.yml has not changed
CACHE_NUMBER: 0
id: conda-cache
- name: Update environment
run: mamba env update -n s2geography-dev -f ${{ env.env_file }}
if: steps.conda-cache.outputs.cache-hit != 'true'
- name: Conda info
shell: bash -l {0}
run: |
conda info
conda list
- name: Configure s2geography
shell: bash -l {0}
run: |
cmake -S . -B build \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DS2GEOGRAPHY_BUILD_TESTS=ON \
-DS2GEOGRAPHY_S2_SOURCE=CONDA
- name: Build s2geography
shell: bash -l {0}
run: |
cmake --build build --config Release
- name: Run tests
shell: bash -l {0}
run: |
cd build
ctest -T test --output-on-failure .