Try building openssl and libevent

This commit is contained in:
Micah Lee 2022-05-26 18:36:54 -07:00
parent bfd7e970e0
commit 3fea3019aa
No known key found for this signature in database
GPG key ID: 403C2657CD994F73

View file

@ -86,6 +86,10 @@ jobs:
executor: executor:
name: win/default name: win/default
shell: powershell.exe shell: powershell.exe
environment:
OPENSSL_TAG: "openssl-3.0.3"
LIBEVENT_TAG: "release-2.1.12-stable"
TOR_TAG: "tor-0.4.7.7"
steps: steps:
- checkout - checkout
# # Install python # # Install python
@ -119,31 +123,80 @@ jobs:
refreshenv refreshenv
C:\msys2\usr\bin\bash -c "/c/msys2/usr/bin/pacman -S --needed --noconfirm autoconf automake libtool make clang" C:\msys2\usr\bin\bash -c "/c/msys2/usr/bin/pacman -S --needed --noconfirm autoconf automake libtool make clang"
mkdir C:\Users\circleci\src mkdir C:\Users\circleci\src
mkdir C:\Users\circleci\build
# Build openssl
- restore_cache:
key: "build-win64-openssl-{{ .Environment.OPENSSL_TAG }}"
- run:
name: Build openssl
command: |
if (Test-Path -Path "C:\Users\circleci\build\openssl") {
Write-Output "openssl already compiled, skipping"
} else {
# Get source
gpg --recv-key 8657ABB260F056B1E5190839D9C4D26D0E604491
cd C:\Users\circleci\src
git clone https://github.com/openssl/openssl.git
cd openssl
git tag -v $OPENSSL_TAG
if($? -ne $true) { throw "openssl tag doesn't verify" }
git checkout $OPENSSL_TAG
# Build
$BuildScript = {
#!/bin/bash
export PATH=/c/msys2/usr/bin:$PATH
cd /c/Users/circleci/src/openssl
./Configure --prefix=/opt/openssl-build --openssldir=/usr/local/ssl '-Wl,-rpath,$(LIBRPATH)' Cygwin-x86_64
make -j$(nproc)
make install
cp -r /opt/openssl-build /c/Users/circleci/build/openssl
}
Set-Content -Path C:\Users\circleci\src\build-openssl.sh -Value $BuildScript.ToString()
C:\msys2\usr\bin\bash -c "/c/Users/circleci/src/build-openssl.sh"
}
- save_cache:
key: "build-win64-openssl-{{ .Environment.OPENSSL_TAG }}"
paths:
- C:\Users\circleci\build\openssl
# Build libevent # Build libevent
- restore_cache:
key: "build-win64-livevent-{{ .Environment.LIBEVENT_TAG }}"
- run: - run:
name: Build libevent name: Build libevent
command: | command: |
$LibeventTag = "release-2.1.12-stable" if (Test-Path -Path "C:\Users\circleci\build\openssl") {
Write-Output "openssl already compiled, skipping"
} else {
# Get source # Get source
gpg --recv-key 9E3AC83A27974B84D1B3401DB86086848EF8686D gpg --recv-key 9E3AC83A27974B84D1B3401DB86086848EF8686D
cd C:\Users\circleci\src cd C:\Users\circleci\src
git clone https://github.com/libevent/libevent.git git clone https://github.com/libevent/libevent.git
cd libevent cd libevent
git tag -v $LibeventTag git tag -v $LIBEVENT_TAG
if($? -ne $true) { throw "libevent tag doesn't verify" } if($? -ne $true) { throw "libevent tag doesn't verify" }
git checkout $LibeventTag git checkout $LIBEVENT_TAG
# Build # Build
$BashScript = @" $BuildScript = {
#!/bin/bash #!/bin/bash
export PATH=/c/msys2/usr/bin:$PATH export PATH=/c/msys2/usr/bin:$PATH
cd /c/Users/circleci/src/libevent cd /c/Users/circleci/src/libevent
./autogen.sh ./autogen.sh
./configure --prefix=/opt/libevent-build --with-pic ./configure --prefix=/opt/libevent-build --with-pic
make -j8 install make -j$(nproc)
"@ make install
cp -r /opt/libevent-build /c/Users/circleci/build/libevent
}
Set-Content -Path C:\Users\circleci\src\build-libevent.sh -Value $BuildScript.ToString()
C:\msys2\usr\bin\bash -c "/c/Users/circleci/src/build-libevent.sh"
}
- save_cache:
key: "build-win64-libevent-{{ .Environment.LIBEVENT_TAG }}"
paths:
- C:\Users\circleci\build\libevent
# # Build tor # # Build tor
# - run: # - run: