Skip to content

Commit 8168a5c

Browse files
sebstoSebastien Stormacq
andauthored
fix ci : check libFoundation on HelloWorld example (#593)
Fix errors in the CI The script that checks the presence of `libFoundation` in the binary started to fail. I can't think about a recent change that would cause this. This PR change the test script to use the `HelloWorld` example instead of `APIGAtewayV2` Co-authored-by: Sebastien Stormacq <[email protected]>
1 parent dee6352 commit 8168a5c

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

.github/workflows/scripts/check-link-foundation.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ log() { printf -- "** %s\n" "$*" >&2; }
1717
error() { printf -- "** ERROR: %s\n" "$*" >&2; }
1818
fatal() { error "$@"; exit 1; }
1919

20-
EXAMPLE=APIGatewayV2
20+
EXAMPLE=HelloWorld
2121
OUTPUT_DIR=.build/release
22-
OUTPUT_FILE=${OUTPUT_DIR}/APIGatewayLambda
22+
OUTPUT_FILE=${OUTPUT_DIR}/MyLambda
2323
LIBS_TO_CHECK="libFoundation.so libFoundationInternationalization.so lib_FoundationICU.so"
2424

2525
pushd Examples/${EXAMPLE} || fatal "Failed to change directory to Examples/${EXAMPLE}."
2626

2727
# recompile the example without the --static-swift-stdlib flag
28-
LAMBDA_USE_LOCAL_DEPS=../.. swift build -c release -Xlinker -s || fatal "Failed to build the example."
28+
LAMBDA_USE_LOCAL_DEPS=../.. swift build -c release || fatal "Failed to build the example."
2929

3030
# check if the binary exists
3131
if [ ! -f "${OUTPUT_FILE}" ]; then
32-
error "${OUTPUT_FILE} does not exist."
32+
fatal "${OUTPUT_FILE} does not exist."
3333
fi
3434

3535
# Checking for Foundation or ICU dependencies
36-
echo "Checking for Foundation or ICU dependencies in ${OUTPUT_DIR}/${OUTPUT_FILE}."
36+
echo "Checking for Foundation or ICU dependencies in ${OUTPUT_FILE}."
3737
LIBRARIES=$(ldd ${OUTPUT_FILE} | awk '{print $1}')
3838
for LIB in ${LIBS_TO_CHECK}; do
3939
echo -n "Checking for ${LIB}... "

Sources/AWSLambdaRuntime/LambdaRuntime.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ import Logging
1616
import NIOCore
1717
import Synchronization
1818

19-
#if canImport(FoundationEssentials)
20-
import FoundationEssentials
21-
#else
22-
import Foundation
23-
#endif
24-
2519
// This is our guardian to ensure only one LambdaRuntime is running at the time
2620
// We use an Atomic here to ensure thread safety
2721
@available(LambdaSwift 2.0, *)

0 commit comments

Comments
 (0)