mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Build libevent and tor in the same task
This commit is contained in:
parent
9fc8ee5178
commit
279951d5ef
@ -94,9 +94,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- restore_cache:
|
|
||||||
# NOTE: make sure to change when upgrading libevent
|
|
||||||
key: "build-win64-libevent-2.1.12-{{ .Environment.CACHE_VERSION }}"
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
# NOTE: make sure to change when upgrading tor
|
# NOTE: make sure to change when upgrading tor
|
||||||
key: "build-win64-tor-0.4.7.7-{{ .Environment.CACHE_VERSION }}"
|
key: "build-win64-tor-0.4.7.7-{{ .Environment.CACHE_VERSION }}"
|
||||||
@ -106,11 +103,9 @@ jobs:
|
|||||||
name: Install cygwin and required packages
|
name: Install cygwin and required packages
|
||||||
shell: bash.exe --login -eo pipefail
|
shell: bash.exe --login -eo pipefail
|
||||||
command: |
|
command: |
|
||||||
if [[ -d "/c/Users/circleci/build/libevent" ]]; then
|
if [[ -d "/c/Users/circleci/build/tor" ]]; then
|
||||||
if [[ -d "/c/Users/circleci/build/tor" ]]; then
|
echo "tor already compiled, skipping"
|
||||||
echo "libevent and tor already compiled, skipping"
|
exit 0
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -o setup-x86_64.exe https://cygwin.com/setup-x86_64.exe
|
curl -o setup-x86_64.exe https://cygwin.com/setup-x86_64.exe
|
||||||
@ -126,20 +121,20 @@ jobs:
|
|||||||
|
|
||||||
./setup-x86_64.exe -q -s https://mirrors.kernel.org/sourceware/cygwin/ -P libssl-devel,git,gcc-core,make,autoconf,automake,libtool,gnupg
|
./setup-x86_64.exe -q -s https://mirrors.kernel.org/sourceware/cygwin/ -P libssl-devel,git,gcc-core,make,autoconf,automake,libtool,gnupg
|
||||||
|
|
||||||
# Build libevent
|
# Build libevent tor
|
||||||
- run:
|
- run:
|
||||||
name: Build libevent
|
name: Build libevent and tor
|
||||||
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/libevent" ]]; then
|
if [[ -d "/cygdrive/c/Users/circleci/build/tor" ]]; then
|
||||||
echo "libevent already compiled, skipping"
|
echo "tor already compiled, skipping"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p /cygdrive/c/Users/circleci/src
|
mkdir -p /cygdrive/c/Users/circleci/src
|
||||||
mkdir -p /cygdrive/c/Users/circleci/build
|
mkdir -p /cygdrive/c/Users/circleci/build/tor
|
||||||
|
|
||||||
# Get source
|
# Get libevent source
|
||||||
curl "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x9e3ac83a27974b84d1b3401db86086848ef8686d" | gpg --import
|
curl "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x9e3ac83a27974b84d1b3401db86086848ef8686d" | gpg --import
|
||||||
cd /cygdrive/c/Users/circleci/src
|
cd /cygdrive/c/Users/circleci/src
|
||||||
git clone https://github.com/libevent/libevent.git
|
git clone https://github.com/libevent/libevent.git
|
||||||
@ -151,34 +146,15 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
git checkout $LIBEVENT_TAG
|
git checkout $LIBEVENT_TAG
|
||||||
|
|
||||||
# Build
|
# Build libevent
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/opt/libevent-build \
|
--prefix=/opt/libevent-build \
|
||||||
--with-pic
|
--with-pic
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make install
|
make install
|
||||||
cp -r /opt/libevent-build /cygdrive/c/Users/circleci/build/libevent
|
|
||||||
- save_cache:
|
|
||||||
# NOTE: make sure to change when upgrading libevent
|
|
||||||
key: "build-win64-libevent-2.1.12-{{ .Environment.CACHE_VERSION }}"
|
|
||||||
paths:
|
|
||||||
- C:\Users\circleci\build\libevent
|
|
||||||
|
|
||||||
# Build tor
|
# Get tor source
|
||||||
- run:
|
|
||||||
name: Build tor
|
|
||||||
shell: C:\\cygwin64\\bin\\bash.exe --login -eo pipefail
|
|
||||||
command: |
|
|
||||||
if [[ -d "/cygdrive/c/Users/circleci/build/tor" ]]; then
|
|
||||||
echo "tor already compiled, skipping"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p /cygdrive/c/Users/circleci/src
|
|
||||||
mkdir -p /cygdrive/c/Users/circleci/build
|
|
||||||
|
|
||||||
# Get source
|
|
||||||
curl https://keys.openpgp.org/vks/v1/by-fingerprint/B74417EDDF22AC9F9E90F49142E86A2A11F48D36 | gpg --import
|
curl https://keys.openpgp.org/vks/v1/by-fingerprint/B74417EDDF22AC9F9E90F49142E86A2A11F48D36 | gpg --import
|
||||||
cd /cygdrive/c/Users/circleci/src
|
cd /cygdrive/c/Users/circleci/src
|
||||||
git clone https://git.torproject.org/tor.git
|
git clone https://git.torproject.org/tor.git
|
||||||
@ -190,16 +166,15 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
git checkout $TOR_TAG
|
git checkout $TOR_TAG
|
||||||
|
|
||||||
# Build
|
# Build tor
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/opt/tor-build \
|
--prefix=/cygdrive/c/Users/circleci/build/tor \
|
||||||
--enable-static-libevent \
|
--enable-static-libevent \
|
||||||
--with-libevent-dir=/cygdrive/c/Users/circleci/build/libevent \
|
--with-libevent-dir=/opt/libevent-build \
|
||||||
--disable-asciidoc
|
--disable-asciidoc
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make install
|
make install
|
||||||
cp -r /opt/tor-build /cygdrive/c/Users/circleci/build/tor
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
# NOTE: make sure to change when upgrading tor
|
# NOTE: make sure to change when upgrading tor
|
||||||
key: "build-win64-tor-0.4.7.7-{{ .Environment.CACHE_VERSION }}"
|
key: "build-win64-tor-0.4.7.7-{{ .Environment.CACHE_VERSION }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user