Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
enable CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Eirik Tsarpalis committed Feb 28, 2018
1 parent b68fbf0 commit 770f5c1
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .paket/Paket.Restore.targets
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
</PropertyGroup>

<!-- If shasum and awk exist get the hashes -->
<Exec Condition=" '$(PaketRestoreCachedHasher)' != '' " Command="$(PaketRestoreCachedHasher)" ConsoleToMSBuild='true'>
<Exec StandardOutputImportance="Low" Condition=" '$(PaketRestoreCachedHasher)' != '' " Command="$(PaketRestoreCachedHasher)" ConsoleToMSBuild='true'>
<Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreCachedHash" />
</Exec>
<Exec Condition=" '$(PaketRestoreLockFileHasher)' != '' " Command="$(PaketRestoreLockFileHasher)" ConsoleToMSBuild='true'>
<Exec StandardOutputImportance="Low" Condition=" '$(PaketRestoreLockFileHasher)' != '' " Command="$(PaketRestoreLockFileHasher)" ConsoleToMSBuild='true'>
<Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreLockFileHash" />
</Exec>

Expand Down
26 changes: 16 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
language: csharp
solution: kafunk.sln
sudo: false # use the new container-based Travis infrastructure

before_install:
- chmod +x build.sh

install:
- nuget restore kafunk.sln
- nuget install NUnit.Runners -OutputDirectory testrunner
matrix:
include:
- os: linux # Ubuntu 14.04
dist: trusty
sudo: false
mono: latest
dotnet: 2.0.0
- os: osx # OSX 10.12
osx_image: xcode9.1
dotnet: 2.0.0
mono: latest
sudo: false

script:
- dotnet --info
- ./build.sh All
- xbuild /p:Configuration=Release kafunk.sln
- mono ./testrunner/NUnit.Runners.*/tools/nunit-console.exe ./tests/kafunk.Tests/bin/Release/Kafunk.Tests.dll

branches:
except:
- gh-pages
5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
environment:
CLI_VERSION: 2.0.0
image: Visual Studio 2017
init:
- git config --global core.autocrlf input
build_script:
Expand All @@ -6,4 +9,4 @@ test: off
version: 0.0.1.{build}
artifacts:
- path: bin
name: bin
name: bin
94 changes: 76 additions & 18 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -1,18 +1,76 @@
@echo off
cls

.paket\paket.bootstrapper.exe
if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
if errorlevel 1 (
exit /b %errorlevel%
)

IF NOT EXIST build.fsx (
.paket\paket.exe update
packages\build\FAKE\tools\FAKE.exe init.fsx
)
packages\build\FAKE\tools\FAKE.exe build.fsx %*
#!/usr/bin/env bash

set -eu

cd `dirname $0`

PAKET_BOOTSTRAPPER_EXE=.paket/paket.bootstrapper.exe
PAKET_EXE=.paket/paket.exe
FAKE_EXE=packages/build/FAKE/tools/FAKE.exe

FSIARGS=""
FSIARGS2=""
OS=${OS:-"unknown"}
if [ "$OS" != "Windows_NT" ]
then
# Can't use FSIARGS="--fsiargs -d:MONO" in zsh, so split it up
# (Can't use arrays since dash can't handle them)
FSIARGS="--fsiargs"
FSIARGS2="-d:MONO"
fi

run() {
if [ "$OS" != "Windows_NT" ]
then
mono "$@"
else
"$@"
fi
}

yesno() {
# NOTE: Defaults to NO
read -p "$1 [y/N] " ynresult
case "$ynresult" in
[yY]*) true ;;
*) false ;;
esac
}

set +e
run $PAKET_BOOTSTRAPPER_EXE
bootstrapper_exitcode=$?
set -e

if [ "$OS" != "Windows_NT" ] &&
[ $bootstrapper_exitcode -ne 0 ] &&
[ $(certmgr -list -c Trust | grep X.509 | wc -l) -le 1 ] &&
[ $(certmgr -list -c -m Trust | grep X.509 | wc -l) -le 1 ]
then
echo "Your Mono installation has no trusted SSL root certificates set up."
echo "This may result in the Paket bootstrapper failing to download Paket"
echo "because Github's SSL certificate can't be verified. One way to fix"
echo "this issue would be to download the list of SSL root certificates"
echo "from the Mozilla project by running the following command:"
echo ""
echo " mozroots --import --sync"
echo ""
echo "This will import over 100 SSL root certificates into your Mono"
echo "certificate repository."
echo ""
if yesno "Run 'mozroots --import --sync' now?"
then
mozroots --import --sync
else
echo "Attempting to continue without running mozroots. This might fail."
fi
# Re-run bootstrapper whether or not the user ran mozroots, because maybe
# they fixed the problem in a separate terminal window.
run $PAKET_BOOTSTRAPPER_EXE
fi

run $PAKET_EXE restore

[ ! -e build.fsx ] && run $PAKET_EXE update
[ ! -e build.fsx ] && run $FAKE_EXE init.fsx
run $FAKE_EXE "$@" $FSIARGS $FSIARGS2 build.fsx
11 changes: 9 additions & 2 deletions kafunk.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
# Visual Studio 15
VisualStudioVersion = 15.0.27421.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{63297B98-5CED-492C-A5B7-A5B4F73CF142}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -14,7 +14,11 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "kafunk", "src\kafunk\kafunk
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{BF60BC93-E09B-4E5F-9D85-95A519479D54}"
ProjectSection(SolutionItems) = preProject
.travis.yml = .travis.yml
appveyor.yml = appveyor.yml
build.cmd = build.cmd
build.fsx = build.fsx
build.sh = build.sh
LICENSE.txt = LICENSE.txt
README.md = README.md
RELEASE_NOTES.md = RELEASE_NOTES.md
Expand Down Expand Up @@ -60,4 +64,7 @@ Global
{8E6D5255-776D-4B61-85F9-73C37AA1FB9A} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}
{757D24EB-9619-4959-8F5A-658EB232F9A4} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7300E309-75AB-4775-B622-084C06C924D5}
EndGlobalSection
EndGlobal

0 comments on commit 770f5c1

Please sign in to comment.