Skip to content

Commit 2e359f5

Browse files
committed
gh action start
1 parent ab02488 commit 2e359f5

File tree

2 files changed

+149
-14
lines changed

2 files changed

+149
-14
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

Dockerfile

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
FROM lambci/lambda:build-python3.7 as builder
22

33
ARG http_proxy
4-
ARG CURL_VERSION=7.70.0
5-
ARG GDAL_VERSION=3.1.0
4+
ARG CURL_VERSION=7.70.1
5+
ARG GDAL_VERSION=3.1.2
66
ARG GEOS_VERSION=3.8.1
7-
ARG PROJ_VERSION=7.0.1
7+
ARG PROJ_VERSION=7.1.0
88
ARG LASZIP_VERSION=3.4.3
99
ARG GEOTIFF_VERSION=1.6.0
1010
ARG PDAL_VERSION=2.1.0
1111
ARG ENTWINE_VERSION=2.1.0
1212
ARG DESTDIR="/build"
1313
ARG PREFIX="/usr"
1414
ARG PARALLEL=8
15-
ARG CMAKE_VERSION=3.17.2
15+
ARG CMAKE_VERSION=3.18.1
16+
1617

1718

1819
RUN \
@@ -43,12 +44,9 @@ RUN gcc --version
4344

4445

4546
RUN \
46-
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.tar.gz \
47-
&& tar -zxvf cmake-${CMAKE_VERSION}.tar.gz \
48-
&& cd cmake-${CMAKE_VERSION} \
49-
&& ./bootstrap --parallel=${PARALLEL} --prefix=/usr \
50-
&& make -j ${PARALLEL} \
51-
&& make install DESTDIR=/ \
47+
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh \
48+
&& chmod +x cmake-${CMAKE_VERSION}-Linux-x86_64.sh \
49+
&& ./cmake-${CMAKE_VERSION}-Linux-x86_64.sh --skip-license --prefix=/usr \
5250
&& cd /var/task \
5351
&& rm -rf cmake*
5452

@@ -177,8 +175,6 @@ RUN \
177175
ADD https://api.github.com/repos/PDAL/PDAL/commits?sha=${PDAL_VERSION} \
178176
/tmp/bust-cache
179177

180-
ENV \
181-
PACKAGE_PREFIX=${DESTDIR}/python
182178

183179
RUN \
184180
git clone https://github.com/PDAL/PDAL.git --branch ${PDAL_VERSION} \
@@ -188,8 +184,8 @@ RUN \
188184
&& cd _build \
189185
&& cmake .. \
190186
-G "Unix Makefiles" \
191-
-DCMAKE_BUILD_TYPE=Release \
192-
-DCMAKE_CXX_FLAGS="-std=c++11" \
187+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
188+
-DCMAKE_CXX_FLAGS="-std=c++11 -pg" \
193189
-DCMAKE_MAKE_PROGRAM=make \
194190
-DBUILD_PLUGIN_I3S=ON \
195191
-DBUILD_PLUGIN_E57=ON \

0 commit comments

Comments
 (0)