diff --git a/.github/workflows/build_test.yaml b/.github/workflows/build_test.yaml index c70da2311..cdcc6f839 100644 --- a/.github/workflows/build_test.yaml +++ b/.github/workflows/build_test.yaml @@ -15,7 +15,10 @@ jobs: || fromJSON('[ "ubuntu-latest" ]') }} timeout-minutes: 30 - container: ros:${{ matrix.rosdistro }} + container: ghcr.io/ibis-ssl/crane:base + defaults: + run: + working-directory: /home/developer/ibis_ws env: DEBIAN_FRONTEND: noninteractive strategy: @@ -25,16 +28,19 @@ jobs: steps: - name: suppress warnings run: | - git config --global --add safe.directory '*' + sudo git config --global --add safe.directory '*' - - name: Set PR fetch depth - run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" + - name: suppress warnings + run: | + whoami + pwd - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: ${{ env.PR_FETCH_DEPTH }} token: ${{ secrets.GITHUB_TOKEN }} + persist-credentials: false + path: src/crane - name: Setup Problem Matchers for GCC run: echo "::add-matcher::.github/matchers/gcc.json" diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index 74ecd232b..e3bf15f78 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -1,24 +1,34 @@ ARG ROS_DISTRO="jazzy" -FROM ros:$ROS_DISTRO +FROM ghcr.io/ibis-ssl/docker-ros2-images:$ROS_DISTRO ENV PATH $PATH:/usr/local/go/bin -ENV ROS_OVERLAY /root/ibis_ws +ENV ROS_OVERLAY /home/developer/ibis_ws WORKDIR $ROS_OVERLAY/src COPY . crane -RUN apt-get update && \ - apt-get install -y wget ccache python3-pip ffmpeg +RUN sudo apt-get update && \ + sudo apt-get install -y wget ccache python3-pip ffmpeg&& \ + wget https://launchpad.net/ubuntu/+archive/primary/+files/liborocos-bfl0.8_0.8.0-6_amd64.deb && \ + wget https://launchpad.net/ubuntu/+archive/primary/+files/liborocos-bfl-dev_0.8.0-6_amd64.deb && \ + sudo apt-get install -y ./liborocos-bfl0.8_0.8.0-6_amd64.deb && \ + sudo apt-get install -y ./liborocos-bfl-dev_0.8.0-6_amd64.deb && \ + sudo apt-get clean && \ + sudo rm -rf /var/lib/apt/lists/* + RUN wget https://go.dev/dl/go1.22.4.linux-amd64.tar.gz && \ - tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz && \ + sudo tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz && \ rm go1.22.4.linux-amd64.tar.gz RUN vcs import . < crane/dependency_${ROS_DISTRO}.repos -RUN rosdep update && \ - rosdep install -iy --from-paths . +RUN sudo apt-get update && \ + rosdep update && \ + rosdep install -iy --from-paths . && \ + sudo apt-get clean && \ + sudo rm -rf /var/lib/apt/lists/* # srcフォルダ内のフォルダを削除 -RUN find . -mindepth 1 -type d -exec rm -rf {} + +RUN find . -mindepth 1 -type d -exec sudo rm -rf {} + diff --git a/docker/ccache/Dockerfile b/docker/ccache/Dockerfile index 48733238e..be706b476 100644 --- a/docker/ccache/Dockerfile +++ b/docker/ccache/Dockerfile @@ -1,6 +1,6 @@ FROM ghcr.io/ibis-ssl/crane:base -ENV ROS_OVERLAY /root/ibis_ws +ENV ROS_OVERLAY /home/developer/ibis_ws WORKDIR $ROS_OVERLAY/src SHELL ["/bin/bash", "-c"] diff --git a/docker/prebuilt/Dockerfile b/docker/prebuilt/Dockerfile index 4ca9fd591..8ac5d7dc2 100644 --- a/docker/prebuilt/Dockerfile +++ b/docker/prebuilt/Dockerfile @@ -1,6 +1,6 @@ FROM ghcr.io/ibis-ssl/crane:base -ENV ROS_OVERLAY /root/ibis_ws +ENV ROS_OVERLAY /home/developer/ibis_ws WORKDIR $ROS_OVERLAY/src SHELL ["/bin/bash", "-c"] @@ -10,7 +10,7 @@ RUN vcs import . < crane/dependency_${ROS_DISTRO}.repos RUN rosdep update && \ rosdep install -iy --from-paths . && \ - rm -rf /var/lib/apt/lists/ + sudo rm -rf /var/lib/apt/lists/ RUN cd .. && \ source /opt/ros/${ROS_DISTRO}/setup.bash && \ diff --git a/docker/scenario/Dockerfile b/docker/scenario/Dockerfile index f0c90cf1d..ff30673be 100644 --- a/docker/scenario/Dockerfile +++ b/docker/scenario/Dockerfile @@ -1,6 +1,6 @@ FROM ghcr.io/ibis-ssl/crane:base -ENV ROS_OVERLAY /root/ibis_ws +ENV ROS_OVERLAY /home/developer/ibis_ws ENV PATH $PATH:/usr/local/go/bin WORKDIR $ROS_OVERLAY/src SHELL ["/bin/bash", "-c"] @@ -11,7 +11,7 @@ RUN vcs import . < crane/dependency_${ROS_DISTRO}.repos RUN rosdep update && \ rosdep install -iy --from-paths . && \ - rm -rf /var/lib/apt/lists/ + sudo rm -rf /var/lib/apt/lists/ RUN cd .. && \ source /opt/ros/${ROS_DISTRO}/setup.bash && \