From 15ab8387a0f855da8263ccbd3594d1217ccfd3a6 Mon Sep 17 00:00:00 2001 From: Nils Loose Date: Tue, 20 Oct 2026 13:15:05 +0000 Subject: [PATCH] Fix SV-COMP packaging of the single-file jar artifact; report the package version actions/upload-artifact drops the directories of a single-file upload, so the package job finds symbolic-executor.jar at the artifact root. run-swat.sh -v now prints the version from BUILD_INFO.txt instead of the constant "1". Co-Authored-By: Claude Opus 5.5 --- scripts/package-svcomp.sh | 4 +++- scripts/svcomp-package/run-swat.sh | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/package-svcomp.sh b/scripts/package-svcomp.sh index fc53cf1b..45da708a 100755 --- a/scripts/package-svcomp.sh +++ b/scripts/package-svcomp.sh @@ -8,7 +8,8 @@ set -euo pipefail # Set SWAT_SVCOMP_ARTIFACT_DIR only if those generated files live somewhere # else. The artifact root must contain: # -# - symbolic-executor/lib/symbolic-executor.jar +# - symbolic-executor/lib/symbolic-executor.jar, or symbolic-executor.jar at the +# root (actions/upload-artifact drops the directories of a single-file upload) # # Set SWAT_SVCOMP_PYTHON_DIR to the Python dependency directory produced by # scripts/build-svcomp-python-runtime.sh (it includes the witnesscreator @@ -127,6 +128,7 @@ install -m 0644 targets/sv-comp/sv-comp.cfg "$PACKAGE_DIR/sv-comp.cfg" EXECUTOR_JAR="$(first_artifact_file \ symbolic-executor/lib/symbolic-executor.jar \ + symbolic-executor.jar \ symbolic-executor/build/libs/symbolic-executor-all.jar)" copy_artifact_file "$EXECUTOR_JAR" "$PACKAGE_DIR/symbolic-executor/lib/symbolic-executor.jar" diff --git a/scripts/svcomp-package/run-swat.sh b/scripts/svcomp-package/run-swat.sh index a10bb7b5..8a454e19 100755 --- a/scripts/svcomp-package/run-swat.sh +++ b/scripts/svcomp-package/run-swat.sh @@ -7,6 +7,13 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" for arg in "$@" do if [ "$arg" == "-v" ] || [ "$arg" == "--version" ]; then + # The package version (e.g. svcomp27-rc1) from BUILD_INFO.txt, written by + # scripts/package-svcomp.sh. + version="$(sed -n 's/^version=//p' "$SCRIPT_DIR/BUILD_INFO.txt" 2>/dev/null)" + if [ -n "$version" ]; then + echo "$version" + exit 0 + fi exec java -cp "$SCRIPT_DIR/symbolic-executor/lib/symbolic-executor.jar" de.uzl.its.swat.Version fi done