add azure-pipelines.yml

- remove redundant flags from nimbus.nimble
- clean up .appveyor.yml comments
This commit is contained in:
Ștefan Talpalaru 2020-04-16 00:34:07 +02:00
parent a783b096fe
commit 1694f7097f
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
3 changed files with 76 additions and 4 deletions

View File

@ -44,9 +44,8 @@ test_script:
- IF "%PLATFORM%" == "x64" mingw32-make -j2 test-reproducibility
# Disable libnimbus builds until https://github.com/nim-lang/Nim/issues/12759 is fixed.
# Wrapper builds could then also get activated instead but need some rework for Windows.
# The "go-checks" target fails in AppVeyor, for some reason; easier to disable than to debug.
# - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_GO_CHECKS=1 libnimbus.so
# - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_GO_CHECKS=1 libnimbus.a
# - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% libnimbus.so
# - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% libnimbus.a
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% wakusim
deploy: off

73
azure-pipelines.yml Normal file
View File

@ -0,0 +1,73 @@
jobs:
- job: Windows
pool:
vmImage: windows-latest
strategy:
matrix:
32-bit:
PLATFORM: x86
64-bit:
PLATFORM: x64
steps:
- task: CacheBeta@1
displayName: 'cache Nim binaries'
inputs:
key: NimBinaries | $(Agent.OS) | $(PLATFORM) | "$(Build.SourceBranchName)" | "v4"
path: NimBinaries
- task: CacheBeta@1
displayName: 'cache MinGW-w64'
inputs:
key: mingwCache | 8_1_0 | $(PLATFORM)
path: mingwCache
- powershell: |
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
displayName: 'long path support'
- bash: |
set -e
# https://developercommunity.visualstudio.com/content/problem/891929/windows-2019-cygheap-base-mismatch-detected-git-ba.html
#export PATH="/mingw64/bin:/usr/bin:$PATH"
echo "Installing MinGW-w64"
if [[ $PLATFORM == "x86" ]]; then
MINGW_FILE="i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z"
MINGW_URL="https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/${MINGW_FILE}"
MINGW_DIR="mingw32"
else
MINGW_FILE="x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z"
MINGW_URL="https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/${MINGW_FILE}"
MINGW_DIR="mingw64"
fi
mkdir -p mingwCache
cd mingwCache
if [[ ! -e "$MINGW_FILE" ]]; then
rm -f *.7z
curl -OLsS "$MINGW_URL"
fi
7z x -y -bd "$MINGW_FILE" >/dev/null
mkdir -p /c/custom
mv "$MINGW_DIR" /c/custom/
cd ..
export PATH="/c/custom/${MINGW_DIR}/bin:$PATH"
echo "Fetching submodules"
git config --global core.longpaths true
git config --global core.autocrlf false
git submodule --quiet update --init --recursive
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinaries update
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} fetch-dlls
# fail fast
export NIMTEST_ABORT_ON_ERROR=1
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} test
if [[ $PLATFORM == "x86" ]]; then
mingw32-make -j2 test-reproducibility
fi
# Disable libnimbus builds until https://github.com/nim-lang/Nim/issues/12759 is fixed.
# Wrapper builds could then also get activated instead but need some rework for Windows.
# mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} libnimbus.so
# mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} libnimbus.a
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} wakusim
displayName: 'build and test'

View File

@ -27,7 +27,7 @@ proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
var extra_params = params
for i in 2..<paramCount():
extra_params &= " " & paramStr(i)
exec "nim " & lang & " --out:build/" & name & " -d:release --import:libbacktrace " & extra_params & " " & srcDir & name & ".nim"
exec "nim " & lang & " --out:build/" & name & " " & extra_params & " " & srcDir & name & ".nim"
proc test(name: string, lang = "c") =
buildBinary name, "tests/", "-d:chronicles_log_level=ERROR"