|
| 1 | +name: Continuous Integration |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - develop |
| 8 | + # Skip jobs when only documentation files are changed |
| 9 | + paths-ignore: |
| 10 | + - '**.md' |
| 11 | + - '**.rst' |
| 12 | + - 'docs/**' |
| 13 | + pull_request: |
| 14 | + paths-ignore: |
| 15 | + - '**.md' |
| 16 | + - '**.rst' |
| 17 | + - 'docs/**' |
| 18 | + |
| 19 | +jobs: |
| 20 | + build: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + strategy: |
| 23 | + matrix: |
| 24 | + container: ["alicevision/popsift-deps:cuda10.2-ubuntu18.04", "alicevision/popsift-deps:cuda11.8.0-ubuntu20.04", "alicevision/popsift-deps:cuda12.1.0-ubuntu22.04"] |
| 25 | + build_tpe: ["Release", "Debug"] |
| 26 | + exclude: |
| 27 | + # excludes debug on this one as it has a segmentation fault during the compilation (!) |
| 28 | + - container: "alicevision/popsift-deps:cuda12.1.0-ubuntu22.04" |
| 29 | + build_tpe: "Debug" |
| 30 | + |
| 31 | + container: |
| 32 | + image: ${{ matrix.container }} |
| 33 | + |
| 34 | + env: |
| 35 | + DEPS_INSTALL_DIR: /opt/ |
| 36 | + BUILD_TYPE: ${{ matrix.build_tpe }} |
| 37 | + CTEST_OUTPUT_ON_FAILURE: 1 |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v2 |
| 40 | + |
| 41 | + - name: Prepare File Tree |
| 42 | + run: | |
| 43 | + mkdir ./build |
| 44 | + mkdir ./build_as_3rdparty |
| 45 | + mkdir ../popsift_install |
| 46 | +
|
| 47 | + - name: Configure CMake |
| 48 | + working-directory: ./build |
| 49 | + run: | |
| 50 | + cmake .. \ |
| 51 | + -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ |
| 52 | + -DBUILD_SHARED_LIBS:BOOL=ON \ |
| 53 | + -DCMAKE_PREFIX_PATH="${DEPS_INSTALL_DIR}" \ |
| 54 | + -DPopSift_BUILD_DOCS:BOOL=OFF \ |
| 55 | + -DCMAKE_INSTALL_PREFIX:PATH=$PWD/../../popsift_install |
| 56 | +
|
| 57 | + - name: Build |
| 58 | + working-directory: ./build |
| 59 | + run: | |
| 60 | + make -j$(nproc) install |
| 61 | +
|
| 62 | + - name: Build As Third Party |
| 63 | + working-directory: ./build_as_3rdparty |
| 64 | + run: | |
| 65 | + cmake ../src/application \ |
| 66 | + -DBUILD_SHARED_LIBS:BOOL=ON \ |
| 67 | + -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ |
| 68 | + -DCMAKE_PREFIX_PATH:PATH="$PWD/../../popsift_install;${DEPS_INSTALL_DIR}" |
| 69 | + make -j$(nproc) |
0 commit comments