Skip to content

Commit 196f54c

Browse files
committed
figure out where Swift lib paths are on CI
1 parent e93c785 commit 196f54c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/scripts/validate_sample.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ declare -r RESET='\033[0m'
1111
declare -r sampleDir="$1"
1212
declare -r CI_VALIDATE_SCRIPT='ci-validate.sh'
1313

14+
echo "Using Swift: $(which swift)"
15+
1416
echo ""
1517
echo ""
1618
echo "========================================================================"

Samples/SwiftAndJavaJarSampleLib/ci-validate.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ then
5454
elif [ "$(uname -s)" = 'Darwin' ]
5555
then
5656
SWIFT_LIB_PATHS=$(find "$(swiftly use --print-location)" | grep dylib$ | grep libswiftCore | grep macos | xargs dirname)
57+
if [ -n "${SWIFT_LIB_PATHS}" ]
58+
then
59+
# last resort; on CI we just search where we have swift libs
60+
SWIFT_LIB_PATHS=$(find / | grep dylib$ | grep libswiftCore | grep macos | xargs dirname)
61+
fi
5762
SWIFT_LIB_PATHS="${SWIFT_LIB_PATHS}:$(pwd)/$(find . | grep libMySwiftLibrary.dylib$ | sort | head -n1 | xargs dirname)"
63+
5864
fi
5965
echo "SWIFT_LIB_PATHS = ${SWIFT_LIB_PATHS}"
6066

0 commit comments

Comments
 (0)