Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: disable internet access during the build step #241

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions colcon-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,17 @@ runs:
- name: Build
run: |
. /opt/ros/${{ inputs.rosdistro }}/setup.sh
# Cannot use unshare inside a Docker container, so we just disable
# DNS lookups instead.
cat /etc/nsswitch.conf
sed -e 's#hosts:\(.*\)dns\(.*\)#hosts:\1\2#g' -i.bak /etc/nsswitch.conf
cat /etc/nsswitch.conf
colcon build --event-handlers console_cohesion+ \
--packages-above-and-dependencies ${{ inputs.target-packages }} \
--cmake-args -DCMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} \
--mixin coverage-gcc coverage-pytest compile-commands
mv /etc/nsswitch.conf.bak /etc/nsswitch.conf
cat /etc/nsswitch.conf
shell: bash

- name: Cache build artifacts
Expand Down