vcpkg ci #28
Workflow file for this run
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: vcpkg | |
| on: | |
| pull_request: | |
| # Every time you make a push to your PR, it cancel immediately the previous checks, | |
| # and start a new one. The other runner will be available more quickly to your PR. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| triplet: x64-windows-release | |
| build_type: Release | |
| test_target: RUN_TESTS | |
| binary_cache: C:\Users\runneradmin\AppData\Local\vcpkg\archives | |
| vcpkg_info: C:/vcpkg/installed/vcpkg/info/* | |
| python: python | |
| - os: ubuntu-latest | |
| triplet: x64-linux | |
| build_type: Release | |
| test_target: test | |
| binary_cache: /home/runner/.cache/vcpkg/archives | |
| vcpkg_info: /usr/local/share/vcpkg/installed/vcpkg/info/* | |
| cxxflags: -Werror=nonnull | |
| python: python3 | |
| - os: macos-latest | |
| triplet: arm64-osx | |
| build_type: Release | |
| test_target: test | |
| binary_cache: /Users/runner/.cache/vcpkg/archives | |
| vcpkg_info: /usr/local/share/vcpkg/installed/vcpkg/info/* | |
| python: python3 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Restore cache dependencies | |
| uses: actions/cache/restore@v3 | |
| with: | |
| path: ${{ matrix.binary_cache }} | |
| key: ${{ matrix.os }} | |
| restore-keys: ${{ matrix.os }} | |
| - name: Setup msbuild | |
| if: runner.os == 'Windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| toolset: 14.40 | |
| - name: cl version | |
| if: runner.os == 'Windows' | |
| shell: cmd | |
| run: cl | |
| - name: Install vcpkg python dependencies | |
| if: runner.os == 'Linux' | |
| shell: bash | |
| run: | | |
| sudo apt-get install autoconf automake autoconf-archive | |
| - name: Install vcpkg python dependencies | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: | | |
| brew install autoconf automake autoconf-archive | |
| - name: "Install dependencies" | |
| run: > | |
| vcpkg x-set-installed --triplet ${{ matrix.triplet }} | |
| boost-assign | |
| boost-bimap | |
| boost-chrono | |
| boost-date-time | |
| boost-filesystem | |
| boost-format | |
| boost-graph | |
| boost-math | |
| boost-program-options | |
| boost-regex | |
| boost-serialization | |
| boost-system | |
| boost-thread | |
| boost-timer | |
| eigen3 | |
| metis | |
| tbb | |
| pybind11 | |
| geographiclib | |
| - name: copy files for hash | |
| shell: bash | |
| run: | | |
| mkdir -p vcpkg-info | |
| cp ${{ matrix.vcpkg_info }} vcpkg-info | |
| - name: Save cache dependencies | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ${{ matrix.binary_cache }} | |
| key: ${{ matrix.os }}-${{ hashFiles('vcpkg-info/*') }} | |
| - name: Install python packages | |
| shell: bash | |
| run: | | |
| $VCPKG_INSTALLATION_ROOT/installed/${{ matrix.triplet }}/tools/python3/${{ matrix.python }} -m ensurepip --upgrade | |
| $VCPKG_INSTALLATION_ROOT/installed/${{ matrix.triplet }}/tools/python3/${{ matrix.python }} -m pip install -r python/dev_requirements.txt | |
| - name: cmake config | |
| if: success() | |
| shell: bash | |
| run: | | |
| export CL=-openmp:experimental | |
| # This is due an error in linux: | |
| # error: argument 2 null where non-null expected [-Werror=nonnull] | |
| # return __builtin_memcmp(__first1, __first2, sizeof(_Tp) * __num); | |
| # Remove `-DCMAKE_CXX_FLAGS=${{ matrix.cxxflags }}` when the compilation error solved | |
| cmake . -B build -G Ninja \ | |
| -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake \ | |
| -DVCPKG_INSTALLED_DIR=$VCPKG_INSTALLATION_ROOT/installed \ | |
| -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DGTSAM_BUILD_EXAMPLES_ALWAYS=ON \ | |
| -DGTSAM_ROT3_EXPMAP=ON \ | |
| -DGTSAM_POSE3_EXPMAP=ON \ | |
| -DGTSAM_BUILD_PYTHON=ON \ | |
| -DGTSAM_BUILD_TESTS=ON \ | |
| -DGTSAM_BUILD_UNSTABLE=OFF \ | |
| -DGTSAM_USE_SYSTEM_EIGEN=ON \ | |
| -DGTSAM_USE_SYSTEM_METIS=ON \ | |
| -DGTSAM_SUPPORT_NESTED_DISSECTION=ON \ | |
| -DCMAKE_CXX_FLAGS=${{ matrix.cxxflags }} | |
| - name: cmake build | |
| shell: bash | |
| run: | | |
| cmake --build build --config Release | |
| - name: Run Python tests | |
| shell: bash | |
| run: | | |
| cmake --build build --target python-install | |
| cmake --build build --target python-test | |
| - name: Run tests | |
| shell: bash | |
| run: | | |
| cmake --build build --target check |