nimbus-eth2/azure-pipelines.yml

75 lines
2.6 KiB
YAML
Raw Normal View History

2019-09-23 16:32:34 +00:00
jobs:
- job: Windows
pool:
vmImage: windows-latest
strategy:
matrix:
32-bit:
PLATFORM: x86
64-bit:
PLATFORM: x64
steps:
- task: CacheBeta@1
2019-09-23 16:32:34 +00:00
displayName: 'cache Nim binaries'
inputs:
key: NimBinaries | $(Agent.OS) | $(PLATFORM) | "$(Build.SourceBranchName)"
2019-09-23 16:32:34 +00:00
path: NimBinaries
- task: CacheBeta@1
2019-09-23 16:32:34 +00:00
displayName: 'cache p2pd binaries'
inputs:
key: p2pdCache | $(Agent.OS) | $(PLATFORM) | "$(Build.SourceBranchName)"
2019-09-23 16:32:34 +00:00
path: p2pdCache
- task: CacheBeta@1
2019-11-22 13:21:16 +00:00
displayName: 'cache official test fixtures'
2019-09-23 16:32:34 +00:00
inputs:
key: jsonTestsCache
path: jsonTestsCache
- task: CacheBeta@1
2019-09-23 16:32:34 +00:00
displayName: 'cache MinGW-w64'
inputs:
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
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"
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
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
echo "Fetching submodules"
git config --global core.longpaths true
git submodule --quiet update --init --recursive
scripts/setup_official_tests.sh jsonTestsCache
2019-09-23 16:32:34 +00:00
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinaries update
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} fetch-dlls
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} P2PD_CACHE=p2pdCache
file build/beacon_node
2019-11-22 13:21:16 +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'