Skip to content

Commit

Permalink
Gitbubactions: update Windows and old Openssl workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
aveenismail committed Jul 24, 2024
1 parent e8c7837 commit b4dca43
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push]

jobs:

job_1:
libressl_build:
name: Build with LibreSSL
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -46,51 +46,7 @@ jobs:
yubico-piv-tool --help | grep "Usage: yubico-piv-tool"
objdump -T $LIBDIR/libykcs11.so | grep C_Sign
job_2:
name: Build with OpenSSL 1.0
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Install prerequisites
run: |
set -x
sudo apt install libpcsclite-dev check gengetopt help2man zlib1g-dev
- name: Install OpenSSL 1.0 from source
run: |
set -x
cd ..
wget -nv https://www.openssl.org/source/openssl-1.0.2u.tar.gz
tar -xzf openssl-1.0.2u.tar.gz
cd openssl-1.0.2u
./Configure linux-x86_64 shared --prefix=/home/runner/work/yubico-piv-tool/openssl
sudo make all install VERSION="1.0.2u"
- name: Build and install
run: |
set -x
mkdir build; cd build
cmake .. -DVERBOSE_CMAKE=ON -DOPENSSL_PKG_PATH=/home/runner/work/yubico-piv-tool/openssl/lib/pkgconfig
make
make test
./tool/yubico-piv-tool --help | grep "Usage: yubico-piv-tool"
objdump -T ykcs11/libykcs11.so | grep C_Sign
ldd tool/yubico-piv-tool | grep libcrypto.so
ldd lib/libykpiv.so | grep libcrypto.so
ldd ykcs11/libykcs11.so | grep libcrypto.so
sudo make install
cd ..
LIBDIR=$(cmake -L | sed -n "s/^.*YKPIV_INSTALL_LIB_DIR:PATH=\s*\(\S*\).*$/\1/p")
sudo cp /home/runner/work/yubico-piv-tool/openssl/lib/libcrypto.* $LIBDIR/
export LD_LIBRARY_PATH=$LIBDIR
yubico-piv-tool --help | grep "Usage: yubico-piv-tool"
objdump -T $LIBDIR/libykcs11.so | grep C_Sign
job_3:
openssl_1_1_build:
name: Build with OpenSSL 1.1
runs-on: ubuntu-latest
steps:
Expand All @@ -105,9 +61,10 @@ jobs:
run: |
set -x
cd ..
wget -nv https://www.openssl.org/source/openssl-1.1.1s.tar.gz
tar -xzf openssl-1.1.1s.tar.gz
cd openssl-1.1.1s
wget -nv https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1w.tar.gz
tar -xzf OpenSSL_1_1_1w.tar.gz
ls
cd OpenSSL_1_1_1w
./Configure linux-x86_64 shared --prefix=/home/runner/work/yubico-piv-tool/openssl
sudo make all install VERSION="1.1.1s"
Expand All @@ -134,7 +91,7 @@ jobs:
yubico-piv-tool --help | grep "Usage: yubico-piv-tool"
objdump -T $LIBDIR/libykcs11.so | grep C_Sign
job_4:
openss_3_build:
name: Build with OpenSSL 3.0
runs-on: ubuntu-latest
steps:
Expand All @@ -149,9 +106,10 @@ jobs:
run: |
set -x
cd ..
wget -nv https://www.openssl.org/source/openssl-3.0.7.tar.gz
tar -xzf openssl-3.0.7.tar.gz
cd openssl-3.0.7
wget -nv https://github.com/openssl/openssl/archive/refs/tags/openssl-3.3.1.tar.gz
tar -xzf openssl-3.3.1.tar.gz
ls
cd openssl-3.3.1
./Configure linux-x86_64 shared --prefix=/home/runner/work/yubico-piv-tool/openssl
sudo make all install VERSION="3.0.7"
Expand Down
153 changes: 0 additions & 153 deletions .github/workflows/windows_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,159 +29,6 @@ jobs:
name: yubico-piv-tool-src
path: ../artifact

win2019_x86:
name: Windows Server 2019 - x86
needs: source_build
runs-on: windows-2019
steps:
- name: Download source from job_1
uses: actions/download-artifact@v1
with:
name: yubico-piv-tool-src

