2019-09-23 16:32:34 +00:00
|
|
|
jobs:
|
|
|
|
- job: Windows
|
|
|
|
|
2020-08-18 07:13:53 +00:00
|
|
|
timeoutInMinutes: 100
|
2020-04-18 23:25:21 +00:00
|
|
|
|
2019-09-23 16:32:34 +00:00
|
|
|
pool:
|
|
|
|
vmImage: windows-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
32-bit:
|
|
|
|
PLATFORM: x86
|
|
|
|
64-bit:
|
|
|
|
PLATFORM: x64
|
|
|
|
steps:
|
2019-10-17 13:21:45 +00:00
|
|
|
- task: CacheBeta@1
|
2019-09-23 16:32:34 +00:00
|
|
|
displayName: 'cache Nim binaries'
|
|
|
|
inputs:
|
2020-07-30 12:08:49 +00:00
|
|
|
key: NimBinaries | $(Agent.OS) | $(PLATFORM) | "$(Build.SourceBranchName)" | "v8"
|
2019-09-23 16:32:34 +00:00
|
|
|
path: NimBinaries
|
|
|
|
|
2019-10-17 13:21:45 +00:00
|
|
|
- task: CacheBeta@1
|
2021-10-12 11:36:52 +00:00
|
|
|
displayName: 'cache scenario test fixtures'
|
2019-09-23 16:32:34 +00:00
|
|
|
inputs:
|
2020-07-03 10:04:04 +00:00
|
|
|
key: jsonTestsCacheV1
|
2019-09-23 16:32:34 +00:00
|
|
|
path: jsonTestsCache
|
|
|
|
|
2019-10-17 13:21:45 +00:00
|
|
|
- task: CacheBeta@1
|
2019-09-23 16:32:34 +00:00
|
|
|
displayName: 'cache MinGW-w64'
|
|
|
|
inputs:
|
2019-10-17 13:21:45 +00:00
|
|
|
key: mingwCache | 8_1_0 | $(PLATFORM)
|
2019-09-23 16:32:34 +00:00
|
|
|
path: mingwCache
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
|
|
|
|
displayName: 'long path support'
|
|
|
|
|
|
|
|
- bash: |
|
|
|
|
set -e
|
2020-01-28 10:20:55 +00:00
|
|
|
# https://developercommunity.visualstudio.com/content/problem/891929/windows-2019-cygheap-base-mismatch-detected-git-ba.html
|
|
|
|
export PATH="/mingw64/bin:/usr/bin:$PATH"
|
2019-10-17 13:21:45 +00:00
|
|
|
echo "Installing MinGW-w64"
|
2019-09-23 16:32:34 +00:00
|
|
|
if [[ $PLATFORM == "x86" ]]; then
|
|
|
|
MINGW_FILE="i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z"
|
2019-10-17 13:21:45 +00:00
|
|
|
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"
|
2019-09-23 16:32:34 +00:00
|
|
|
fi
|
2019-10-17 13:21:45 +00:00
|
|
|
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"
|
2019-09-23 16:32:34 +00:00
|
|
|
git config --global core.longpaths true
|
2020-01-28 10:20:55 +00:00
|
|
|
git config --global core.autocrlf false
|
2020-02-11 23:36:54 +00:00
|
|
|
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinaries update
|
2020-04-04 17:22:20 +00:00
|
|
|
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} LOG_LEVEL=TRACE
|
2020-06-14 02:25:19 +00:00
|
|
|
if [[ $PLATFORM == "x64" ]]; then
|
|
|
|
# everything builds more slowly on 32-bit, since there's no libbacktrace support
|
2020-11-07 18:00:31 +00:00
|
|
|
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} LOG_LEVEL=TRACE NIMFLAGS="-d:testnet_servers_image" nimbus_beacon_node
|
2020-06-14 02:25:19 +00:00
|
|
|
fi
|
2020-11-07 18:00:31 +00:00
|
|
|
file build/nimbus_beacon_node
|
2020-04-08 16:58:25 +00:00
|
|
|
# fail fast
|
|
|
|
export NIMTEST_ABORT_ON_ERROR=1
|
2021-10-12 11:36:52 +00:00
|
|
|
scripts/setup_scenarios.sh jsonTestsCache
|
2020-04-04 14:01:39 +00:00
|
|
|
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} DISABLE_TEST_FIXTURES_SCRIPT=1 test
|
2019-09-23 16:32:34 +00:00
|
|
|
displayName: 'build and test'
|
2020-06-14 02:25:19 +00:00
|
|
|
|