mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-14 13:41:25 -05:00
Skip cygwin install if libevent and tor are compiled
This commit is contained in:
parent
849f92a544
commit
a2a6fdd7e4
@ -87,39 +87,52 @@ jobs:
|
|||||||
name: win/default
|
name: win/default
|
||||||
shell: powershell.exe
|
shell: powershell.exe
|
||||||
environment:
|
environment:
|
||||||
OPENSSL_TAG: "openssl-3.0.3"
|
# NOTE: make sure to change when upgrading libevent
|
||||||
LIBEVENT_TAG: "release-2.1.12-stable"
|
LIBEVENT_TAG: "release-2.1.12-stable"
|
||||||
|
# NOTE: make sure to change when upgrading tor
|
||||||
TOR_TAG: "tor-0.4.7.7"
|
TOR_TAG: "tor-0.4.7.7"
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
|
- restore_cache:
|
||||||
|
# NOTE: make sure to change when upgrading libevent
|
||||||
|
key: "build-win64-livevent-2.1.12"
|
||||||
|
- restore_cache:
|
||||||
|
# NOTE: make sure to change when upgrading tor
|
||||||
|
key: "build-win64-tor-0.4.7.7"
|
||||||
|
|
||||||
# Install cygwin and required packages
|
# Install cygwin and required packages
|
||||||
- run:
|
- run:
|
||||||
name: Install cygwin and required packages
|
name: Install cygwin and required packages
|
||||||
command: |
|
command: |
|
||||||
# Download cygwin installer, signature, and signing key
|
if (((Test-Path C:\Users\circleci\build\libevent -PathType Container) -and (Test-Path C:\Users\circleci\build\tor -PathType Container)) -eq $true) {
|
||||||
Invoke-WebRequest -Uri https://cygwin.com/setup-x86_64.exe -OutFile C:\Users\circleci\Downloads\setup-x86_64.exe
|
Write-Output "libevent and tor already compiled, skipping"
|
||||||
Invoke-WebRequest -Uri https://cygwin.com/setup-x86_64.exe.sig -OutFile C:\Users\circleci\Downloads\setup-x86_64.exe.sig
|
} else {
|
||||||
Invoke-WebRequest -Uri https://cygwin.com/key/pubring.asc -OutFile C:\Users\circleci\Downloads\pubring.asc
|
Write-Output "downloading cygwin installer, signature, and signing key"
|
||||||
# Verify signature
|
Invoke-WebRequest -Uri https://cygwin.com/setup-x86_64.exe -OutFile C:\Users\circleci\Downloads\setup-x86_64.exe
|
||||||
gpg --import C:\Users\circleci\Downloads\pubring.asc
|
Invoke-WebRequest -Uri https://cygwin.com/setup-x86_64.exe.sig -OutFile C:\Users\circleci\Downloads\setup-x86_64.exe.sig
|
||||||
gpg --verify C:\Users\circleci\Downloads\setup-x86_64.exe.sig C:\Users\circleci\Downloads\setup-x86_64.exe
|
Invoke-WebRequest -Uri https://cygwin.com/key/pubring.asc -OutFile C:\Users\circleci\Downloads\pubring.asc
|
||||||
if($? -ne $true) { throw "cygwin failed to verify" }
|
|
||||||
# Install cygwin and required packaged
|
Write-Output "verifying signature"
|
||||||
C:\Users\circleci\Downloads\setup-x86_64.exe -q -s https://mirrors.kernel.org/sourceware/cygwin/ -P libssl-devel,git,gcc-core,make,autoconf,automake,libtool,gnupg
|
gpg --import C:\Users\circleci\Downloads\pubring.asc
|
||||||
# Create folders
|
gpg --verify C:\Users\circleci\Downloads\setup-x86_64.exe.sig C:\Users\circleci\Downloads\setup-x86_64.exe
|
||||||
mkdir C:\Users\circleci\src
|
if($? -ne $true) { throw "cygwin failed to verify" }
|
||||||
mkdir C:\Users\circleci\build
|
|
||||||
|
Write-Output "installing cygwin and requited packages"
|
||||||
|
C:\Users\circleci\Downloads\setup-x86_64.exe -q -s https://mirrors.kernel.org/sourceware/cygwin/ -P libssl-devel,git,gcc-core,make,autoconf,automake,libtool,gnupg
|
||||||
|
|
||||||
|
Write-Output "creating folders"
|
||||||
|
mkdir C:\Users\circleci\src
|
||||||
|
mkdir C:\Users\circleci\build
|
||||||
|
}
|
||||||
|
|
||||||
# Build libevent
|
# Build libevent
|
||||||
- restore_cache:
|
|
||||||
key: "build-win64-livevent-2.1.12"
|
|
||||||
- run:
|
- run:
|
||||||
name: Build libevent
|
name: Build libevent
|
||||||
shell: C:\\cygwin64\\bin\\bash.exe --login -eo pipefail
|
shell: C:\\cygwin64\\bin\\bash.exe --login -eo pipefail
|
||||||
command: |
|
command: |
|
||||||
if [[ -d "/cygdrive/c/Users/circleci/build/openssl" ]]; then
|
if [[ -d "/cygdrive/c/Users/circleci/build/openssl" ]]; then
|
||||||
echo "openssl already compiled, skipping"
|
echo "libevent already compiled, skipping"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -142,6 +155,7 @@ jobs:
|
|||||||
make install
|
make install
|
||||||
cp -r /opt/libevent-build /cygdrive/c/Users/circleci/build/libevent
|
cp -r /opt/libevent-build /cygdrive/c/Users/circleci/build/libevent
|
||||||
- save_cache:
|
- save_cache:
|
||||||
|
# NOTE: make sure to change when upgrading libevent
|
||||||
key: "build-win64-libevent-2.1.12"
|
key: "build-win64-libevent-2.1.12"
|
||||||
paths:
|
paths:
|
||||||
- C:\Users\circleci\build\libevent
|
- C:\Users\circleci\build\libevent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user