Skip to content

Commit

Permalink
Fix OpenSSL builds in GHA CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ashtum committed Mar 28, 2024
1 parent 26714ac commit 3e91357
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 31 deletions.
32 changes: 4 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,22 +252,6 @@ jobs:
./bootstrap.sh
./b2 -d0 headers
- name: Macos 11 specific
if: matrix.os == 'macos-11'
run: |
echo "macos - set up homebrew openssl"
cat > ~/user-config.jam <<EOF
import os ;
local OPENSSL_ROOT = [ os.environ OPENSSL_ROOT ] ;
project
: requirements
<include>/usr/local/opt/openssl/include
<variant>debug:<library-path>/usr/local/opt/openssl/lib
<target-os>windows<variant>debug:<library-path>/usr/local/opt/openssl/debug/lib
<variant>release:<library-path>/usr/local/opt/openssl/lib
;
EOF
- name: Create user-config.jam
if: matrix.compiler
run: |
Expand Down Expand Up @@ -404,19 +388,15 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup OpenSSL
env:
OPENSSL_ROOT: "C:\\OpenSSL"
shell: cmd
run: |
echo Install choco
powershell -Command iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
if "${{matrix.addrmd}}" == "64" (
choco install --no-progress -y openssl --x64
choco install --no-progress -y openssl --x64 --version=3.1.1
)
if "${{matrix.addrmd}}" == "32" (
; as of 17.08.23 openssl 3 doesn't support x86
set openssl_install_dir="C:\\Program Files (x86)\\OpenSSL-Win32"
choco install --no-progress -y openssl --forcex86 --version 1.1.1.2100
choco install --no-progress -y openssl --forcex86 --version=1.1.1.2100
)
if "${{matrix.addrmd}}" == "64" (
Expand All @@ -426,7 +406,7 @@ jobs:
set openssl_install_dir="C:\\Program Files\\OpenSSL-Win64"
)
)
mklink /D %OPENSSL_ROOT% %openssl_install_dir%
mklink /D C:\OpenSSL %openssl_install_dir%
refreshenv
set
Expand All @@ -449,19 +429,15 @@ jobs:
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
copy libs\%LIBRARY%\tools\user-config.jam %USERPROFILE%\user-config.jam
set OPENSSL_ROOT=C:\OpenSSL
echo using openssl : : ^<include^>"C:/OpenSSL/include" ^<search^>"C:/OpenSSL/lib" ^<ssl-name^>libssl ^<crypto-name^>libcrypto : ^<address-model^>${{matrix.addrmd}} ; >> %USERPROFILE%\user-config.jam
cmd /c bootstrap
b2 -d0 headers
- name: Run tests
shell: bash
env:
OPENSSL_ROOT: "C:/OpenSSL"
run: |
echo "current directory: $(pwd)"
cd ../boost-root
export OPENSSL_ROOT="C:/OpenSSL"
if [[ "${{matrix.supported}}" != "true" ]] ; then
echo "This configuration is not supported because ${{matrix.supported}}"
exit 0
Expand Down
2 changes: 0 additions & 2 deletions Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ variant beast_ubasan
<define>BOOST_USE_ASAN=1
;

path-constant TEST_MAIN : include/boost/beast/_experimental/unit_test/main.cpp ;

project /boost/beast ;

local defines =
Expand Down
2 changes: 1 addition & 1 deletion test/beast/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
alias run-tests :
[ compile core.cpp ]
[ compile http.cpp ]
[ compile ssl.cpp ]
[ compile ssl.cpp /boost/beast//lib-asio-ssl ]
[ compile version.cpp ]
[ compile websocket.cpp ]
[ compile zlib.cpp ]
Expand Down
3 changes: 3 additions & 0 deletions test/beast/_experimental/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ local RUN_TESTS ;
for local f in $(SOURCES)
{
RUN_TESTS += [ run $(f)
/boost/beast//lib-asio-ssl
/boost/beast/test//lib-test
] ;
}
Expand All @@ -27,12 +28,14 @@ alias run-tests : $(RUN_TESTS) ;

exe fat-tests :
$(SOURCES)
/boost/beast//lib-asio-ssl
/boost/beast/test//lib-test
;

explicit fat-tests ;

run $(SOURCES)
/boost/beast//lib-asio-ssl
/boost/beast/test//lib-test
: : : : run-fat-tests ;

Expand Down

0 comments on commit 3e91357

Please sign in to comment.