Skip to content

Commit 1c2441d

Browse files
authored
Github Actions for building (#68)
* implement basic gh action * use correct variable * use conda's compilers * dont install default on win * run windows shell for win build * syntax * setup msvc cmd * set PDAL_DIR for cmake invocation * lint * more churn * continuation * mamba * syntax * no mamba * churn churn * nmore lint * windows deps * refactor * install for win * try activation * environment stuff * try activations * remove activation * shell invocation * deck chair rearranging * chairs * msvc interfering? * back up conda action version * syntax * explicit activation * msvc, install * stock install PDAL_DIR path * set msvc ver * syntax * syntax 2 * try conda compilers * try ninja build * explicit CMAKE_GEN * vcvars * activate * syntax * vcvars * random noise * I don't understand * ninja * install * need cython * dist build/distribution * bashisms * pytest call * lint * try develop install * no direct import * remove alternative CI invocations
1 parent 7294fa3 commit 1c2441d

File tree

10 files changed

+139
-170
lines changed

10 files changed

+139
-170
lines changed

.github/workflows/build.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
push:
8+
branches:
9+
- '*'
10+
release:
11+
types:
12+
- published
13+
jobs:
14+
unix:
15+
name: ${{ matrix.os }} - ${{ matrix.python-version }}
16+
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: true
20+
matrix:
21+
os: ['ubuntu-latest', 'macos-latest' ]
22+
python-version: ['3.7','3.8']
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: goanpeca/setup-miniconda@v1
27+
with:
28+
auto-update-conda: true
29+
python-version: ${{ matrix.python-version }}
30+
activate-environment: test
31+
channels: conda-forge
32+
auto-activate-base: false
33+
34+
- name: Dependencies
35+
shell: bash -l {0}
36+
run: |
37+
conda install --yes --quiet -c conda-forge scikit-build numpy python=${{ matrix.python-version }} compilers ninja pdal pytest conda-build -y
38+
39+
- name: Install
40+
shell: bash -l {0}
41+
run: |
42+
pip install .
43+
pdal --drivers
44+
45+
- name: Test
46+
shell: bash -l {0}
47+
run: |
48+
pip install -e .
49+
SKPATH=$(python -c "import skbuild; print (skbuild.constants.SKBUILD_DIR())")/cmake-build
50+
export PDAL_DRIVER_PATH=$SKPATH
51+
$SKPATH/pdal_filters_python_test
52+
$SKPATH/pdal_io_numpy_test
53+
py.test
54+
55+
56+
windows:
57+
name: ${{ matrix.os }} - ${{ matrix.python-version }}
58+
59+
runs-on: ${{ matrix.os }}
60+
strategy:
61+
fail-fast: true
62+
matrix:
63+
os: ['windows-latest']
64+
python-version: ['3.7','3.8']
65+
66+
steps:
67+
- uses: actions/checkout@v2
68+
- uses: goanpeca/[email protected]
69+
with:
70+
channels: conda-forge
71+
auto-update-conda: true
72+
python-version: ${{ matrix.python-version }}
73+
74+
75+
- name: Dependencies
76+
shell: cmd /C CALL "{0}"
77+
run: |
78+
79+
call conda activate test
80+
conda install --yes --quiet -c conda-forge scikit-build numpy python=${{ matrix.python-version }} compilers cython ninja pdal pytest conda-build -y
81+
82+
- name: Install
83+
shell: cmd /C CALL "{0}"
84+
run: |
85+
86+
call conda activate test
87+
where python
88+
python setup.py develop -- -G "Ninja"
89+
90+
- name: Test
91+
shell: cmd /C CALL "{0}"
92+
run: |
93+
call conda activate test
94+
set PYTHONHOME=%CONDA_PREFIX%
95+
py.test
96+
for /f %%i in ('python -c "import skbuild; print (skbuild.constants.SKBUILD_DIR())"') do set SKPATH=%%i
97+
set PDAL_DRIVER_PATH=%SKPATH%\cmake-build
98+
%SKPATH%\cmake-build\pdal_filters_python_test.exe
99+
%SKPATH%\cmake-build\pdal_io_numpy_test.exe
100+
pdal --version
101+
pdal --drivers
102+
103+
dist:
104+
name: Distribution
105+
needs: [windows, unix]
106+
107+
runs-on: ${{ matrix.os }}
108+
strategy:
109+
fail-fast: true
110+
matrix:
111+
os: ['ubuntu-latest']
112+
python-version: ['3.8']
113+
114+
steps:
115+
- uses: actions/checkout@v2
116+
- uses: goanpeca/[email protected]
117+
with:
118+
channels: conda-forge
119+
auto-update-conda: true
120+
python-version: ${{ matrix.python-version }}
121+
122+
- name: Dependencies
123+
shell: bash -l {0}
124+
run: |
125+
conda install --yes --quiet -c conda-forge scikit-build numpy python=${{ matrix.python-version }} compilers cython ninja pdal pytest conda-build -y
126+
127+
- name: sdist
128+
shell: bash -l {0}
129+
run: |
130+
python setup.py sdist
131+
ls dist
132+
133+
- uses: pypa/gh-action-pypi-publish@master
134+
name: Publish package
135+
if: github.event_name == 'release' && github.event.action == 'published'
136+
with:
137+
user: __token__
138+
password: ${{ secrets.pypi_token }}
139+
packages_dir: ./dist

.travis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

azure-pipelines.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

scripts/appveyor/build.cmd

Lines changed: 0 additions & 7 deletions
This file was deleted.

scripts/appveyor/config.cmd

Lines changed: 0 additions & 16 deletions
This file was deleted.

scripts/appveyor/test.cmd

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/azp/linux.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

scripts/azp/osx.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

scripts/azp/win.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

scripts/travis/script.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)