Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* @oracle/graalvm-reachability-maintainer
tests/tck-build-logic/src/main/resources/allowed-docker-images/* @matneu @matteoldani
library-and-framework-list.json @fniephaus
.github/* @vjovanov
168 changes: 0 additions & 168 deletions .github/workflows/check-new-library-versions.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/disable-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# Copyright and related rights waived via CC0
#
# You should have received a copy of the CC0 legalcode along with this
# work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

# Purpose:
# Make Docker unable to access the network during tests by:
# 1) Enabling the discard service on localhost:9 (TCP/UDP) via inetd to accept and immediately discard traffic.
# 2) Pointing Docker's HTTP(S) proxy environment variables to http(s)://localhost:9 using a systemd drop-in.
#
# Why:
# - Tests may only use pre-pulled/allowed Docker images. This prevents Docker from downloading anything else.
# - Using the discard service avoids long TCP connection timeouts: the local port accepts connections and discards
# data quickly, causing Docker's proxy connections to fail fast.
#
# Notes:
# - This script is designed for GitHub Actions Ubuntu runners with sudo.
# - It is idempotent: re-running it won't duplicate config lines or unnecessarily restart Docker.

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

sudo apt-get install openbsd-inetd
sudo bash -c "cat ${SCRIPT_DIR}/discard-port.conf >> /etc/inetd.conf"
sudo systemctl start inetd
sudo mkdir /etc/systemd/system/docker.service.d
sudo bash -c "cat ${SCRIPT_DIR}/dockerd.service > /etc/systemd/system/docker.service.d/http-proxy.conf"
sudo systemctl daemon-reload
sudo systemctl restart docker
echo "Docker outbound network effectively disabled via proxy=http(s)://localhost:9 backed by inetd discard service."
80 changes: 80 additions & 0 deletions .github/workflows/run-consecutive-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/bin/bash

# Copyright and related rights waived via CC0
#
# You should have received a copy of the CC0 legalcode along with this
# work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

set -u

if [ $# -ne 2 ]; then
echo "Usage: $0 <test-coordinates> <versions-json-array>"
exit 1
fi

# Input parameters
TEST_COORDINATES="$1"
VERSIONS_JSON="$2"

# Remove surrounding single quotes if present (when called from workflow)
VERSIONS_JSON="${VERSIONS_JSON#"${VERSIONS_JSON%%[!\']*}"}"
VERSIONS_JSON="${VERSIONS_JSON%"${VERSIONS_JSON##*[!\']}"}"

# Parse versions with jq
readarray -t VERSIONS < <(echo "$VERSIONS_JSON" | jq -r '.[]')
export DELIMITER="========================================================================================"

run_multiple_attempts() {
local stage="$1"
local max_attempts="$2"
local gradle_command="$3"

echo "$DELIMITER"
echo " $TEST_COORDINATES:$VERSION stage $stage"
echo "$DELIMITER"

local attempt=0
local result=0

while [ $attempt -lt "$max_attempts" ]; do
local cmd_str="GVM_TCK_LV=\"$VERSION\" ./gradlew clean $gradle_command -Pcoordinates=\"$TEST_COORDINATES\""
if [ $attempt -gt 0 ]; then
echo "Re-running stage '$stage' (attempt $((attempt + 1))/$max_attempts)"
fi

eval "$cmd_str"
result=$?

if [ "$result" -eq 0 ]; then
return 0
fi

attempt=$((attempt + 1))
done

echo "FAILED [$stage][$VERSION][$cmd_str]"
return $result
}

for VERSION in "${VERSIONS[@]}"; do
echo "$DELIMITER"
echo " Testing $TEST_COORDINATES:$VERSION"
echo "$DELIMITER"


if ! run_multiple_attempts "javac compile" 1 javac; then
break
fi

if ! run_multiple_attempts "native-image build" 1 nativeTestCompile; then
break
fi

if ! run_multiple_attempts "native-image run" 3 test; then
break
fi

echo "PASSED:$VERSION"
done

exit 0
11 changes: 2 additions & 9 deletions .github/workflows/test-all-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,8 @@ jobs:
- name: "Pull allowed docker images"
run: |
./gradlew pullAllowedDockerImages --coordinates=${{ matrix.coordinates }}
- name: "Disable docker"
run: |
sudo apt-get install openbsd-inetd
sudo bash -c "cat ./.github/workflows/discard-port.conf >> /etc/inetd.conf"
sudo systemctl start inetd
sudo mkdir /etc/systemd/system/docker.service.d
sudo bash -c "cat ./.github/workflows/dockerd.service > /etc/systemd/system/docker.service.d/http-proxy.conf"
sudo systemctl daemon-reload
sudo systemctl restart docker
- name: "Disable docker networking"
run: bash ./.github/workflows/disable-docker.sh
- name: "🧪 Run '${{ matrix.coordinates }}' tests"
run: |
./gradlew test -Pcoordinates=${{ matrix.coordinates }}
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/test-changed-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,8 @@ jobs:
- name: "Pull allowed docker images"
run: |
./gradlew pullAllowedDockerImages --coordinates=${{ matrix.coordinates }}
- name: "Disable docker"
run: |
sudo apt-get install openbsd-inetd
sudo bash -c "cat ./.github/workflows/discard-port.conf >> /etc/inetd.conf"
sudo systemctl start inetd
sudo mkdir /etc/systemd/system/docker.service.d
sudo bash -c "cat ./.github/workflows/dockerd.service > /etc/systemd/system/docker.service.d/http-proxy.conf"
sudo systemctl daemon-reload
sudo systemctl restart docker
- name: "Disable docker networking"
run: bash ./.github/workflows/disable-docker.sh
- name: "🔎 Check metadata config files content"
run: |
./gradlew checkConfigFiles --coordinates=${{ matrix.coordinates }}
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/tryPushVersionsUpdate.sh

This file was deleted.

Loading
Loading