diff --git a/.github/workflows/reusable-mac-ci.yml b/.github/workflows/reusable-mac-ci.yml index 02ee5916ad7..5ca71362e78 100644 --- a/.github/workflows/reusable-mac-ci.yml +++ b/.github/workflows/reusable-mac-ci.yml @@ -86,7 +86,18 @@ jobs: - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - # TODO(eduponz): Update known hosts file for DNS resolver testing. NOTE: The runner cannot modify /etc/hosts. + - name: Set up hosts file for DNS testing + run: | + sudo echo "" | sudo tee -a /etc/hosts + sudo echo "127.0.0.1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "::1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "154.56.134.194 www.eprosima.com.test" | sudo tee -a /etc/hosts + sudo echo "216.58.215.164 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "2a00:1450:400e:803::2004 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.4 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.3 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts + # TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group, # which entails logout/login or rebooting the machine. This is not feasible in a CI environment. diff --git a/.github/workflows/reusable-sanitizers-ci.yml b/.github/workflows/reusable-sanitizers-ci.yml index ec267d7ff28..22294287af9 100644 --- a/.github/workflows/reusable-sanitizers-ci.yml +++ b/.github/workflows/reusable-sanitizers-ci.yml @@ -160,6 +160,18 @@ jobs: with: packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas + - name: Set up hosts file for DNS testing + run: | + sudo echo "" | sudo tee -a /etc/hosts + sudo echo "127.0.0.1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "::1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "154.56.134.194 www.eprosima.com.test" | sudo tee -a /etc/hosts + sudo echo "216.58.215.164 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "2a00:1450:400e:803::2004 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.4 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.3 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts + - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 @@ -363,6 +375,18 @@ jobs: destination_workspace: src skip_existing: 'true' + - name: Set up hosts file for DNS testing + run: | + sudo echo "" | sudo tee -a /etc/hosts + sudo echo "127.0.0.1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "::1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "154.56.134.194 www.eprosima.com.test" | sudo tee -a /etc/hosts + sudo echo "216.58.215.164 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "2a00:1450:400e:803::2004 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.4 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.3 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts + - name: Fetch Fast DDS CI dependencies uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 with: diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index 22a7d21b0b5..9f603cb17e1 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -85,7 +85,18 @@ jobs: - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - # TODO(eduponz): Update known hosts file for DNS resolver testing. NOTE: The runner cannot modify /etc/hosts. + - name: Set up hosts file for DNS testing + run: | + sudo echo "" | sudo tee -a /etc/hosts + sudo echo "127.0.0.1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "::1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "154.56.134.194 www.eprosima.com.test" | sudo tee -a /etc/hosts + sudo echo "216.58.215.164 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "2a00:1450:400e:803::2004 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.4 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.3 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts + # TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group, # which entails logout/login or rebooting the machine. This is not feasible in a CI environment.