|
| 1 | +name: Windows Tests |
| 2 | + |
| 3 | +on: [pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + runs-on: windows-2016 |
| 8 | + strategy: |
| 9 | + max-parallel: 4 |
| 10 | + matrix: |
| 11 | + cgal_branch: [master] |
| 12 | + python_minor_version: [6, 7, 8] |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v1 |
| 16 | + with: |
| 17 | + fetch-depth: 1 |
| 18 | + |
| 19 | + - name: Set up Python 3.${{ matrix.python_minor_version }} |
| 20 | + uses: actions/setup-python@v1 |
| 21 | + with: |
| 22 | + python-version: 3.${{ matrix.python_minor_version }} |
| 23 | + |
| 24 | + |
| 25 | + - name: Set up JDK 1.8 |
| 26 | + uses: actions/setup-java@v1 |
| 27 | + with: |
| 28 | + java-version: 1.8 |
| 29 | + |
| 30 | + - name: Setup Conda |
| 31 | + run: | |
| 32 | + echo ::add-path::C:/Miniconda/condabin; |
| 33 | + echo ::add-path::C:/Miniconda/Library/bin; |
| 34 | +
|
| 35 | + - name: Install dependencies |
| 36 | + run: | |
| 37 | + conda install -y -c anaconda swig |
| 38 | + conda install -y -c conda-forge bzip2 |
| 39 | + conda install -y -c conda-forge zlib |
| 40 | + conda install -y -c conda-forge eigen |
| 41 | + conda install -y -c conda-forge mpfr |
| 42 | + conda install -y -c conda-forge mpir |
| 43 | + #conda install -y -c conda-forge cgal-cpp --only-deps |
| 44 | + python.exe -m pip install --upgrade pip |
| 45 | + pip install numpy |
| 46 | + pip install wheel |
| 47 | + pip install twine |
| 48 | +
|
| 49 | +
|
| 50 | + - name: Install CGAL and other dependencies |
| 51 | + run: | |
| 52 | + # ==- Install Boost -== |
| 53 | + #$Env:BOOST_ROOT_1_72_0/lib/*.dll C:\Miniconda\Library\bin |
| 54 | + echo ::add-path::$Env:BOOST_ROOT_1_72_0; |
| 55 | + echo ::add-path::$Env:pythonLocation; |
| 56 | +
|
| 57 | + # ==-Install CGAL-== |
| 58 | + echo "Cloning CGAL" |
| 59 | + git clone https://github.com/CGAL/cgal.git C:\cgal |
| 60 | + cd C:\cgal |
| 61 | + #git checkout releases/CGAL-5.0.2 |
| 62 | + echo "CGAL cloned" |
| 63 | +
|
| 64 | + # ==-Install LAStools-== |
| 65 | + git clone https://github.com/CGAL/LAStools.git C:\LAStools |
| 66 | + cd C:\LAStools |
| 67 | + mkdir build |
| 68 | + cd C:\LAStools\build |
| 69 | + cmake -G "Visual Studio 15 2017 Win64" C:\LAStools -DCMAKE_INSTALL_PREFIX=C:/Miniconda/Library |
| 70 | + cmake --build . --config Release |
| 71 | + cmake --install . --config Release |
| 72 | + #fix error in installation |
| 73 | + mv C:/Miniconda/Library/lib/las.dll C:/Miniconda/Library/bin/las.dll |
| 74 | + mv C:/Miniconda/Library/include/LASlib/* C:/Miniconda/Library/include/ |
| 75 | + mv C:/Miniconda/Library/include/LASzip/* C:/Miniconda/Library/include/ |
| 76 | +
|
| 77 | + # ==-Install TBB-== |
| 78 | + #$WebClient = New-Object System.Net.WebClient |
| 79 | + #$WebClient.DownloadFile("https://github.com/oneapi-src/oneTBB/releases/download/2019_U9/tbb2019_20191006oss_win.zip", "C:\tbb.zip") |
| 80 | + #Expand-Archive C:\tbb.zip C:\ |
| 81 | + #rm C:\tbb2019_20191006oss\bin\intel64\vc14\*_debug* |
| 82 | + #rm C:\tbb2019_20191006oss\lib\intel64\vc14\*_debug* |
| 83 | + #mv C:\tbb2019_20191006oss\bin\intel64\vc14\*.dll C:\Miniconda\Library\bin |
| 84 | + #cd C:\tbb2019_20191006oss |
| 85 | + #C:\tbb2019_20191006oss\bin\tbbvars.bat intel64 vs2015 |
| 86 | + #mv include\* C:\Miniconda\Library\include |
| 87 | + #mv lib\intel64\vc14\* C:\Miniconda\Library\lib |
| 88 | +
|
| 89 | +
|
| 90 | +
|
| 91 | + - name: Check Installation |
| 92 | + run: | |
| 93 | + echo "Path content : $Env:PATH" |
| 94 | + #echo "C:\boost_1_69_0\lib content" |
| 95 | + #ls C:\boost_1_69_0\lib |
| 96 | +
|
| 97 | +# - name: Build Tests |
| 98 | +# run: | |
| 99 | +# mkdir build |
| 100 | +# cd build |
| 101 | +# cmake -G "Visual Studio 15 2017" -T"v140" -A x64 -DBUILD_JAVA=ON -DBUILD_PYTHON=ON -DBUILD_TESTING=ON -DCMAKE_PREFIX_PATH="C:/Miniconda/Library" -DBUILD_SHARED_LIBS=ON .. |
| 102 | +# cmake --build . --config Release |
| 103 | +# cmake --build . --config Release --target tests |
| 104 | +# echo ::add-path::D:/a/cgal-swig-bindings/cgal-swig-bindings/build/lib/Release; |
| 105 | +# echo ::add-path::D:/a/cgal-swig-bindings/cgal-swig-bindings/build/build-java/lib/; |
| 106 | +# |
| 107 | +# - name: Run Tests |
| 108 | +# run: | |
| 109 | +# cd build |
| 110 | +# ctest -C Release -j8 -VV |
| 111 | + |
| 112 | + - name: Test Setup |
| 113 | + run: | |
| 114 | + python.exe setup.py bdist_wheel --cmake-prefix-path="C:/Miniconda/Library" --boost-root="$Env:BOOST_ROOT_1_72_0" --generator="Visual Studio 15 2017 Win64" --cgal-dir=C:/cgal --python-root="$pythonLocation" |
| 115 | + pip install dist/* |
| 116 | + shell: bash |
| 117 | + |
| 118 | + - name: Test Installation |
| 119 | + run: | |
| 120 | + set -e |
| 121 | + cd examples/python |
| 122 | + for py_file in *.py; do |
| 123 | + python.exe $py_file || exit 1 |
| 124 | + done |
| 125 | + shell: bash |
| 126 | + |
| 127 | +# - name: Upload wheel |
| 128 | +# uses: actions/upload-artifact@v1 |
| 129 | +# if: failure() |
| 130 | +# with: |
| 131 | +# name: wheel |
| 132 | +# path: dist/cgal-5.0.2-cp37-cp37m-win_amd64.whl |
0 commit comments