Skip to content

Commit afd56ea

Browse files
authored
Remove plugins (#104)
* Remove PDAL plugins * Skip tests that depend on optional plugins if not available * CI revamp - Merge jobs for Unix & Windows - Move conda dependencies to environment.yml - Replace miniconda with micromamba - Install python pdal plugins from https://github.com/PDAL/python-plugins and test against it - Build and upload wheel distributions for every OS & Python version combination
1 parent e7c5b06 commit afd56ea

File tree

206 files changed

+123
-93817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+123
-93817
lines changed

.github/environment.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: test
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- scikit-build
6+
- numpy
7+
- pybind11
8+
- pdal
9+
- pytest
10+
- meshio

.github/workflows/build.yml

Lines changed: 53 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -10,121 +10,83 @@ on:
1010
release:
1111
types:
1212
- published
13-
jobs:
14-
unix:
15-
name: ${{ matrix.os }} - ${{ matrix.python-version }}
1613

14+
defaults:
15+
run:
16+
shell: bash -l -eo pipefail {0}
17+
18+
jobs:
19+
build:
20+
name: Build ${{ matrix.os }} py${{ matrix.python-version }}
1721
runs-on: ${{ matrix.os }}
22+
1823
strategy:
1924
fail-fast: true
2025
matrix:
21-
os: ['ubuntu-latest', 'macos-latest' ]
22-
python-version: ['3.7','3.8', '3.9']
26+
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
27+
python-version: ['3.7', '3.8', '3.9']
2328

2429
steps:
25-
- uses: actions/checkout@v2
26-
- uses: conda-incubator/setup-miniconda@v2
27-
with:
28-
python-version: ${{ matrix.python-version }}
29-
mamba-version: "*"
30-
activate-environment: test
31-
channels: conda-forge
32-
auto-activate-base: false
33-
34-
- name: Linux dependencies
35-
if: matrix.os == 'ubuntu-latest'
36-
shell: bash -l {0}
37-
run: sudo apt-get install gcc-multilib -y
38-
39-
- name: Dependencies
40-
shell: bash -l {0}
41-
run: mamba install --yes --quiet -c conda-forge scikit-build numpy python=${{ matrix.python-version }} pybind11 pdal pytest meshio
42-
43-
- name: Install
44-
shell: bash -l {0}
45-
run: |
46-
python setup.py develop -- -G "Ninja" -DWITH_TESTS=ON
47-
pdal --drivers
30+
- name: Check out python-pdal
31+
uses: actions/checkout@v2
4832

49-
- name: Test
50-
shell: bash -l {0}
51-
run: |
52-
export PDAL_DRIVER_PATH=$(python -c "import skbuild; print(skbuild.constants.SKBUILD_DIR())")/cmake-build
53-
$PDAL_DRIVER_PATH/pdal_filters_python_test
54-
$PDAL_DRIVER_PATH/pdal_io_numpy_test
55-
py.test -v test/
56-
57-
windows:
58-
name: ${{ matrix.os }} - ${{ matrix.python-version }}
59-
60-
runs-on: ${{ matrix.os }}
61-
strategy:
62-
fail-fast: true
63-
matrix:
64-
os: ['windows-latest']
65-
python-version: ['3.7','3.8', '3.9']
33+
- name: Check out python-pdal-plugins
34+
uses: actions/checkout@v2
35+
with:
36+
repository: PDAL/python-plugins
37+
path: ./plugins
6638

67-
steps:
68-
- uses: actions/checkout@v2
69-
- uses: conda-incubator/setup-miniconda@v2
39+
- name: Setup micromamba
40+
uses: mamba-org/provision-with-micromamba@main
7041
with:
71-
channels: conda-forge
72-
python-version: ${{ matrix.python-version }}
42+
environment-file: .github/environment.yml
43+
extra-specs: |
44+
python=${{ matrix.python-version }}
7345
74-
- name: Dependencies
75-
shell: cmd /C CALL "{0}"
76-
run: |
77-
call conda activate test
78-
conda install --yes --quiet -c conda-forge scikit-build numpy python=${{ matrix.python-version }} pybind11 pdal pytest meshio
46+
- name: Install python-pdal
47+
run: pip install -e .
7948

80-
- name: Install
81-
shell: cmd /C CALL "{0}"
82-
run: |
83-
call conda activate test
84-
python setup.py develop -- -G "Ninja" -DWITH_TESTS=ON
85-
pdal --drivers
49+
- name: Install python-pdal-plugins
50+
working-directory: ./plugins
51+
run: pip install -e .
8652

8753
- name: Test
88-
shell: cmd /C CALL "{0}"
8954
run: |
90-
call conda activate test
91-
set PYTHONHOME=%CONDA_PREFIX%
92-
for /f %%i in ('python -c "import skbuild; print(skbuild.constants.SKBUILD_DIR())"') do set PDAL_DRIVER_PATH=%%i\cmake-build
93-
%PDAL_DRIVER_PATH%\pdal_filters_python_test.exe
94-
%PDAL_DRIVER_PATH%\pdal_io_numpy_test.exe
55+
export PDAL_DRIVER_PATH=$(python -c "import os, skbuild; print(os.path.join('plugins', skbuild.constants.SKBUILD_DIR(), 'cmake-build'))")
56+
pdal --drivers
9557
py.test -v test/
9658
97-
dist:
98-
name: Distribution
99-
needs: [windows, unix]
59+
- name: Build wheel distribution
60+
run: python setup.py --skip-cmake bdist_wheel
10061

101-
runs-on: ${{ matrix.os }}
102-
strategy:
103-
fail-fast: true
104-
matrix:
105-
os: ['ubuntu-latest']
106-
python-version: ['3.8']
62+
- name: Build source distribution
63+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'
64+
run: python setup.py sdist
10765

108-
steps:
109-
- uses: actions/checkout@v2
110-
- uses: conda-incubator/setup-miniconda@v2
66+
- name: Upload distribution(s)
67+
uses: actions/upload-artifact@v2
11168
with:
112-
channels: conda-forge
113-
python-version: ${{ matrix.python-version }}
114-
mamba-version: "*"
69+
name: ${{ matrix.os }}-py${{ matrix.python-version }}
70+
path: ./dist/*
11571

116-
- name: Dependencies
117-
shell: bash -l {0}
118-
run: mamba install --yes --quiet -c conda-forge scikit-build numpy python=${{ matrix.python-version }} pybind11 pdal
72+
publish:
73+
runs-on: ubuntu-latest
74+
needs: [build]
75+
76+
steps:
77+
- name: Download distribution(s)
78+
uses: actions/download-artifact@v2
79+
with:
80+
path: ./artifacts
11981

120-
- name: sdist
121-
shell: bash -l {0}
82+
- name: Move artifacts to dist
12283
run: |
123-
python setup.py sdist
124-
ls dist
84+
mkdir dist
85+
find ./artifacts -type f -exec mv {} ./dist \;
86+
tree ./dist
12587
126-
- uses: pypa/gh-action-pypi-publish@master
127-
name: Publish package
88+
- name: Publish package
89+
uses: pypa/gh-action-pypi-publish@master
12890
if: github.event_name == 'release' && github.event.action == 'published'
12991
with:
13092
user: __token__

0 commit comments

Comments
 (0)