Nixpkg support for ConnectModules branch #1769
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: CI of mc_rtc | |
| on: | |
| push: | |
| paths-ignore: | |
| # Changes to those files don't mandate running CI | |
| - ".gitlab-ci.yml" | |
| - ".jrl-ci" | |
| - ".github/workflows/package.yml" | |
| - ".github/workflows/sources/*" | |
| - ".github/workflows/build-others.yml" | |
| - ".github/workflows/docker/*" | |
| - "debian/**" | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| env: | |
| # Branch that triggered this workflow | |
| GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }} | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # temporarely disable macos-latest | |
| # temporarely disable windows-latest | |
| os: [ubuntu-22.04] | |
| build-type: [Debug, RelWithDebInfo] | |
| compiler: [gcc, clang] | |
| exclude: | |
| # Only default compiler on macos-latest and windows-latest | |
| - os: macos-latest | |
| compiler: clang | |
| - os: windows-latest | |
| compiler: clang | |
| # FIXME Windows Debug CI fails: tests are failing | |
| - os: windows-latest | |
| build-type: Debug | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Dump github context | |
| run: echo "$GITHUB_CONTEXT" | |
| shell: bash | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| - name: Set repository name based on event (pull_request/push) | |
| shell: bash | |
| run: | | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| echo "GITHUB_REPO_TRIGGER=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV | |
| else | |
| echo "GITHUB_REPO_TRIGGER=${{ github.repository }}" >> $GITHUB_ENV | |
| fi | |
| - name: Use repository name | |
| shell: bash | |
| run: echo "The triggering repository is $GITHUB_REPO_TRIGGER" | |
| - name: Linux cleanup | |
| if: matrix.os == 'ubuntu-22.04' | |
| run: | | |
| set -e | |
| sudo rm -rf /opt/hostedtoolcache/CodeQL | |
| sudo rm -rf /usr/local/lib/android | |
| echo "LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}" >> $GITHUB_ENV | |
| - name: macOS cleanup | |
| if: startsWith(runner.os, 'macOS') | |
| run: | | |
| sudo rm '/usr/local/bin/2to3' | |
| - name: Clone superbuild | |
| if: matrix.os != 'windows-latest' | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| repository: mc-rtc/mc-rtc-superbuild | |
| path: mc-rtc-superbuild | |
| - name: "[superbuild] Bootstrap" | |
| if: matrix.os != 'windows-latest' | |
| shell: bash | |
| run: | | |
| cd ${GITHUB_WORKSPACE}/mc-rtc-superbuild | |
| ./utils/bootstrap-linux.sh | |
| git config --global user.email "arn.tanguy@gmail.com" | |
| git config --global user.name "Arnaud Tanguy (Automated CI update)" | |
| - name: "[superbuild] Install system dependencies" | |
| if: matrix.os != 'windows-latest' | |
| shell: bash | |
| run: | | |
| mkdir -p ${TMPDIR-/tmp}/build-mc-rtc | |
| cmake -S ${GITHUB_WORKSPACE}/mc-rtc-superbuild \ | |
| -B ${TMPDIR-/tmp}/build-mc-rtc \ | |
| -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
| -DINSTALL_DOCUMENTATION=ON \ | |
| -DMC_RTC_SUPERBUILD_OVERRIDE_mc_rtc_GITHUB=${GITHUB_REPO_TRIGGER} \ | |
| -DMC_RTC_SUPERBUILD_OVERRIDE_mc_rtc_GIT_TAG="origin/${GITHUB_BRANCH}" | |
| - name: "[superbuild] Install mc_rtc and related projects" | |
| if: matrix.os != 'windows-latest' | |
| shell: bash | |
| run: | | |
| cmake --build ${TMPDIR-/tmp}/build-mc-rtc --config RelWithDebInfo | |
| # mc-rtc-superbuild does not support windows yet, build manually | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: "[windows] Install dependencies" | |
| if: matrix.os == 'windows-latest' | |
| uses: jrl-umi3218/github-actions/install-dependencies@master | |
| with: | |
| compiler: ${{ matrix.compiler }} | |
| build-type: ${{ matrix.build-type }} | |
| windows: | | |
| pip: Cython coverage numpy pytest | |
| github: | |
| - path: eigenteam/eigen-git-mirror | |
| ref: 3.3.7 | |
| - path: leethomason/tinyxml2 | |
| ref: 7.1.0 | |
| - path: libgeos/geos | |
| ref: 3.8.1 | |
| options: -DBUILD_TESTING:BOOL=ON | |
| - path: nanomsg/nanomsg | |
| ref: 1.1.5 | |
| - path: jbeder/yaml-cpp | |
| ref: 29dcf92f870ee51cce8d68f8fcfe228942e8dfe1 | |
| options: -DYAML_CPP_BUILD_TESTS:BOOL=OFF | |
| windows-options: -DPYTHON_BINDING:BOOL=OFF | |
| github: | | |
| - path: gabime/spdlog | |
| ref: v1.6.1 | |
| options: -DSPDLOG_BUILD_EXAMPLE:BOOL=OFF -DSPDLOG_BUILD_SHARED:BOOL=ON | |
| - path: loco-3d/ndcurves | |
| ref: v1.1.5 | |
| options: -DBUILD_PYTHON_INTERFACE:BOOL=OFF | |
| - path: jrl-umi3218/Eigen3ToPython | |
| - path: jrl-umi3218/SpaceVecAlg | |
| - path: jrl-umi3218/sch-core | |
| options: -DCMAKE_CXX_STANDARD=11 | |
| - path: jrl-umi3218/eigen-qld | |
| - path: jrl-umi3218/sch-core-python | |
| - path: jrl-umi3218/RBDyn | |
| - path: jrl-umi3218/Tasks | |
| - path: jrl-umi3218/mc_rbdyn_urdf | |
| - path: jrl-umi3218/jvrc_description | |
| options: -DDISABLE_ROS:BOOL=ON | |
| - path: jrl-umi3218/mc_env_description | |
| options: -DDISABLE_ROS:BOOL=ON | |
| - path: jrl-umi3218/mc_int_obj_description | |
| options: -DDISABLE_ROS:BOOL=ON | |
| - path: jrl-umi3218/eigen-quadprog | |
| - path: jrl-umi3218/state-observation | |
| - path: jrl-umi3218/tvm | |
| options: -DTVM_WITH_ROBOT:BOOL=OFF | |
| - path: jrl-umi3218/mesh_sampling | |
| - name: "[windows] Build and test" | |
| if: matrix.os == 'windows-latest' && (matrix.build-type == 'RelWithDebInfo' || (matrix.build-type == 'Debug' && github.ref == 'refs/heads/master')) | |
| uses: jrl-umi3218/github-actions/build-cmake-project@master | |
| with: | |
| compiler: ${{ matrix.compiler }} | |
| build-type: ${{ matrix.build-type }} | |
| windows-options: -DPYTHON_BINDING:BOOL=OFF | |
| - name: Generate directory listing for schemas | |
| # Only run on master branch and for one configuration | |
| if: matrix.os == 'ubuntu-22.04' && matrix.build-type == 'RelWithDebInfo' && matrix.compiler == 'gcc' && github.ref == 'refs/heads/topic/SchemaCompletion' && github.repository == 'arntanguy/mc_rtc' | |
| uses: jayanta525/github-pages-directory-listing@v4.0.0 | |
| with: | |
| FOLDER: /tmp/build-mc-rtc/src/mc_rtc/doc/_data/schemas | |
| - name: Upload documentation | |
| # Only run on master branch and for one configuration | |
| if: matrix.os == 'ubuntu-22.04' && matrix.build-type == 'RelWithDebInfo' && matrix.compiler == 'gcc' && github.ref == 'refs/heads/master' && github.repository == 'jrl-umi3218/mc_rtc' | |
| run: | | |
| set -x | |
| pushd . | |
| cd ${TMPDIR-/tmp}/build-mc-rtc/src/mc_rtc/doc | |
| cp -r /usr/local/share/doc/mc_rtc/doxygen-html . | |
| find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/SpaceVecAlg/doxygen-html/@https://jrl-umi3218.github.io/SpaceVecAlg/doxygen/HEAD/@g' | |
| find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/RBDyn/doxygen-html/@https://jrl-umi3218.github.io/RBDyn/doxygen/HEAD/@g' | |
| find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/Tasks/doxygen-html/@https://jrl-umi3218.github.io/Tasks/doxygen/HEAD/@g' | |
| find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/sch-core/doxygen-html/@https://jrl-umi3218.github.io/sch-core/doxygen/HEAD/@g' | |
| find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/mc_rbdyn_urdf/doxygen-html/@https://jrl-umi3218.github.io/mc_rbdyn_urdf/doxygen/HEAD/@g' | |
| find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/TVM/doxygen-html/@https://jrl-umi3218.github.io/tvm/doxygen/HEAD/@g' | |
| sudo apt-get install -qq ruby-dev ruby-bundler libxml2-dev | |
| bundle install --path vendor | |
| git clone -b gh-pages https://gergondet:${{ secrets.GH_PAGES_TOKEN }}@github.com/jrl-umi3218/mc_rtc /tmp/website | |
| bundle exec jekyll build --trace -b /mc_rtc -d /tmp/website | |
| cp -r ${TMPDIR-/tmp}/build-mc-rtc/src/mc_rtc/doc/_data/schemas /tmp/website | |
| cd /tmp/website | |
| git add . | |
| git config --global user.email "arn.tanguy@gmail.com" | |
| git config --global user.name "Arnaud Tanguy (Automated CI update)" | |
| git commit -m "Website from commit ${GITHUB_SHA}" | |
| git push origin gh-pages | |
| popd | |
| - name: Slack Notification | |
| if: failure() | |
| uses: archive/github-actions-slack@master | |
| with: | |
| slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }} | |
| slack-channel: '#ci' | |
| slack-text: > | |
| [mc_rtc] Build *${{ matrix.os }}/${{ matrix.build-type }} (${{ matrix.compiler }})* failed on ${{ github.ref }} |