mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-05 14:37:37 +00:00
Merge pull request #2946 from tkelman/appveyor-mingw
RFC: add mingw to appveyor matrix
This commit is contained in:
commit
959482e104
@ -493,7 +493,11 @@ IF (BUILD_CLAR)
|
||||
ENDIF ()
|
||||
|
||||
ENABLE_TESTING()
|
||||
ADD_TEST(libgit2_clar libgit2_clar -ionline)
|
||||
IF (WINHTTP OR OPENSSL_FOUND)
|
||||
ADD_TEST(libgit2_clar libgit2_clar -ionline)
|
||||
ELSE ()
|
||||
ADD_TEST(libgit2_clar libgit2_clar -v)
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
|
||||
IF (TAGS)
|
||||
|
25
appveyor.yml
25
appveyor.yml
@ -11,11 +11,32 @@ environment:
|
||||
ARCH: 32
|
||||
- GENERATOR: "Visual Studio 11 Win64"
|
||||
ARCH: 64
|
||||
- GENERATOR: "MSYS Makefiles"
|
||||
ARCH: 32
|
||||
- GENERATOR: "MSYS Makefiles"
|
||||
ARCH: i686 # this is for 32-bit MinGW-w64
|
||||
- GENERATOR: "MSYS Makefiles"
|
||||
ARCH: 64
|
||||
matrix:
|
||||
allow_failures:
|
||||
- GENERATOR: "MSYS Makefiles"
|
||||
ARCH: 32
|
||||
cache:
|
||||
- i686-4.9.2-release-win32-sjlj-rt_v3-rev1.7z
|
||||
- x86_64-4.9.2-release-win32-seh-rt_v3-rev1.7z
|
||||
build_script:
|
||||
- ps: |
|
||||
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
|
||||
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
|
||||
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
|
||||
throw "There are newer queued builds for this pull request, failing early." }
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -D ENABLE_TRACE=ON -D BUILD_CLAR=ON .. -G"$env:GENERATOR"
|
||||
cmake --build . --config RelWithDebInfo
|
||||
if ($env:GENERATOR -ne "MSYS Makefiles") {
|
||||
cmake -D ENABLE_TRACE=ON -D BUILD_CLAR=ON .. -G"$env:GENERATOR"
|
||||
cmake --build . --config RelWithDebInfo
|
||||
}
|
||||
- cmd: |
|
||||
if "%GENERATOR%"=="MSYS Makefiles" (C:\MinGW\msys\1.0\bin\sh --login /c/projects/libgit2/script/appveyor-mingw.sh)
|
||||
test_script:
|
||||
- ps: ctest -V .
|
||||
|
23
script/appveyor-mingw.sh
Executable file
23
script/appveyor-mingw.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
cd `dirname "$0"`/..
|
||||
if [ "$ARCH" = "32" ]; then
|
||||
echo 'C:\MinGW\ /MinGW' > /etc/fstab
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
f=i686-4.9.2-release-win32-sjlj-rt_v3-rev1.7z
|
||||
if ! [ -e $f ]; then
|
||||
curl -LsSO http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/sjlj/$f
|
||||
fi
|
||||
7z x $f > /dev/null
|
||||
mv mingw32 /MinGW
|
||||
else
|
||||
f=x86_64-4.9.2-release-win32-seh-rt_v3-rev1.7z
|
||||
if ! [ -e $f ]; then
|
||||
curl -LsSO http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/$f
|
||||
fi
|
||||
7z x $f > /dev/null
|
||||
mv mingw64 /MinGW
|
||||
fi
|
||||
cd build
|
||||
cmake -D ENABLE_TRACE=ON -D BUILD_CLAR=ON .. -G"$GENERATOR"
|
||||
cmake --build . --config RelWithDebInfo
|
@ -1,5 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Fail fast for superseded builds to PR's
|
||||
if ! [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
||||
if ! [ \"$TRAVIS_BUILD_NUMBER\" = $(curl -H "Accept: application/vnd.travis-ci.2+json" \
|
||||
https://api.travis-ci.org/repos/libgit2/libgit2/builds?event_type=pull_request | \
|
||||
jq ".builds | map(select(.pull_request_number == $TRAVIS_PULL_REQUEST))[0].number") ]; then
|
||||
echo "There are newer queued builds for this pull request, failing early."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$COVERITY" ];
|
||||
then
|
||||
./script/coverity.sh;
|
||||
|
@ -3,4 +3,4 @@
|
||||
set -x
|
||||
|
||||
sudo apt-get -qq update &&
|
||||
sudo apt-get -qq install cmake libssh2-1-dev openssh-client openssh-server
|
||||
sudo apt-get -qq install cmake libssh2-1-dev openssh-client openssh-server jq
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
set -x
|
||||
|
||||
brew install libssh2 cmake
|
||||
brew install libssh2 cmake jq
|
||||
|
@ -17,6 +17,13 @@
|
||||
#define stat _stati64
|
||||
#endif
|
||||
|
||||
#if _WIN32_WINNT < 0x0600 && !defined(__MINGW64_VERSION_MAJOR)
|
||||
#undef MemoryBarrier
|
||||
void __mingworg_MemoryBarrier(void);
|
||||
#define MemoryBarrier __mingworg_MemoryBarrier
|
||||
#define VOLUME_NAME_DOS 0x0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* INCLUDE_mingw_compat__ */
|
||||
|
@ -15,6 +15,9 @@
|
||||
typedef unsigned short mode_t;
|
||||
typedef SSIZE_T ssize_t;
|
||||
|
||||
#define strcasecmp(s1, s2) _stricmp(s1, s2)
|
||||
#define strncasecmp(s1, s2, c) _strnicmp(s1, s2, c)
|
||||
|
||||
#endif
|
||||
|
||||
#define GIT_STDLIB_CALL __cdecl
|
||||
|
@ -32,8 +32,6 @@ extern int p_recv(GIT_SOCKET socket, void *buffer, size_t length, int flags);
|
||||
extern int p_send(GIT_SOCKET socket, const void *buffer, size_t length, int flags);
|
||||
extern int p_inet_pton(int af, const char* src, void* dst);
|
||||
|
||||
#define strcasecmp(s1, s2) _stricmp(s1, s2)
|
||||
#define strncasecmp(s1, s2, c) _strnicmp(s1, s2, c)
|
||||
extern int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr);
|
||||
extern int p_snprintf(char *buffer, size_t count, const char *format, ...) GIT_FORMAT_PRINTF(3, 4);
|
||||
extern int p_mkstemp(char *tmp_path);
|
||||
|
@ -55,7 +55,7 @@ int p_ftruncate(int fd, git_off_t size)
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if !defined(__MINGW32__)
|
||||
#if !defined(__MINGW32__) || defined(MINGW_HAS_SECURE_API)
|
||||
return ((_chsize_s(fd, size) == 0) ? 0 : -1);
|
||||
#else
|
||||
/* TODO MINGW32 Find a replacement for _chsize() that handles big files. */
|
||||
|
Loading…
Reference in New Issue
Block a user