From 72fd488eab9da91f0ba342b72d745404b494990d Mon Sep 17 00:00:00 2001 From: Aveen Ismail Date: Mon, 30 Oct 2023 16:55:13 +0100 Subject: [PATCH] Githubactions: Update workflows --- .github/workflows/build_and_test.yml | 8 ++---- .github/workflows/release.yml | 7 +++-- .../release/macos/make_release_binaries.sh | 28 ++++++++----------- 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 1897cb06..6912a28e 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -318,11 +318,7 @@ jobs: VERBOSE: 1 run: | - ls /usr/local/opt - ls /usr/local/opt/openssl - ls /usr/local/opt/openssl/lib - - export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH +# export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. @@ -333,7 +329,7 @@ jobs: env: VERBOSE: 1 run: | - export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH + # export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH mkdir build-static cd build-static cmake -DENABLE_STATIC=ON -DCMAKE_BUILD_TYPE=Release .. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 809526f8..824f094d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,11 +65,14 @@ jobs: $MERGEDPATH = Get-ChildItem "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.*\MergeModules\Microsoft_VC141_CRT_x86.msm" cd $YHSHELL_SRC_DIR/resources/release/win - if [ "$env:ARCH" = "x68" ]; then + if($env:ARCH -eq "x86") + { ./make_release_binaries.ps1 Win32 C:/vcpkg + } else + { ./make_release_binaries.ps1 x64 C:/vcpkg - fi + } cd $YHSHELL_SRC_DIR/resources/release/win ./repack_installer.ps1 $env:ARCH $env:WIX\bin "$MERGEDPATH" diff --git a/resources/release/macos/make_release_binaries.sh b/resources/release/macos/make_release_binaries.sh index 45301ee6..ea2131dc 100755 --- a/resources/release/macos/make_release_binaries.sh +++ b/resources/release/macos/make_release_binaries.sh @@ -19,12 +19,6 @@ fi brew install cmake pkg-config gengetopt help2man openssl -ls $BREW_LIB -ls $BREW_LIB/openssl -ls $BREW_LIB/openssl/lib - - - export PKG_CONFIG_PATH=$BREW_LIB/openssl/lib/pkgconfig SOURCE_DIR=$PWD @@ -37,26 +31,26 @@ mkdir build; cd build cmake -DRELEASE_BUILD=1 -DWITHOUT_YKYH=1 -DWITHOUT_MANPAGES=1 -DCMAKE_INSTALL_PREFIX="$OUTPUT/" .. make install cd $OUTPUT/lib -ln -s "libcrypto.1.1.dylib" "libcrypto.dylib" -cp "$BREW_LIB/openssl/lib/libcrypto.1.1.dylib" "$OUTPUT/lib" -chmod +w "$OUTPUT/lib/libcrypto.1.1.dylib" +ln -s "libcrypto.3.dylib" "libcrypto.dylib" +cp "$BREW_LIB/openssl/lib/libcrypto.3.dylib" "$OUTPUT/lib" +chmod +w "$OUTPUT/lib/libcrypto.3.dylib" cp -r $BREW_CELLAR/openssl/*/include/openssl "$OUTPUT/include" -install_name_tool -id "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/libcrypto.1.1.dylib" +install_name_tool -id "@loader_path/../lib/libcrypto.3.dylib" "$OUTPUT/lib/libcrypto.3.dylib" -install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/libyubihsm.dylib" -install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/libyubihsm.$VERSION.dylib" -install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/libyubihsm.$SO_VERSION.dylib" +install_name_tool -change "$BREW_LIB/openssl@3/lib/libcrypto.3.dylib" "@loader_path/../lib/libcrypto.3.dylib" "$OUTPUT/lib/libyubihsm.dylib" +install_name_tool -change "$BREW_LIB/openssl@3/lib/libcrypto.3.dylib" "@loader_path/../lib/libcrypto.3.dylib" "$OUTPUT/lib/libyubihsm.$VERSION.dylib" +install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.3.dylib" "@loader_path/../lib/libcrypto.3.dylib" "$OUTPUT/lib/libyubihsm.$SO_VERSION.dylib" install_name_tool -change "$BREW_LIB/libusb/lib/libusb-1.0.0.dylib" "@loader_path/../lib/libusb-1.0.0.dylib" "$OUTPUT/lib/libyubihsm_usb.dylib" install_name_tool -change "$BREW_LIB/libusb/lib/libusb-1.0.0.dylib" "@loader_path/../lib/libusb-1.0.0.dylib" "$OUTPUT/lib/libyubihsm_usb.$VERSION.dylib" install_name_tool -change "$BREW_LIB/libusb/lib/libusb-1.0.0.dylib" "@loader_path/../lib/libusb-1.0.0.dylib" "$OUTPUT/lib/libyubihsm_usb.$SO_VERSION.dylib" -install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/pkcs11/yubihsm_pkcs11.dylib" +install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.3.dylib" "@loader_path/../lib/libcrypto.3.dylib" "$OUTPUT/lib/pkcs11/yubihsm_pkcs11.dylib" -install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/bin/yubihsm-shell" -install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/bin/yubihsm-wrap" -install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/bin/yubihsm-auth" +install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.3.dylib" "@loader_path/../lib/libcrypto.3.dylib" "$OUTPUT/bin/yubihsm-shell" +install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.3.dylib" "@loader_path/../lib/libcrypto.3.dylib" "$OUTPUT/bin/yubihsm-wrap" +install_name_tool -change "$BREW_LIB/openssl/lib/libcrypto.3.dylib" "@loader_path/../lib/libcrypto.3.dylib" "$OUTPUT/bin/yubihsm-auth" for file in `find $OUTPUT/lib $OUTPUT/bin -type f`; do if otool -L $file | grep -q '$OUTPUT'; then