Skip to content

Commit e51390d

Browse files
committed
Fix YAML folding compatibility and Linux arm64 OpenSSL linking
- Revert script block from |- (literal) back to > (folded) since the script was written for folded syntax - Replace if/else/fi block with single-line && chain for Linux arm64 OpenSSL, as multi-line if/else/fi gets mangled by YAML > folding
1 parent 3f44233 commit e51390d

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

.github/workflows/graphs/build-test-publish.act

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ nodes:
9696
x: 700
9797
y: 2310
9898
inputs:
99-
script: |-
99+
script: >
100100
if [[ -z "$CURRENT_OS" || -z "$ARCH" || -z "$OUTPUT_DIR" ]]; then
101101
echo "CURRENT_OS, ARCH and OUTPUT_DIR must be set."
102102
echo "CURRENT_OS: $CURRENT_OS"
@@ -139,14 +139,8 @@ nodes:
139139
linux)
140140
[[ "$ARCH" == "arm64" ]] && P4_LIB="$(pwd)/p4api/linux-aarch64/lib" || P4_LIB="$(pwd)/p4api/linux-x86_64/lib"
141141
P4_CGO_CPPFLAGS="-I$P4_INCLUDE"
142-
if [[ "$ARCH" == "arm64" ]]; then
143-
# Cross-compile needs static OpenSSL (no arm64 libssl-dev on x64 runner)
144-
SSL_LIB="$(pwd)/p4api/ssl-linux-${ARCH}/lib"
145-
bash setup-openssl.sh linux "$ARCH" "$SSL_LIB"
146-
P4_CGO_LDFLAGS="-L$P4_LIB -lp4api $SSL_LIB/libssl.a $SSL_LIB/libcrypto.a"
147-
else
148-
P4_CGO_LDFLAGS="-L$P4_LIB -lp4api -lssl -lcrypto"
149-
fi
142+
P4_CGO_LDFLAGS="-L$P4_LIB -lp4api -lssl -lcrypto"
143+
[[ "$ARCH" == "arm64" ]] && SSL_LIB="$(pwd)/p4api/ssl-linux-${ARCH}/lib" && bash setup-openssl.sh linux "$ARCH" "$SSL_LIB" && P4_CGO_LDFLAGS="-L$P4_LIB -lp4api $SSL_LIB/libssl.a $SSL_LIB/libcrypto.a"
150144
;;
151145
macos)
152146
P4_LIB="$(pwd)/p4api/macos/lib"

0 commit comments

Comments
 (0)