7171 x: -3030
7272 y: 4770
7373 inputs:
74- install: mingw-w64-ucrt- x86_64-gcc
74+ install: mingw-w64-x86_64-gcc mingw-w64-x86_64-openssl
7575 - id: concurrent-for-each-loop-v1-starfish-white-whale
7676 type: core/concurrent-for-each-loop@v1
7777 position:
8686 y: 4830
8787 inputs:
8888 script: |-
89- echo "$RUNNER_TEMP\\msys64\\ucrt64 \\bin" >> "$GITHUB_PATH"
89+ echo "$RUNNER_TEMP\\msys64\\mingw64 \\bin" >> "$GITHUB_PATH"
9090 gcc --version
9191 shell: bash
9292 comment: Set gcc to PATH
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"
@@ -107,12 +107,14 @@ nodes:
107107
108108
109109 export CC=gcc
110+ export CXX=g++
110111
111112 # Cgo requires a cross-compiler that is not installed on GitHub runners
112113 as of now.
113114
114115 [[ "$CURRENT_OS" == "linux" && "$ARCH" == "arm64" ]] &&
115- CC=aarch64-linux-gnu-gcc
116+ CC=aarch64-linux-gnu-gcc &&
117+ CXX=aarch64-linux-gnu-g++
116118
117119
118120 # Download P4 API SDK for the target platform
@@ -137,12 +139,18 @@ nodes:
137139 linux)
138140 [[ "$ARCH" == "arm64" ]] && P4_LIB="$(pwd)/p4api/linux-aarch64/lib" || P4_LIB="$(pwd)/p4api/linux-x86_64/lib"
139141 P4_CGO_CPPFLAGS="-I$P4_INCLUDE"
140- P4_CGO_LDFLAGS="-L$P4_LIB -lp4api -lssl -lcrypto"
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
141150 ;;
142151 macos)
143152 P4_LIB="$(pwd)/p4api/macos/lib"
144153 P4_CGO_CPPFLAGS="-I$P4_INCLUDE"
145- # Build static OpenSSL for macOS (not available on the runner)
146154 SSL_LIB="$(pwd)/p4api/ssl-macos-${ARCH}/lib"
147155 bash setup-openssl.sh macos "$ARCH" "$SSL_LIB"
148156 P4_CGO_LDFLAGS="-L$P4_LIB -lp4api $SSL_LIB/libssl.a $SSL_LIB/libcrypto.a -framework ApplicationServices -framework Foundation -framework Security -framework CoreFoundation"
@@ -196,7 +204,7 @@ nodes:
196204 cp "$OUTPUT_CLI" "$TMP_ACTRUN"
197205 # encoding needed since default on Windows is cp1252
198206 PYTHONIOENCODING=utf-8 python tests_e2e/tests_e2e.py
199- rm "$TMP_ACTRUN"
207+ rm "$TMP_ACTRUN" || true
200208 else
201209 echo "OS and ARCH do not match the current system ($OS != $CURRENT_OS $ARCH != $CURRENT_ARCH). Skipping e2e tests."
202210 fi
@@ -223,6 +231,8 @@ nodes:
223231 build_lib
224232
225233 run_e2e_tests
234+
235+ exit 0
226236 env: []
227237 comment: build the cli and dll
228238 - id: length-v1-nectarine-squirrel-peacock
@@ -288,8 +298,8 @@ nodes:
288298 inputs:
289299 script: |-
290300 # check the build node script
291- sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
292- comment: Install a GCC version capable of cross-compiling
301+ sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
302+ comment: Install a GCC/G++ version capable of cross-compiling
293303 - id: switch-platform-v1-dog-snake-ivory
294304 type: core/switch-platform@v1
295305 position:
0 commit comments