diff options
| author | lhchavez <[email protected]> | 2020-02-22 23:07:08 +0000 |
|---|---|---|
| committer | lhchavez <[email protected]> | 2020-02-22 18:21:38 -0800 |
| commit | 26edffd5f57618d2927926fde4c4ac1fcba5d84a (patch) | |
| tree | 94f5e540a09001b7733e3fcfa64da48f00e2e068 /Makefile | |
| parent | 419bac9075cd0967b09f4e0f9884a1d87298c2e3 (diff) | |
Update CI configuration
This change:
* Updates the GitHub actions so that they run different commands for the
dynamic and static flavors of libgit2.
* Updates the .travis.yml file so that it does roughly the same as the
GitHub actions.
* Adds the release-* branches to the CI configurations.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 47 |
1 files changed, 41 insertions, 6 deletions
@@ -1,18 +1,53 @@ default: test -test: build-libgit2 +# System library +# ============== +# This uses whatever version of libgit2 can be found in the system. +test: go run script/check-MakeGitError-thread-lock.go go test --count=1 ./... -install: build-libgit2 +install: go install ./... -build-libgit2: +# Bundled dynamic library +# ======================= +# In order to avoid having to manipulate `git_dynamic.go`, which would prevent +# the system-wide libgit2.so from being used in a sort of ergonomic way, this +# instead moves the complexity of overriding the paths so that the built +# libraries can be found by the build and tests. +.PHONY: build-libgit2-dynamic +build-libgit2-dynamic: + ./script/build-libgit2-dynamic.sh + +dynamic-build/install/lib/libgit2.so: + ./script/build-libgit2-dynamic.sh + +test-dynamic: dynamic-build/install/lib/libgit2.so + PKG_CONFIG_PATH=dynamic-build/install/lib/pkgconfig \ + go run script/check-MakeGitError-thread-lock.go + PKG_CONFIG_PATH=dynamic-build/install/lib/pkgconfig \ + LD_LIBRARY_PATH=dynamic-build/install/lib \ + go test --count=1 ./... + +install-dynamic: dynamic-build/install/lib/libgit2.so + PKG_CONFIG_PATH=dynamic-build/install/lib/pkgconfig \ + go install ./... + +# Bundled static library +# ====================== +# This is mostly used in tests, but can also be used to provide a +# statically-linked library with the bundled version of libgit2. +.PHONY: build-libgit2-static +build-libgit2-static: ./script/build-libgit2-static.sh -install-static: build-libgit2 - go install --tags "static" ./... +static-build/install/lib/libgit2.a: + ./script/build-libgit2-static.sh -test-static: build-libgit2 +test-static: static-build/install/lib/libgit2.a go run script/check-MakeGitError-thread-lock.go go test --count=1 --tags "static" ./... + +install-static: static-build/install/lib/libgit2.a + go install --tags "static" ./... |
