Nixpkg support for ConnectModules branch #1574
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 with Docker | |
| # This workflow checks the build-and-install script on base docker images | |
| on: | |
| push: | |
| paths-ignore: | |
| # Changes to those files don't mandate running CI | |
| - ".gitlab-ci.yml" | |
| - ".jrl-ci" | |
| - ".github/workflows/package.yml" | |
| - "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: | |
| # os: ["debian_bullseye", "ubuntu_22.04"] | |
| os: ["ubuntu_22.04"] | |
| runs-on: ubuntu-22.04 | |
| 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" | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Clone superbuild | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| repository: mc-rtc/mc-rtc-superbuild | |
| path: mc-rtc-superbuild | |
| - name: Free-up space | |
| run: | | |
| sudo rm -rf /opt/hostedtoolcache/CodeQL | |
| sudo rm -rf /usr/local/lib/android | |
| - name: Build within Docker | |
| run: | | |
| echo "::group::Setup Dockerfile" | |
| mkdir -p /tmp/mc-rtc-docker | |
| cp -r `pwd` /tmp/mc-rtc-docker/source | |
| cp .github/workflows/docker/Dockerfile.${{ matrix.os }} /tmp/mc-rtc-docker/Dockerfile | |
| cd /tmp/mc-rtc-docker | |
| echo "::endgroup::" | |
| echo "::group::Dockerfile used to build mc_rtc" | |
| cat Dockerfile | |
| echo "::endgroup::" | |
| echo "::group::Build base image" | |
| docker build -t mc-rtc-ci-${{matrix.os}} . | |
| echo "::endgroup::" | |
| echo "::group::Build in docker" | |
| WITH_ROS_SUPPORT=ON | |
| if [ ${{ matrix.os }} == "debian_bullseye" ]; then | |
| WITH_ROS_SUPPORT=OFF | |
| fi | |
| echo "WITH_ROS_SUPPORT=${WITH_ROS_SUPPORT}" | |
| docker run mc-rtc-ci-${{matrix.os}} /bin/bash -c "cd /source/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)' && mkdir -p ${TMPDIR-/tmp}/build-mc-rtc && cmake -S /source/mc-rtc-superbuild -B ${TMPDIR-/tmp}/build-mc-rtc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVERBOSE_TEST_OUTPUT=ON -DWITH_ROS_SUPPORT=${WITH_ROS_SUPPORT} -DMC_RTC_SUPERBUILD_OVERRIDE_mc_rtc_GITHUB=${GITHUB_REPO_TRIGGER} -DMC_RTC_SUPERBUILD_OVERRIDE_mc_rtc_GIT_TAG=origin/${GITHUB_BRANCH} && cmake --build ${TMPDIR-/tmp}/build-mc-rtc --config RelWithDebInfo" | |
| echo "::endgroup::" | |
| - 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 }}* failed on ${{ github.ref }} |