Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
959482e1
Commit
959482e1
authored
Mar 09, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2946 from tkelman/appveyor-mingw
RFC: add mingw to appveyor matrix
parents
d77a4f94
78c34af0
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
74 additions
and
8 deletions
+74
-8
CMakeLists.txt
+5
-1
appveyor.yml
+23
-2
script/appveyor-mingw.sh
+23
-0
script/cibuild.sh
+10
-0
script/install-deps-linux.sh
+1
-1
script/install-deps-osx.sh
+1
-1
src/win32/mingw-compat.h
+7
-0
src/win32/msvc-compat.h
+3
-0
src/win32/posix.h
+0
-2
src/win32/posix_w32.c
+1
-1
No files found.
CMakeLists.txt
View file @
959482e1
...
@@ -493,7 +493,11 @@ IF (BUILD_CLAR)
...
@@ -493,7 +493,11 @@ IF (BUILD_CLAR)
ENDIF ()
ENDIF ()
ENABLE_TESTING()
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 ()
ENDIF ()
IF (TAGS)
IF (TAGS)
...
...
appveyor.yml
View file @
959482e1
...
@@ -11,11 +11,32 @@ environment:
...
@@ -11,11 +11,32 @@ environment:
ARCH
:
32
ARCH
:
32
-
GENERATOR
:
"
Visual
Studio
11
Win64"
-
GENERATOR
:
"
Visual
Studio
11
Win64"
ARCH
:
64
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
:
build_script
:
-
ps
:
|
-
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
mkdir build
cd build
cd build
cmake -D ENABLE_TRACE=ON -D BUILD_CLAR=ON .. -G"$env:GENERATOR"
if ($env:GENERATOR -ne "MSYS Makefiles") {
cmake --build . --config RelWithDebInfo
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
:
test_script
:
-
ps
:
ctest -V .
-
ps
:
ctest -V .
script/appveyor-mingw.sh
0 → 100755
View file @
959482e1
#!/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
script/cibuild.sh
View file @
959482e1
#!/bin/sh
#!/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
"
]
;
if
[
-n
"
$COVERITY
"
]
;
then
then
./script/coverity.sh
;
./script/coverity.sh
;
...
...
script/install-deps-linux.sh
View file @
959482e1
...
@@ -3,4 +3,4 @@
...
@@ -3,4 +3,4 @@
set
-x
set
-x
sudo
apt-get
-qq
update
&&
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
script/install-deps-osx.sh
View file @
959482e1
...
@@ -2,4 +2,4 @@
...
@@ -2,4 +2,4 @@
set
-x
set
-x
brew install libssh2 cmake
brew install libssh2 cmake
jq
src/win32/mingw-compat.h
View file @
959482e1
...
@@ -17,6 +17,13 @@
...
@@ -17,6 +17,13 @@
#define stat _stati64
#define stat _stati64
#endif
#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
#endif
/* INCLUDE_mingw_compat__ */
#endif
/* INCLUDE_mingw_compat__ */
src/win32/msvc-compat.h
View file @
959482e1
...
@@ -15,6 +15,9 @@
...
@@ -15,6 +15,9 @@
typedef
unsigned
short
mode_t
;
typedef
unsigned
short
mode_t
;
typedef
SSIZE_T
ssize_t
;
typedef
SSIZE_T
ssize_t
;
#define strcasecmp(s1, s2) _stricmp(s1, s2)
#define strncasecmp(s1, s2, c) _strnicmp(s1, s2, c)
#endif
#endif
#define GIT_STDLIB_CALL __cdecl
#define GIT_STDLIB_CALL __cdecl
...
...
src/win32/posix.h
View file @
959482e1
...
@@ -32,8 +32,6 @@ extern int p_recv(GIT_SOCKET socket, void *buffer, size_t length, int flags);
...
@@ -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_send
(
GIT_SOCKET
socket
,
const
void
*
buffer
,
size_t
length
,
int
flags
);
extern
int
p_inet_pton
(
int
af
,
const
char
*
src
,
void
*
dst
);
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_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_snprintf
(
char
*
buffer
,
size_t
count
,
const
char
*
format
,
...)
GIT_FORMAT_PRINTF
(
3
,
4
);
extern
int
p_mkstemp
(
char
*
tmp_path
);
extern
int
p_mkstemp
(
char
*
tmp_path
);
...
...
src/win32/posix_w32.c
View file @
959482e1
...
@@ -55,7 +55,7 @@ int p_ftruncate(int fd, git_off_t size)
...
@@ -55,7 +55,7 @@ int p_ftruncate(int fd, git_off_t size)
return
-
1
;
return
-
1
;
}
}
#if !defined(__MINGW32__)
#if !defined(__MINGW32__)
|| defined(MINGW_HAS_SECURE_API)
return
((
_chsize_s
(
fd
,
size
)
==
0
)
?
0
:
-
1
);
return
((
_chsize_s
(
fd
,
size
)
==
0
)
?
0
:
-
1
);
#else
#else
/* TODO MINGW32 Find a replacement for _chsize() that handles big files. */
/* TODO MINGW32 Find a replacement for _chsize() that handles big files. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment