From 1b489bc256580dc2029c29135a06c3697c1dad63 Mon Sep 17 00:00:00 2001 From: Aveen Ismail Date: Mon, 30 Oct 2023 15:53:02 +0100 Subject: [PATCH 1/5] Githubactions: Update workflows --- .github/workflows/build_and_test.yml | 24 ++++- .github/workflows/release.yml | 93 ++++++++++++++++--- .../release/macos/make_release_binaries.sh | 28 +++--- 3 files changed, 115 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index e8c50180e..1897cb06c 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -8,6 +8,12 @@ jobs: fail-fast: false matrix: include: + - environment: "ubuntu:23.10" + cc: "gcc" + upload_for_test: "false" + - environment: "ubuntu:23.10" + cc: "clang" + upload_for_test: "false" - environment: "ubuntu:23.04" cc: "gcc" upload_for_test: "false" @@ -288,7 +294,13 @@ jobs: build_macos: name: build on macos - runs-on: macos-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: macos-latest + - os: macos-latest-xlarge steps: @@ -305,7 +317,12 @@ jobs: env: VERBOSE: 1 run: | - export PKG_CONFIG_PATH=/usr/local/opt/openssl@1.1/lib/pkgconfig:$PKG_CONFIG_PATH + + 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 mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. @@ -316,7 +333,7 @@ jobs: env: VERBOSE: 1 run: | - export PKG_CONFIG_PATH=/usr/local/opt/openssl@1.1/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 .. @@ -332,7 +349,6 @@ jobs: fail-fast: false matrix: include: - - environment: "ubuntu:22.04" cc: "clang" - environment: "centos:7" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70b7ad81a..809526f81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,64 @@ jobs: name: yubihsm-shell-src path: artifact + Windowsx-build: + name: Build Windows release + needs: source + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: windows-latest + arch: x68 + - os: windows-latest + arch: x64 + env: + VERSION: 2.4.1 + steps: + - name: Download source from source job + uses: actions/download-artifact@v3 + with: + name: yubihsm-shell-src + + - name: Extract source + run: | + Set-PSDebug -Trace 1 + tar xf yubihsm-shell-$env:VERSION.tar.gz + + - name: Build and make MSI installer + env: + ARCH: ${{ matrix.arch }} + run: | + Set-PSDebug -Trace 1 + $YHSHELL_SRC_DIR="$env:GITHUB_WORKSPACE\yubihsm-shell-$env:VERSION" + $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 + ./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" + + mkdir $env:GITHUB_WORKSPACE/artifact + cp -r $YHSHELL_SRC_DIR/resources/release/win/yubihsm-shell-$env:ARCH $env:GITHUB_WORKSPACE/artifact/ + cp -r $YHSHELL_SRC_DIR/resources/release/win/yubihsm-shell-$env:ARCH.msi $env:GITHUB_WORKSPACE/artifact/ + + - name: Install yubihsm-shell + run: | + Set-PSDebug -Trace 1 + cd "$env:GITHUB_WORKSPACE\yubihsm-shell-$env:VERSION\resources\release\win" + msiexec /i yubihsm-shell-${{ matrix.arch }}.msi /quiet /log $env:GITHUB_WORKSPACE/artifact/log_${{ matrix.arch }}.txt + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: yubihsm-shell-${{ matrix.arch }} + path: artifact + Windowsx86: name: Build Windows x86 release needs: source @@ -120,10 +178,18 @@ jobs: name: yubihsm-shell-win64 path: artifact - macos_amd64: - name: Build MacOS amd64 release + macos-build: + name: Build MacOS release needs: source - runs-on: macos-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: macos-latest + arch: amd + - os: macos-latest-xlarge + arch: arm env: VERSION: 2.4.1 SO_VERSION: 2 @@ -139,31 +205,27 @@ jobs: tar xf yubihsm-shell-$VERSION.tar.gz - name: Build and make MSI installer + env: + ARCH: ${{ matrix.arch }} run: | set -e -o pipefail set -x - - brew install openssl@1.1 - ls /usr/local/opt - ls /usr/local/opt/openssl@1.1 - ls /usr/local/opt/openssl@1.1/lib - - + YHSHELL_SRC_DIR="$GITHUB_WORKSPACE/yubihsm-shell-$VERSION" cd $YHSHELL_SRC_DIR - ./resources/release/macos/make_release_binaries.sh amd $VERSION $SO_VERSION + ./resources/release/macos/make_release_binaries.sh $ARCH $VERSION $SO_VERSION cd $YHSHELL_SRC_DIR/resources/release/macos/ - ./make_installer.sh amd64 $YHSHELL_SRC_DIR/resources/release/macos/yubihsm-shell-darwin-amd-$VERSION + ./make_installer.sh amd64 $YHSHELL_SRC_DIR/resources/release/macos/yubihsm-shell-darwin-$ARCH-$VERSION mkdir $GITHUB_WORKSPACE/artifact - cp -r $YHSHELL_SRC_DIR/resources/release/macos/yubihsm-shell-darwin-amd-$VERSION $GITHUB_WORKSPACE/artifact/ - cp -r $YHSHELL_SRC_DIR/resources/release/macos/yubihsm2-sdk-darwin-amd64.pkg $GITHUB_WORKSPACE/artifact/ + cp -r $YHSHELL_SRC_DIR/resources/release/macos/yubihsm-shell-darwin-$ARCH-$VERSION $GITHUB_WORKSPACE/artifact/ + cp -r $YHSHELL_SRC_DIR/resources/release/macos/yubihsm2-sdk-darwin-$ARCH64.pkg $GITHUB_WORKSPACE/artifact/ - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: yubihsm-shell-darwin-amd64 + name: yubihsm-shell-darwin-${{ matrix.arch }}64 path: artifact debian_based: @@ -171,6 +233,7 @@ jobs: fail-fast: false matrix: environment: [ + "ubuntu:23.10", "ubuntu:23.04", "ubuntu:22.04", "ubuntu:20.04", diff --git a/resources/release/macos/make_release_binaries.sh b/resources/release/macos/make_release_binaries.sh index 7ec2352de..45301ee6c 100755 --- a/resources/release/macos/make_release_binaries.sh +++ b/resources/release/macos/make_release_binaries.sh @@ -17,9 +17,15 @@ else exit fi -brew install cmake pkg-config gengetopt help2man openssl@1.1 +brew install cmake pkg-config gengetopt help2man openssl -export PKG_CONFIG_PATH=$BREW_LIB/openssl@1.1/lib/pkgconfig +ls $BREW_LIB +ls $BREW_LIB/openssl +ls $BREW_LIB/openssl/lib + + + +export PKG_CONFIG_PATH=$BREW_LIB/openssl/lib/pkgconfig SOURCE_DIR=$PWD MAC_DIR=$SOURCE_DIR/resources/release/macos @@ -32,25 +38,25 @@ cmake -DRELEASE_BUILD=1 -DWITHOUT_YKYH=1 -DWITHOUT_MANPAGES=1 -DCMAKE_INSTALL_PR make install cd $OUTPUT/lib ln -s "libcrypto.1.1.dylib" "libcrypto.dylib" -cp "$BREW_LIB/openssl@1.1/lib/libcrypto.1.1.dylib" "$OUTPUT/lib" +cp "$BREW_LIB/openssl/lib/libcrypto.1.1.dylib" "$OUTPUT/lib" chmod +w "$OUTPUT/lib/libcrypto.1.1.dylib" -cp -r $BREW_CELLAR/openssl@1.1/1.1.1*/include/openssl "$OUTPUT/include" +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 -change "$BREW_LIB/openssl@1.1/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/libyubihsm.dylib" -install_name_tool -change "$BREW_LIB/openssl@1.1/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/libyubihsm.$VERSION.dylib" -install_name_tool -change "$BREW_LIB/openssl@1.1/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/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/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@1.1/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.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/lib/pkcs11/yubihsm_pkcs11.dylib" -install_name_tool -change "$BREW_LIB/openssl@1.1/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/bin/yubihsm-shell" -install_name_tool -change "$BREW_LIB/openssl@1.1/lib/libcrypto.1.1.dylib" "@loader_path/../lib/libcrypto.1.1.dylib" "$OUTPUT/bin/yubihsm-wrap" -install_name_tool -change "$BREW_LIB/openssl@1.1/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.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" for file in `find $OUTPUT/lib $OUTPUT/bin -type f`; do if otool -L $file | grep -q '$OUTPUT'; then From 72fd488eab9da91f0ba342b72d745404b494990d Mon Sep 17 00:00:00 2001 From: Aveen Ismail Date: Mon, 30 Oct 2023 16:55:13 +0100 Subject: [PATCH 2/5] 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 1897cb06c..6912a28ea 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 809526f81..824f094d2 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 45301ee6c..ea2131dc5 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 From 2ea0a0a88144ef5c20603fd3d5e84c7de9452a43 Mon Sep 17 00:00:00 2001 From: Aveen Ismail Date: Mon, 30 Oct 2023 17:09:41 +0100 Subject: [PATCH 3/5] Githubactions: Add debug outputto MacOS release scripts --- .github/workflows/build_and_test.yml | 2 -- resources/release/macos/make_release_binaries.sh | 9 ++++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 6912a28ea..00cc0a056 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -318,7 +318,6 @@ jobs: VERBOSE: 1 run: | -# export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. @@ -329,7 +328,6 @@ jobs: env: VERBOSE: 1 run: | - # 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/resources/release/macos/make_release_binaries.sh b/resources/release/macos/make_release_binaries.sh index ea2131dc5..0f2004c4b 100755 --- a/resources/release/macos/make_release_binaries.sh +++ b/resources/release/macos/make_release_binaries.sh @@ -19,6 +19,13 @@ fi brew install cmake pkg-config gengetopt help2man openssl + +ls /usr/local/opt/openssl +echo "-------------" +ls /usr/local/opt/openssl/include +echo "-------------" +ls $BREW_LIB/openssl/include + export PKG_CONFIG_PATH=$BREW_LIB/openssl/lib/pkgconfig SOURCE_DIR=$PWD @@ -34,7 +41,7 @@ cd $OUTPUT/lib 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" +cp -r $BREW_LIB/openssl/include/openssl "$OUTPUT/include" install_name_tool -id "@loader_path/../lib/libcrypto.3.dylib" "$OUTPUT/lib/libcrypto.3.dylib" From a640dc3dc11a4bffe6da055aee6d347c39170ca3 Mon Sep 17 00:00:00 2001 From: Aveen Ismail Date: Mon, 30 Oct 2023 17:20:51 +0100 Subject: [PATCH 4/5] Githubactions: Update workflow --- .github/workflows/release.yml | 4 ++-- resources/release/macos/make_release_binaries.sh | 11 ++--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 824f094d2..54140697f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: matrix: include: - os: windows-latest - arch: x68 + arch: x86 - os: windows-latest arch: x64 env: @@ -223,7 +223,7 @@ jobs: mkdir $GITHUB_WORKSPACE/artifact cp -r $YHSHELL_SRC_DIR/resources/release/macos/yubihsm-shell-darwin-$ARCH-$VERSION $GITHUB_WORKSPACE/artifact/ - cp -r $YHSHELL_SRC_DIR/resources/release/macos/yubihsm2-sdk-darwin-$ARCH64.pkg $GITHUB_WORKSPACE/artifact/ + cp -r $YHSHELL_SRC_DIR/resources/release/macos/yubihsm2-sdk-darwin-$ARCH.pkg $GITHUB_WORKSPACE/artifact/ - name: Upload artifact uses: actions/upload-artifact@v3 diff --git a/resources/release/macos/make_release_binaries.sh b/resources/release/macos/make_release_binaries.sh index 0f2004c4b..33f3c840d 100755 --- a/resources/release/macos/make_release_binaries.sh +++ b/resources/release/macos/make_release_binaries.sh @@ -8,10 +8,10 @@ SO_VERSION=$3 if [ "$ARCH" == "amd" ]; then BREW_LIB="/usr/local/opt" - BREW_CELLAR="/usr/local/Cellar" + #BREW_CELLAR="/usr/local/Cellar" elif [ "$ARCH" == "arm" ]; then BREW_LIB="/opt/homebrew/opt" - BREW_CELLAR="/opt/homebrew/Cellar" + #BREW_CELLAR="/opt/homebrew/Cellar" else echo "Unknown architecture" exit @@ -19,13 +19,6 @@ fi brew install cmake pkg-config gengetopt help2man openssl - -ls /usr/local/opt/openssl -echo "-------------" -ls /usr/local/opt/openssl/include -echo "-------------" -ls $BREW_LIB/openssl/include - export PKG_CONFIG_PATH=$BREW_LIB/openssl/lib/pkgconfig SOURCE_DIR=$PWD From 22a7d0f189d92d0f27dc5a2b3b5ae229d96a1197 Mon Sep 17 00:00:00 2001 From: Aveen Ismail Date: Mon, 30 Oct 2023 17:43:12 +0100 Subject: [PATCH 5/5] Githubactions: Update release workflow --- .github/workflows/release.yml | 100 ---------------------------------- 1 file changed, 100 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54140697f..149bb4df1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,18 +73,10 @@ jobs: { ./make_release_binaries.ps1 x64 C:/vcpkg } - cd $YHSHELL_SRC_DIR/resources/release/win - ./repack_installer.ps1 $env:ARCH $env:WIX\bin "$MERGEDPATH" mkdir $env:GITHUB_WORKSPACE/artifact cp -r $YHSHELL_SRC_DIR/resources/release/win/yubihsm-shell-$env:ARCH $env:GITHUB_WORKSPACE/artifact/ - cp -r $YHSHELL_SRC_DIR/resources/release/win/yubihsm-shell-$env:ARCH.msi $env:GITHUB_WORKSPACE/artifact/ - - name: Install yubihsm-shell - run: | - Set-PSDebug -Trace 1 - cd "$env:GITHUB_WORKSPACE\yubihsm-shell-$env:VERSION\resources\release\win" - msiexec /i yubihsm-shell-${{ matrix.arch }}.msi /quiet /log $env:GITHUB_WORKSPACE/artifact/log_${{ matrix.arch }}.txt - name: Upload artifact uses: actions/upload-artifact@v3 @@ -92,95 +84,6 @@ jobs: name: yubihsm-shell-${{ matrix.arch }} path: artifact - Windowsx86: - name: Build Windows x86 release - needs: source - runs-on: windows-latest - env: - VERSION: 2.4.1 - steps: - - name: Download source from source job - uses: actions/download-artifact@v3 - with: - name: yubihsm-shell-src - - - name: Extract source - run: | - Set-PSDebug -Trace 1 - tar xf yubihsm-shell-$env:VERSION.tar.gz - - - name: Build and make MSI installer - run: | - Set-PSDebug -Trace 1 - $YHSHELL_SRC_DIR="$env:GITHUB_WORKSPACE\yubihsm-shell-$env:VERSION" - $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 - ./make_release_binaries.ps1 Win32 C:/vcpkg - cd $YHSHELL_SRC_DIR/resources/release/win - ./repack_installer.ps1 x86 $env:WIX\bin "$MERGEDPATH" - - mkdir $env:GITHUB_WORKSPACE/artifact - cp -r $YHSHELL_SRC_DIR/resources/release/win/yubihsm-shell-x86 $env:GITHUB_WORKSPACE/artifact/ - cp -r $YHSHELL_SRC_DIR/resources/release/win/yubihsm-shell-x86.msi $env:GITHUB_WORKSPACE/artifact/ - - - name: Install yubihsm-shell - run: | - Set-PSDebug -Trace 1 - cd "$env:GITHUB_WORKSPACE\yubihsm-shell-$env:VERSION\resources\release\win" - msiexec /i yubihsm-shell-x86.msi /quiet /log $env:GITHUB_WORKSPACE/artifact/log_x86.txt - - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: yubihsm-shell-win32 - path: artifact - - - windowsx64: - name: Build Windows x64 release - needs: source - runs-on: windows-latest - env: - VERSION: 2.4.1 - steps: - - name: Download source from source job - uses: actions/download-artifact@v3 - with: - name: yubihsm-shell-src - - - name: Extract source - run: | - Set-PSDebug -Trace 1 - tar xf yubihsm-shell-$env:VERSION.tar.gz - - - name: Build and make MSI installer - run: | - Set-PSDebug -Trace 1 - $YHSHELL_SRC_DIR="$env:GITHUB_WORKSPACE\yubihsm-shell-$env:VERSION" - $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 - ./make_release_binaries.ps1 x64 C:/vcpkg - cd $YHSHELL_SRC_DIR/resources/release/win - ./repack_installer.ps1 x64 $env:WIX\bin "$MERGEDPATH" - - mkdir $env:GITHUB_WORKSPACE/artifact - cp -r $YHSHELL_SRC_DIR/resources/release/win/yubihsm-shell-x64 $env:GITHUB_WORKSPACE/artifact/ - cp -r $YHSHELL_SRC_DIR/resources/release/win/yubihsm-shell-x64.msi $env:GITHUB_WORKSPACE/artifact/ - - - name: Install yubihsm-shell - run: | - Set-PSDebug -Trace 1 - cd "$env:GITHUB_WORKSPACE\yubihsm-shell-$env:VERSION\resources\release\win" - msiexec /i yubihsm-shell-x64.msi /quiet /log $env:GITHUB_WORKSPACE/artifact/log_x64.txt - - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: yubihsm-shell-win64 - path: artifact - macos-build: name: Build MacOS release needs: source @@ -218,12 +121,9 @@ jobs: cd $YHSHELL_SRC_DIR ./resources/release/macos/make_release_binaries.sh $ARCH $VERSION $SO_VERSION - cd $YHSHELL_SRC_DIR/resources/release/macos/ - ./make_installer.sh amd64 $YHSHELL_SRC_DIR/resources/release/macos/yubihsm-shell-darwin-$ARCH-$VERSION mkdir $GITHUB_WORKSPACE/artifact cp -r $YHSHELL_SRC_DIR/resources/release/macos/yubihsm-shell-darwin-$ARCH-$VERSION $GITHUB_WORKSPACE/artifact/ - cp -r $YHSHELL_SRC_DIR/resources/release/macos/yubihsm2-sdk-darwin-$ARCH.pkg $GITHUB_WORKSPACE/artifact/ - name: Upload artifact uses: actions/upload-artifact@v3