Bloc Clino/Cam , Ok with compensation #401
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build MMVII Linux/Windows | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| jobs: | |
| build_linux: | |
| if: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Qt and clang | |
| run: | | |
| sudo apt update | |
| sudo apt install qtbase5-dev clang-18 libomp-18-dev | |
| - name: Install libproj and libgdal | |
| run: sudo apt install libproj-dev proj-data libgdal-dev | |
| - name: Install pdflatex | |
| run: sudo apt install texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-science | |
| - name: Build MMVII documentation | |
| run: make -C MMVII/Doc a4 | |
| - name: Remove previous MMVII documentation release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| continue-on-error: true | |
| run: gh release delete MMVII_Documentation -y --cleanup-tag | |
| - name: Upload MMVII documentaion | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: 'MMVII Documentation - Latest' | |
| tag_name: MMVII_Documentation | |
| make_latest: false | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| files: MMVII/Doc/Doc2007_a4.pdf | |
| - name: Configure CMake for mm3d | |
| run: cmake -B build -DWITH_CCACHE=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_QT5=ON | |
| - name: Cache mm3d build | |
| id: cache-mm3d-linux | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| lib/libelise.a | |
| lib/libANN.a | |
| bin/mm3d | |
| key: ${{ runner.os }}-build-mm3d-${{ hashFiles('src/**/*.cpp','src/**/*.h','include/**/*.h','!src/util/GIT_defines.cpp') }} | |
| - if: ${{ steps.cache-mm3d-linux.outputs.cache-hit != 'true' }} | |
| name: Build elise.lib and mm3d | |
| run: make -C build install -j 4 -k | |
| - name: Configure CMake for MMVII | |
| run: cmake -S MMVII -B MMVII/build -DCMAKE_BUILD_TYPE=Release | |
| env: | |
| CXX: clang++-18 | |
| CC: clang-18 | |
| - name: Build MMVII | |
| run: cmake --build MMVII/build -j 4 --target full -- -k | |
| - name: Run MMVII Tests | |
| working-directory: ./MMVII/bin | |
| run: ./MMVII Bench 1 | |
| - name: Remove previous MMVII ApiPy release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| continue-on-error: true | |
| run: gh release delete MMVII_APIPY -y --cleanup-tag | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-build-artifacts | |
| path: | | |
| MMVII/bin/libP2007.a | |
| MMVII/bin/MMVII | |
| build_win: | |
| if: true | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Miniconda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| - name: Install GDAL,PROJ with miniconda | |
| run: conda install -c conda-forge -q -y proj gdal | |
| if: steps.cache-conda-gdal.outputs.cache-hit != 'true' | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| cache: true | |
| - name: Configure CMake for mm3d | |
| run: cmake -B build -DWITH_CCACHE=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_QT5=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}} | |
| - name: Cache mm3d build | |
| id: cache-mm3d-windows | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| lib/elise.lib | |
| lib/ANN.lib | |
| bin/* | |
| key: ${{ runner.os }}-build-mm3d-${{ hashFiles('src/**/*.cpp','src/**/*.h','include/**/*.h','!src/util/GIT_defines.cpp') }} | |
| - if: ${{ steps.cache-mm3d-windows.outputs.cache-hit != 'true' }} | |
| name: Build elise.lib and mm3d | |
| run: cmake --build build --config Release --target INSTALL -j 4 | |
| - name: Force save mm3d build cache | |
| uses: actions/cache/save@v3 | |
| if: always() | |
| with: | |
| path: | | |
| lib/elise.lib | |
| lib/ANN.lib | |
| bin/* | |
| key: ${{ runner.os }}-build-mm3d-${{ hashFiles('src/**/*.cpp','src/**/*.h','include/**/*.h','!src/util/GIT_defines.cpp') }} | |
| - name: Configure CMake for MMVII | |
| run: cmake -S MMVII -B MMVII/build -DCMAKE_PREFIX_PATH=C:/Miniconda/envs/test/Library | |
| - name: Build MMVII | |
| run: cmake --build MMVII/build --config Release -j 4 --target full | |
| - name: Run MMVII Tests | |
| working-directory: ./MMVII/bin | |
| run: ./MMVII Bench 1 | |
| - name: Package | |
| shell: bash | |
| run: | | |
| rm -fr MMVII/bin/Makefile* MMVII/bin/*.makefile MMVII/bin/MMVII-* MMVII/bin/P2007.lib MMVII/MMVII-TestDir/Tmp/ | |
| mkdir -p micmac/include micmac/MMVII | |
| cp -a bin/ binaire-aux/ micmac/ | |
| cp -a include/XML_MicMac include/XML_GEN/ include/qt micmac/include/ | |
| cp -a MMVII/MMVII-LocalParameters/ MMVII/MMVII-RessourceDir/ MMVII/MMVII-TestDir/ MMVII/bin/ MMVII/share/ micmac/MMVII/ | |
| mkdir -p micmac/bin/platforms micmac/bin/imageformats micmac/MMVII/bin/platforms | |
| MMVII_BINDIR=$(pwd)/micmac/MMVII/bin | |
| MM3D_BINDIR=$(pwd)/micmac/bin | |
| cp ${Qt5_Dir}/plugins/platforms/qwindows.dll ${MMVII_BINDIR}/platforms/ | |
| cd /C/Miniconda/envs/test/Library/bin/ | |
| # dll for PROJ, GDAL | |
| cp -a archive.dll blosc.dll charset.dll deflate.dll freexl.dll gdal.dll geos.dll geos_c.dll iconv.dll jpeg8.dll ${MMVII_BINDIR}/ | |
| cp -a brotlicommon.dll brotlidec.dll brotlienc.dll hwy.dll jxl.dll jxl_cms.dll jxl_threads.dll muparser.dll ${MMVII_BINDIR}/ | |
| cp -a Lerc.dll libbz2.dll libcrypto-3-x64.dll libcurl.dll libexpat.dll liblzma.dll libminizip.dll libpng16.dll libsharpyuv.dll ${MMVII_BINDIR}/ | |
| cp -a libssh2.dll libssl-3-x64.dll libwebp.dll libxml2.dll lz4.dll pcre2-8.dll proj_9.dll snappy.dll spatialite.dll ${MMVII_BINDIR}/ | |
| cp -a sqlite3.dll tiff.dll xerces-c*.dll zlib.dll zstd.dll ${MMVII_BINDIR}/ | |
| cd $Qt5_Dir/bin | |
| cp Qt5Core.dll Qt5Gui.dll Qt5Xml.dll Qt5OpenGL.dll Qt5Widgets.dll ${MM3D_BINDIR}/ | |
| cd $Qt5_Dir/plugins | |
| cp platforms/qwindows.dll ${MM3D_BINDIR}/platforms/ | |
| cp imageformats/*.dll ${MM3D_BINDIR}/imageformats/ | |
| cd $GITHUB_WORKSPACE | |
| - name: Create Zip | |
| run: 7z a mmvii_windows.zip micmac | |
| - name: Remove previous Windows MMVII build release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| continue-on-error: true | |
| run: gh release delete Windows_MMVII_build -y --cleanup-tag | |
| - name: Upload binaries to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: 'Windows MMVII build - Latest' | |
| tag_name: Windows_MMVII_build | |
| make_latest: false | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| files: mmvii_windows.zip | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-build-artifacts | |
| path: | | |
| MMVII/bin/libP2007.lib | |
| MMVII/bin/MMVII.exe | |
| build_apipy: | |
| needs: [build_linux] #[build_linux, build_win] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-latest] # [windows-latest, ubuntu-latest] | |
| python-version: ["3.12"] # ["3.10", "3.12"] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install deps | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt update | |
| sudo apt install clang-18 libomp-18-dev libproj-dev proj-data libgdal-dev python3-pip pybind11-dev doxygen clang-tools llvm-dev | |
| - name: Install Miniconda | |
| if: runner.os == 'Windows' | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| - name: Install Doxygen | |
| if: runner.os == 'Windows' | |
| uses: ssciwr/doxygen-install@v1 | |
| - name: Install GDAL,PROJ with miniconda | |
| if: runner.os == 'Windows' #&& steps.cache-conda-gdal.outputs.cache-hit != 'true' | |
| run: conda install -c conda-forge -q -y proj gdal pybind11 wheel setuptools pkg-config | |
| - name: Download linux build artifacts | |
| if: runner.os == 'Linux' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-build-artifacts | |
| path: MMVII/bin/ | |
| - name: Download win build artifacts | |
| if: runner.os == 'Windows' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-build-artifacts | |
| path: MMVII/bin/ | |
| - name: Display structure of downloaded files | |
| run: ls -R MMVII/bin/ | |
| - name: Check PKG_CONFIG_PATH and proj.pc | |
| if: runner.os == 'Windows' | |
| run: | | |
| echo $PKG_CONFIG_PATH | |
| dir "C:/Miniconda/envs/test/Library/lib/pkgconfig" | |
| pkg-config --list-all | |
| conda list proj | |
| - name: Add requirements | |
| if: runner.os == 'Linux' | |
| run: python -m pip install --upgrade wheel setuptools | |
| - name: Install cibuildwheel | |
| run: python -m pip install cibuildwheel==3.1.3 | |
| - name: Compile E57Format for Linux | |
| if: runner.os == 'Linux' | |
| run: | | |
| cmake -S MMVII -B MMVII/build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build MMVII/build -j 4 --target E57Format -- -k | |
| env: | |
| CXX: clang++-18 | |
| CC: clang-18 | |
| - name: Compile E57Format for Windows | |
| if: runner.os == 'Windows' | |
| run: | | |
| cmake -S MMVII -B MMVII/build -DCMAKE_PREFIX_PATH=C:/Miniconda/envs/test/Library | |
| cmake --build MMVII/build --config Release -j 4 --target E57Format | |
| - name: Build and install for Linux | |
| if: runner.os == 'Linux' | |
| working-directory: ./MMVII/apib11/ | |
| run: | | |
| # cibuildwheel --output-dir dist --platform linux # TODO: make it work | |
| pip wheel . --no-deps -w dist/ | |
| pip install dist/mmvii*.whl | |
| env: | |
| CXX: clang++-18 | |
| CC: clang-18 | |
| - name: Build for Windows | |
| if: runner.os == 'Windows' | |
| working-directory: ./MMVII/apib11/ | |
| run: | | |
| pip wheel . --no-deps -w dist/ | |
| env: | |
| CMAKE_PREFIX_PATH: "C:/Miniconda/envs/test/Library" | |
| PKG_CONFIG_PATH: "C:/Miniconda/envs/test/Library/lib/pkgconfig" | |
| - name: Install for Windows | |
| if: runner.os == 'Windows' | |
| working-directory: ./MMVII/apib11/ | |
| run: | | |
| pip install dist/mmvii*.whl | |
| env: | |
| CMAKE_PREFIX_PATH: "C:/Miniconda/envs/test/Library" | |
| PKG_CONFIG_PATH: "C:/Miniconda/envs/test/Library/lib/pkgconfig" | |
| - name: Test | |
| continue-on-error: true | |
| working-directory: ./MMVII/apib11/examples | |
| run: python ex_test.py | |
| - name: Upload MMVII apipy | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: 'MMVII Python API - Latest' | |
| tag_name: MMVII_APIPY | |
| make_latest: false | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| files: MMVII/apib11/dist/*.whl | |