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
3b6281fa
Commit
3b6281fa
authored
Jul 14, 2018
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci: Windows PowerShell build script
parent
ce798b25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
ci/build.ps1
+50
-0
No files found.
ci/build.ps1
0 → 100644
View file @
3b6281fa
Set
-StrictMode -Version Latest
$ErrorActionPreference
=
"Stop"
$PSDefaultParameterValues
[
'*:ErrorAction'
]
=
'Stop'
if
(
$Env
:SOURCE_DIR
)
{
$SourceDirectory
=
$Env
:SOURCE_DIR
}
else
{
$SourceDirectory
=
Split-Path
(
Split-Path
$MyInvocation
.MyCommand.Path -Parent
)
-Parent
}
$BuildDirectory
=
$(
Get-Location
)
.Path
Write-Host
"Source directory:
${
SourceDirectory
}
"
Write-Host
"Build directory:
${
BuildDirectory
}
"
Write-Host
""
Write-Host
"Operating system version:"
Get-CimInstance
Win32_OperatingSystem |
Select-Object
Caption, Version, ServicePackMajorVersion, BuildNumber, OSArchitecture |
Format-List
Write-Host
"PATH:"
Write-Host
"
${
Env
:PATH
}
"
Write-Host
""
Write-Host
"##############################################################################"
Write-Host
"## Configuring build environment"
Write-Host
"##############################################################################"
cmake
$SourceDirectory
-DBUILD_EXAMPLES
=
ON
${
Env
:CMAKE_OPTIONS
}
if
(
$LastExitCode
-ne 0
)
{
[
Environment]::Exit
(
$LastExitCode
)
}
Write-Host
""
Write-Host
"##############################################################################"
Write-Host
"## Building libgit2"
Write-Host
"##############################################################################"
cmake --build
.
if
(
$LastExitCode
-ne 0
)
{
[
Environment]::Exit
(
$LastExitCode
)
}
if
(
$Env
:SKIP_TESTS
)
{
exit
}
Write-Host
""
Write-Host
"#######################################################################"
Write-Host
"## Running (offline) tests"
Write-Host
"#######################################################################"
ctest -V -R offline
if
(
$LastExitCode
-ne 0
)
{
[
Environment]::Exit
(
$LastExitCode
)
}
Write-Host
""
Write-Host
"#######################################################################"
Write-Host
"## Running (online) tests"
Write-Host
"#######################################################################"
ctest -V -R online
if
(
$LastExitCode
-ne 0
)
{
[
Environment]::Exit
(
$LastExitCode
)
}
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