Skip to content

Stop depending on OpenSSL on linux #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 3 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,17 @@ matrix:
- os: linux
dist: trusty
sudo: required
env: RID=ubuntu.18.04-x64
env: RID=linux-musl-x64
- os: linux
dist: trusty
sudo: required
env: RID=rhel-x64
env: RID=linux-arm64
- os: linux
dist: trusty
sudo: required
env: RID=fedora-x64
- os: linux
dist: trusty
sudo: required
env: RID=debian.9-x64
- os: linux
dist: trusty
sudo: required
env: RID=alpine-x64
- os: linux
dist: trusty
sudo: required
env: RID=alpine.3.9-x64
env: RID=linux-arm
- os: osx
env: RID=osx
- os: linux
dist: trusty
sudo: required
env: RID=ubuntu.16.04-arm64
- os: linux
dist: trusty
sudo: required
env: RID=debian-arm64

branches:
only:
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.arm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SET(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(TARGET_ABI "linux-gnueabihf")

SET(CMAKE_C_COMPILER ${CMAKE_SYSTEM_PROCESSOR}-${TARGET_ABI}-gcc)
SET(CMAKE_CXX_COMPILER ${CMAKE_SYSTEM_PROCESSOR}-${TARGET_ABI}-g++)
7 changes: 0 additions & 7 deletions Dockerfile.alpine.3.9-x64

This file was deleted.

7 changes: 0 additions & 7 deletions Dockerfile.fedora-x64

This file was deleted.

4 changes: 3 additions & 1 deletion Dockerfile.debian.9-x64 → Dockerfile.linux-arm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM debian:9
WORKDIR /nativebinaries
COPY . /nativebinaries/

RUN apt update && apt -y install cmake gcc libssl-dev pkg-config
RUN dpkg --add-architecture armhf

RUN apt update && apt -y install cmake pkg-config crossbuild-essential-armhf

CMD ["/bin/bash", "-c", "./build.libgit2.sh"]
5 changes: 1 addition & 4 deletions Dockerfile.debian-arm64 → Dockerfile.linux-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ COPY . /nativebinaries/

RUN dpkg --add-architecture arm64

RUN apt update \
&& apt -y install cmake pkg-config \
crossbuild-essential-arm64 \
libssl-dev:arm64
RUN apt update && apt -y install cmake pkg-config crossbuild-essential-arm64

CMD ["/bin/bash", "-c", "./build.libgit2.sh"]
2 changes: 1 addition & 1 deletion Dockerfile.alpine-x64 → Dockerfile.linux-musl-x64
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ FROM alpine:3.7
WORKDIR /nativebinaries
COPY . /nativebinaries/

RUN apk add --no-cache bash build-base cmake openssl-dev
RUN apk add --no-cache bash build-base cmake

CMD ["/bin/bash", "-c", "./build.libgit2.sh"]
2 changes: 1 addition & 1 deletion Dockerfile.linux-x64
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:14.04
WORKDIR /nativebinaries
COPY . /nativebinaries/

RUN apt update && apt -y install libssl-dev pkg-config curl make gcc build-essential
RUN apt update && apt -y install pkg-config curl make gcc build-essential

RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.15.4/cmake-3.15.4-Linux-x86_64.sh -o /tmp/cmake.sh && bash /tmp/cmake.sh --skip-license --prefix=/usr/local

Expand Down
8 changes: 0 additions & 8 deletions Dockerfile.rhel-x64

This file was deleted.

17 changes: 0 additions & 17 deletions Dockerfile.ubuntu.16.04-arm64

This file was deleted.

7 changes: 0 additions & 7 deletions Dockerfile.ubuntu.18.04-x64

This file was deleted.

19 changes: 14 additions & 5 deletions build.libgit2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,26 @@ set -e

LIBGIT2SHA=`cat ./nuget.package/libgit2/libgit2_hash.txt`
SHORTSHA=${LIBGIT2SHA:0:7}
OS=`uname`
ARCH=`uname -m`
PACKAGEPATH="nuget.package/runtimes"

if [[ $OS == "Darwin" ]]; then
USEHTTPS="ON"
else
USEHTTPS="OFF"
fi

rm -rf libgit2/build
mkdir libgit2/build
pushd libgit2/build

export _BINPATH=`pwd`

if [[ $RID == *arm ]]; then
export TOOLCHAIN_FILE=/nativebinaries/CMakeLists.arm.txt
fi

if [[ $RID == *arm64 ]]; then
export TOOLCHAIN_FILE=/nativebinaries/CMakeLists.arm64.txt
fi
Expand All @@ -21,18 +34,14 @@ cmake -DCMAKE_BUILD_TYPE:STRING=Release \
-DENABLE_TRACE=ON \
-DLIBGIT2_FILENAME=git2-$SHORTSHA \
-DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \
-DUSE_HTTPS=$USEHTTPS \
-DUSE_BUNDLED_ZLIB=ON \
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \
..
cmake --build .

popd

OS=`uname`
ARCH=`uname -m`

PACKAGEPATH="nuget.package/runtimes"

if [[ $RID == "" ]]; then
if [[ $ARCH == "x86_64" ]]; then
RID="unix-x64"
Expand Down