Skip to content

Commit

Permalink
Githubactions: Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
aveenismail committed Oct 30, 2023
1 parent 1b489bc commit 72fd488
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 25 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..
Expand All @@ -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 ..
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
28 changes: 11 additions & 17 deletions resources/release/macos/make_release_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 72fd488

Please sign in to comment.