git-lfs/script/build-git
brian m. carlson c328208062
Switch CI to use GitHub Actions
Currently, we have three different CI systems that handle our CI: Travis
for Linux, CircleCI for macOS, and AppVeyor for Windows.  This results
in widely varying performance across systems and the need to maintain
code that works differently across different CI systems.

In addition, we'd like to use GitHub Actions to automate the release
process, so it makes sense to use it for CI as well.  Switch over by
adding a CI workflow that runs our existing jobs.  Ensure that we filter
out the environment variables that GitHub Actions provides, since they
will cause tests that run "git lfs env" to fail.

Add a script for those jobs where we build a custom Git and install the
appropriate dependencies.  In the cibuild script, hoist the Windows
handling to the top, set a specific environment variable for us to
remember that we're on Windows, and then disable locking, which fails on
Windows and causes the testsuite to abort.  These same environment
variables were set for AppVeyor and are also needed on Windows
development systems.
2019-09-09 14:30:55 +00:00

27 lines
562 B
Bash
Executable File

#!/bin/sh -ex
DIR="$1"
case $(uname -s) in
Darwin)
brew install curl zlib pcre2 gettext openssl
brew link --force zlib pcre2 gettext openssl;;
Linux)
export DEBIAN_FRONTEND=noninteractive
sed -e 's/^deb/deb-src/' /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/src.list
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get -y build-dep git;;
esac
cd "$DIR"
printf "%s\n" \
"NO_OPENSSL=YesPlease" \
"prefix=/usr/local" \
> config.mak
make -j2
sudo make install
echo "Git version:"
git --version