-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (65 loc) · 1.93 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Build
on:
pull_request:
branches:
- '*'
push:
branches:
- '*'
release:
types:
- published
defaults:
run:
shell: bash -l -eo pipefail {0}
jobs:
build:
name: Build ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- name: Check out
uses: actions/checkout@v4
- name: Setup micromamba
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
auto-update-conda: true
environment-file: .github/environment.yml
- name: Install
shell: bash -l {0}
run: |
pip install . -Ccmake.define.WITH_TESTS=ON .
- name: Test Unix
shell: bash -l {0}
if: matrix.os != 'windows-latest'
run: |
export PYTHONHOME=$CONDA_PREFIX
export WHEEL_DIR=$(python -m "scikit_build_core.builder.wheel_tag")
export PDAL_DRIVER_PATH=`pwd`/build/$WHEEL_DIR/Release
echo $PDAL_DRIVER_PATH
ls $PDAL_DRIVER_PATH
pdal --drivers
$PDAL_DRIVER_PATH/pdal_filters_python_test
$PDAL_DRIVER_PATH/pdal_io_numpy_test
- name: Test Windows
if: matrix.os == 'windows-latest'
shell: bash -l {0}
env:
EXT: ${{ matrix.os == 'windows-latest' && '.exe' || '' }}
run: |
export PYTHONHOME=$CONDA_PREFIX
export WHEEL_DIR=$(python -m "scikit_build_core.builder.wheel_tag")
export PDAL_DRIVER_PATH=`pwd`/build/$WHEEL_DIR/Release/Release
echo $PDAL_DRIVER_PATH
ls $PDAL_DRIVER_PATH
pdal --drivers
$PDAL_DRIVER_PATH/pdal_filters_python_test$EXT
$PDAL_DRIVER_PATH/pdal_io_numpy_test$EXT