diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..09df1908 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,139 @@ +name: Build + +on: + pull_request: + branches: + - '*' + push: + branches: + - '*' + release: + types: + - published +jobs: + unix: + name: ${{ matrix.os }} - ${{ matrix.python-version }} + + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: ['ubuntu-latest', 'macos-latest' ] + python-version: ['3.7','3.8'] + + steps: + - uses: actions/checkout@v2 + - uses: goanpeca/setup-miniconda@v1 + with: + auto-update-conda: true + python-version: ${{ matrix.python-version }} + activate-environment: test + channels: conda-forge + auto-activate-base: false + + - name: Dependencies + shell: bash -l {0} + run: | + conda install --yes --quiet -c conda-forge scikit-build numpy python=${{ matrix.python-version }} compilers ninja pdal pytest conda-build -y + + - name: Install + shell: bash -l {0} + run: | + pip install . + pdal --drivers + + - name: Test + shell: bash -l {0} + run: | + pip install -e . + SKPATH=$(python -c "import skbuild; print (skbuild.constants.SKBUILD_DIR())")/cmake-build + export PDAL_DRIVER_PATH=$SKPATH + $SKPATH/pdal_filters_python_test + $SKPATH/pdal_io_numpy_test + py.test + + + windows: + name: ${{ matrix.os }} - ${{ matrix.python-version }} + + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: ['windows-latest'] + python-version: ['3.7','3.8'] + + steps: + - uses: actions/checkout@v2 + - uses: goanpeca/setup-miniconda@v1.1.2 + with: + channels: conda-forge + auto-update-conda: true + python-version: ${{ matrix.python-version }} + + + - name: Dependencies + shell: cmd /C CALL "{0}" + run: | + + call conda activate test + conda install --yes --quiet -c conda-forge scikit-build numpy python=${{ matrix.python-version }} compilers cython ninja pdal pytest conda-build -y + + - name: Install + shell: cmd /C CALL "{0}" + run: | + + call conda activate test + where python + python setup.py develop -- -G "Ninja" + + - name: Test + shell: cmd /C CALL "{0}" + run: | + call conda activate test + set PYTHONHOME=%CONDA_PREFIX% + py.test + for /f %%i in ('python -c "import skbuild; print (skbuild.constants.SKBUILD_DIR())"') do set SKPATH=%%i + set PDAL_DRIVER_PATH=%SKPATH%\cmake-build + %SKPATH%\cmake-build\pdal_filters_python_test.exe + %SKPATH%\cmake-build\pdal_io_numpy_test.exe + pdal --version + pdal --drivers + + dist: + name: Distribution + needs: [windows, unix] + + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: ['ubuntu-latest'] + python-version: ['3.8'] + + steps: + - uses: actions/checkout@v2 + - uses: goanpeca/setup-miniconda@v1.1.2 + with: + channels: conda-forge + auto-update-conda: true + python-version: ${{ matrix.python-version }} + + - name: Dependencies + shell: bash -l {0} + run: | + conda install --yes --quiet -c conda-forge scikit-build numpy python=${{ matrix.python-version }} compilers cython ninja pdal pytest conda-build -y + + - name: sdist + shell: bash -l {0} + run: | + python setup.py sdist + ls dist + + - uses: pypa/gh-action-pypi-publish@master + name: Publish package + if: github.event_name == 'release' && github.event.action == 'published' + with: + user: __token__ + password: ${{ secrets.pypi_token }} + packages_dir: ./dist diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5bc813b1..00000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# .travis.yml -# Configure Travis CI service for http://github.com/PDAL/python - -sudo: required - -services: docker - -before_install: - - docker pull pdal/pdal:latest - -script: - - docker run -v $TRAVIS_BUILD_DIR:/pdal -t pdal/pdal:latest /bin/sh -c "/pdal/scripts/travis/script.sh" - diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 7677b24b..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,5 +0,0 @@ -jobs: - - template: ./scripts/azp/linux.yml - - template: ./scripts/azp/win.yml - - template: ./scripts/azp/osx.yml - diff --git a/scripts/appveyor/build.cmd b/scripts/appveyor/build.cmd deleted file mode 100644 index 8306aebb..00000000 --- a/scripts/appveyor/build.cmd +++ /dev/null @@ -1,7 +0,0 @@ -call "%CONDA_ROOT%\Scripts\activate.bat" base -call conda install -c conda-forge -y pdal cython packaging - -call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 - -python setup.py build - diff --git a/scripts/appveyor/config.cmd b/scripts/appveyor/config.cmd deleted file mode 100644 index 3188a8bc..00000000 --- a/scripts/appveyor/config.cmd +++ /dev/null @@ -1,16 +0,0 @@ -@echo off - -set "CONDA_ROOT=C:\Miniconda3-x64" -set PATH=%CONDA_ROOT%;%CONDA_ROOT%\\scripts;%CONDA_ROOT%\\Library\\bin;%PATH%;C:\\Program Files (x86)\\CMake\\bin -conda config --set always_yes yes -conda config --add channels conda-forge -conda config --set auto_update_conda no -conda config --set channel_priority true -conda update -q --all -conda info -python -c "import sys; print(sys.version)" -python -c "import sys; print(sys.executable)" -python -c "import sys; print(sys.prefix)" - -dir - diff --git a/scripts/appveyor/test.cmd b/scripts/appveyor/test.cmd deleted file mode 100644 index 61c3b221..00000000 --- a/scripts/appveyor/test.cmd +++ /dev/null @@ -1,3 +0,0 @@ -call "%CONDA_ROOT%\Scripts\activate.bat" base - -python setup.py test diff --git a/scripts/azp/linux.yml b/scripts/azp/linux.yml deleted file mode 100644 index 5c94b74a..00000000 --- a/scripts/azp/linux.yml +++ /dev/null @@ -1,30 +0,0 @@ -# -*- mode: yaml -*- - -jobs: -- job: linux - pool: - vmImage: ubuntu-16.04 - timeoutInMinutes: 60 - steps: - - bash: echo "##vso[task.prependpath]$CONDA/bin" - displayName: Add conda to PATH - - script: | - conda update -n base -c defaults conda -y - conda create --yes --name pdal -c conda-forge pdal pytest numpy compilers scikit-build - displayName: 'Dependencies' - - script: | - source activate pdal - echo $CONDA_PREFIX - echo $CONDA_DEFAULT_ENV - pip install . - pdal --drivers - displayName: 'System install' - - script: | - source activate pdal - pip install -e . - SKPATH=$(python -c "import skbuild; print (skbuild.constants.SKBUILD_DIR())")/cmake-build - export PDAL_DRIVER_PATH=$SKPATH - $SKPATH/pdal_filters_python_test - $SKPATH/pdal_io_numpy_test - py.test - displayName: 'Local test' diff --git a/scripts/azp/osx.yml b/scripts/azp/osx.yml deleted file mode 100644 index ac7dcda6..00000000 --- a/scripts/azp/osx.yml +++ /dev/null @@ -1,46 +0,0 @@ -# -*- mode: yaml -*- - -jobs: -- job: osx - pool: - vmImage: macOS-10.14 - timeoutInMinutes: 360 - steps: - - script: | - echo "Removing homebrew from Azure to avoid conflicts." - curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew - chmod +x ~/uninstall_homebrew - ~/uninstall_homebrew -fq - rm ~/uninstall_homebrew - displayName: Remove homebrew - - bash: | - echo "##vso[task.prependpath]$CONDA/bin" - sudo chown -R $USER $CONDA - displayName: Add conda to PATH - - - script: | - ECHO ON - source activate base - conda update -n base -c defaults conda -y - conda create --yes --quiet --name pdal - displayName: Create conda environment - - - script: | - ECHO ON - source activate pdal - conda install --yes --quiet --name pdal -c conda-forge scikit-build pdal pytest numpy conda-forge-ci-setup=2 -y - displayName: Install PDAL - - - script: | - source activate pdal - pip install -e . - pytest - SKPATH=$(python -c "import skbuild; print (skbuild.constants.SKBUILD_DIR())")/cmake-build - export PDAL_DRIVER_PATH=$SKPATH - $SKPATH/pdal_filters_python_test - $SKPATH/pdal_io_numpy_test - pdal --version - pdal --drivers - failOnStderr: false - displayName: 'Local test' - diff --git a/scripts/azp/win.yml b/scripts/azp/win.yml deleted file mode 100644 index 6fbe65de..00000000 --- a/scripts/azp/win.yml +++ /dev/null @@ -1,45 +0,0 @@ - -jobs: -- job: win - - pool: - vmImage: vs2017-win2016 - timeoutInMinutes: 360 - steps: - - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" - displayName: Add conda to PATH - - script: | - rmdir C:\strawberry /s /q - continueOnError: true - displayName: remove strawberryperl - - script: | - ECHO ON - call conda update -n base -c defaults conda - call conda create --yes --quiet --name pdal - displayName: Create conda environment - - - script: | - ECHO ON - call activate pdal - call conda config --set always_yes True --set show_channel_urls True - call conda install --yes --quiet --name pdal -c conda-forge scikit-build numpy python=3.8 ninja pdal pytest conda-build -y - displayName: Install PDAL - - script: | - ECHO ON - call activate pdal - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 - set CC=cl.exe - set CXX=cl.exe - pip install -e . - pytest - for /f %%i in ('python -c "import skbuild; print (skbuild.constants.SKBUILD_DIR())"') do set SKPATH=%%i - set PDAL_DRIVER_PATH=%SKPATH%\cmake-build - set PYTHONHOME=%CONDA_PREFIX% - %SKPATH%\cmake-build\pdal_filters_python_test.exe - %SKPATH%\cmake-build\pdal_io_numpy_test.exe - pdal --version - pdal --drivers - failOnStderr: false - displayName: 'Local test' - - diff --git a/scripts/travis/script.sh b/scripts/travis/script.sh deleted file mode 100755 index 84f837c6..00000000 --- a/scripts/travis/script.sh +++ /dev/null @@ -1,5 +0,0 @@ -apt-get update -y; apt-get install python3-pip -y -pip3 install numpy packaging cython -cd /pdal/ -python3 setup.py build -python3 setup.py test