Skip to content

Commit 2d8f21c

Browse files
committed
can we make it more sane by running the whole thing in the container?
1 parent a561251 commit 2d8f21c

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
CXXFLAGS: >-
3535
-Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls -Wno-unknown-warning-option
3636
CLANG_TIDY_ARGS: --fix --fix-errors --format-style=file
37-
DOCKER_IMAGE: moveit/moveit2:${{ matrix.env.IMAGE }}
3837
UPSTREAM_WORKSPACE: >
3938
moveit2.repos
4039
$(f="moveit2_$(sed 's/-.*$//' <<< "${{ matrix.env.IMAGE }}").repos"; test -r $f && echo $f)
@@ -71,21 +70,8 @@ jobs:
7170

7271
name: ${{ matrix.env.IMAGE }}${{ matrix.env.CCOV && ' + ccov' || ''}}${{ matrix.env.IKFAST_TEST && ' + ikfast' || ''}}${{ matrix.env.CLANG_TIDY && (github.event_name != 'workflow_dispatch' && ' + clang-tidy (delta)' || ' + clang-tidy (all)') || '' }}
7372
runs-on: ubuntu-latest
73+
container: moveit/moveit2:${{ matrix.env.IMAGE }}
7474
steps:
75-
- name: "Free up disk space"
76-
if: matrix.env.CCOV
77-
run: |
78-
sudo apt-get -qq purge "ghc*"
79-
sudo apt-get clean
80-
# cleanup docker images not used by us
81-
docker system prune -af
82-
# shift ccache folder to /mnt on a separate disk
83-
sudo mkdir /mnt/ccache
84-
mkdir ${{ env.CCACHE_DIR }}
85-
sudo mount --bind ${{ env.CCACHE_DIR }} /mnt/ccache
86-
# free up a lot of stuff from /usr/local
87-
sudo rm -rf /usr/local
88-
df -h
8975
- uses: actions/checkout@v6
9076
# NOTE: Testspace is temporarily disabled and needs to be installed for the MoveIt org
9177
# See: https://github.com/moveit/moveit2/issues/2852
@@ -145,7 +131,10 @@ jobs:
145131
- id: ici
146132
name: Run industrial_ci
147133
uses: ros-industrial/industrial_ci@master
148-
env: ${{ matrix.env }}
134+
env:
135+
CCOV: ${{ matrix.env.CCOV }}
136+
CLANG_TIDY: ${{ matrix.env.CLANG_TIDY }}
137+
ROS_DISTRO: ${{ matrix.env.ROS_DISTRO }}
149138
# NOTE: Testspace is temporarily disabled and needs to be installed for the MoveIt org
150139
# See: https://github.com/moveit/moveit2/issues/2852
151140
# - name: Push result to Testspace
@@ -163,7 +152,6 @@ jobs:
163152
uses: rhaschke/lcov-action@main
164153
if: always() && matrix.env.CCOV && steps.ici.outputs.target_test_results == '0'
165154
with:
166-
docker: $DOCKER_IMAGE
167155
workdir: ${{ env.BASEDIR }}/target_ws
168156
lcov_capture_args: --ignore-errors=gcov,gcov,mismatch,mismatch,negative,negative
169157
ignore: '"*/target_ws/build/*" "*/target_ws/install/*" "*/test/*"'
@@ -178,10 +166,6 @@ jobs:
178166
with:
179167
name: clang-tidy
180168
path: ${{ env.BASEDIR }}/target_ws/src/$(basename $(pwd))
181-
- name: chown the target_ws because it came out of root-owned Docker container filesystem
182-
run: sudo chown -R "$USER:$USER" ${{ env.BASEDIR }}/target_ws
183-
- name: move sonar-project.properties from checkout into ICI output
184-
run: mv sonar-project.properties ${{ env.BASEDIR }}/target_ws
185169
- name: SonarQube Scan
186170
# Don't run if SONAR_TOKEN is not set (i.e. PR job from a fork)
187171
if: matrix.env.CCOV && steps.ici.outputs.target_test_results == '0' && env.SONAR_TOKEN != ''

0 commit comments

Comments
 (0)