- name: Extract source
run: |
Set-PSDebug -Trace 1
cd yubico-piv-tool-src
tar xf yubico-piv-tool-.tar.gz
- name: install prerequisites for x86 architecture
run: |
Set-PSDebug -Trace 1
vcpkg install openssl:x86-windows
vcpkg install getopt:x86-windows
vcpkg install check:x86-windows
vcpkg install zlib:x86-windows
- name: build for x86 architecture
run: |
Set-PSDebug -Trace 1
$env:Path ="C:/vcpkg/packages/openssl_x86-windows;$env:Path"
$env:include ="C:/vcpkg/packages/openssl_x86-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
mkdir build; cd build
cmake -A Win32 -DVERBOSE_CMAKE=ON -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x86-windows ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x86-windows/bin;C:/vcpkg/packages/openssl_x86-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build with YKCS11_DBG is set
run: |
Set-PSDebug -Trace 1
$env:Path ="C:/vcpkg/packages/openssl_x86-windows;$env:Path"
$env:include ="C:/vcpkg/packages/openssl_x86-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A Win32 -DVERBOSE_CMAKE=ON -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x86-windows -DYKCS11_DBG=3 ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x86-windows/bin;C:/vcpkg/packages/openssl_x86-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build only library (no CLI and no ykcs11)
run: |
Set-PSDebug -Trace 1
$env:Path ="C:/vcpkg/packages/openssl_x86-windows;$env:Path"
$env:include ="C:/vcpkg/packages/openssl_x86-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A Win32 -DVERBOSE_CMAKE=ON -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x86-windows -DBUILD_ONLY_LIB=ON ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x86-windows/bin;C:/vcpkg/packages/openssl_x86-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build only dynamic libaries
run: |
Set-PSDebug -Trace 1
$env:Path ="C:/vcpkg/packages/openssl_x86-windows;$env:Path"
$env:include ="C:/vcpkg/packages/openssl_x86-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A Win32 -DVERBOSE_CMAKE=ON -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x86-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x86-windows -DBUILD_STATIC_LIB=OFF ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x86-windows/bin;C:/vcpkg/packages/openssl_x86-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
win2019_x64:
name: Windows Server 2019 - x64
needs: source_build
runs-on: windows-2019

steps:
- name: Download source from job_1
uses: actions/download-artifact@v1
with:
name: yubico-piv-tool-src

- name: Extract source
run: |
Set-PSDebug -Trace 1
cd yubico-piv-tool-src
tar xf yubico-piv-tool-.tar.gz
- name: install prerequisites for x64 architecture
run: |
Set-PSDebug -Trace 1
vcpkg install openssl:x64-windows
vcpkg install getopt:x64-windows
vcpkg install check:x64-windows
vcpkg install zlib:x64-windows
- name: build for x64 architecture
run: |
Set-PSDebug -Trace 1
$env:Path ="C:\vcpkg\packages\openssl_x64-windows;$env:Path"
$env:include ="C:\vcpkg\packages\openssl_x64-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
mkdir build; cd build
cmake -A x64 -DVERBOSE_CMAKE=ON -DBACKEND=winscard -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x64-windows ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x64-windows/bin;C:/vcpkg/packages/openssl_x64-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build with YKCS11_DBG is set
run: |
Set-PSDebug -Trace 1
$env:Path ="C:\vcpkg\packages\openssl_x64-windows;$env:Path"
$env:include ="C:\vcpkg\packages\openssl_x64-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A x64 -DVERBOSE_CMAKE=ON -DBACKEND=winscard -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x64-windows -DYKCS11_DBG=3 ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x64-windows/bin;C:/vcpkg/packages/openssl_x64-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build only library (no CLI and no ykcs11)
run: |
Set-PSDebug -Trace 1
$env:Path ="C:\vcpkg\packages\openssl_x64-windows;$env:Path"
$env:include ="C:\vcpkg\packages\openssl_x64-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A x64 -DVERBOSE_CMAKE=ON -DBACKEND=winscard -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x64-windows -DBUILD_ONLY_LIB=ON ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x64-windows/bin;C:/vcpkg/packages/openssl_x64-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
- name: Build only dynamic libaries
run: |
Set-PSDebug -Trace 1
$env:Path ="C:\vcpkg\packages\openssl_x64-windows;$env:Path"
$env:include ="C:\vcpkg\packages\openssl_x64-windows/include;$env:include"
cd yubico-piv-tool-src/yubico-piv-tool-
rm -r build; mkdir build; cd build
cmake -A x64 -DVERBOSE_CMAKE=ON -DBACKEND=winscard -DGETOPT_LIB_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/lib -DGETOPT_INCLUDE_DIR=C:/vcpkg/packages/getopt-win32_x64-windows/include -DCHECK_PATH=C:/vcpkg/packages/check_x64-windows -DBUILD_STATIC_LIB=OFF ..
cmake --build . -v
$env:Path +=";C:/vcpkg/packages/check_x64-windows/bin;C:/vcpkg/packages/openssl_x64-windows/bin;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\lib\Debug;$env:GITHUB_WORKSPACE\yubico-piv-tool-src\yubico-piv-tool-\build\ykcs11\Debug"
ctest.exe -C Debug
build:
name: Build and Test on Windows
needs: source_build
Expand Down

0 comments on commit b4dca43

Please sign in to comment.