Travis: ARM64 build

Azure changes:

- use newer caching task
- add the branch name to cache keys
- install the 64-bit MinGW-w64 ourselves

Homebrew fix
This commit is contained in:
Ștefan Talpalaru 2019-10-17 15:21:45 +02:00
parent f91918f1b6
commit 49b67f58fc
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
4 changed files with 48 additions and 24 deletions

View File

@ -1,5 +1,7 @@
language: go
dist: bionic
# https://docs.travis-ci.com/user/caching/
cache:
directories:
@ -20,10 +22,25 @@ go:
matrix:
include:
- os: linux
arch: amd64
sudo: required
env:
- NPROC=2
before_install:
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
- os: linux
arch: arm64
sudo: required
env:
- NPROC=6 # Worth trying more than 2 parallel jobs: https://travis-ci.community/t/no-cache-support-on-arm64/5416/8
# (also used to get a different cache key than the amd64 one)
before_install:
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
- sudo apt-get -q update
- sudo apt-get install -y libpcre3-dev git-lfs
- os: osx
env:
- NPROC=2
before_install:
- launchctl setenv LIBRARY_PATH /usr/local/lib # for RocksDB
@ -36,7 +53,7 @@ install:
script:
- set -e # fail fast
- make -j2 update # to allow a newer Nim version to be detected
- make -j2
- make -j2 DISABLE_LFS_SCRIPT=1 test
- make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" update # to allow a newer Nim version to be detected
- make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}"
- make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" DISABLE_LFS_SCRIPT=1 test

View File

@ -11,30 +11,29 @@ jobs:
64-bit:
PLATFORM: x64
steps:
- task: CacheBeta@0
- task: CacheBeta@1
displayName: 'cache Nim binaries'
inputs:
key: NimBinaries | $(Agent.OS) | $(PLATFORM)
key: NimBinaries | $(Agent.OS) | $(PLATFORM) | $(Build.SourceBranchName)
path: NimBinaries
- task: CacheBeta@0
- task: CacheBeta@1
displayName: 'cache p2pd binaries'
inputs:
key: p2pdCache | $(Agent.OS) | $(PLATFORM)
key: p2pdCache | $(Agent.OS) | $(PLATFORM) | $(Build.SourceBranchName)
path: p2pdCache
- task: CacheBeta@0
- task: CacheBeta@1
displayName: 'cache LFS JSON fixtures'
inputs:
key: jsonTestsCache
path: jsonTestsCache
- task: CacheBeta@0
- task: CacheBeta@1
displayName: 'cache MinGW-w64'
inputs:
key: mingwCache
key: mingwCache | 8_1_0 | $(PLATFORM)
path: mingwCache
condition: eq(variables['PLATFORM'], 'x86')
- powershell: |
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
@ -42,20 +41,27 @@ jobs:
- bash: |
set -e
echo "Installing MinGW-w64"
if [[ $PLATFORM == "x86" ]]; then
echo "Installing 32-bit MinGW-w64"
mkdir -p mingwCache
cd mingwCache
MINGW_FILE="i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z"
if [[ ! -e "$MINGW_FILE" ]]; then
rm -f *.7z
curl -OLsS "https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/${MINGW_FILE}"
fi
7z x -y -bd "$MINGW_FILE" >/dev/null
mv mingw32 /C/
cd ..
export PATH="/C/mingw32/bin:$PATH"
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
export GIT_LFS_SKIP_SMUDGE=1

View File

@ -20,5 +20,6 @@
--threads:on
--opt:speed
--excessiveStackTrace:on
-d:metrics # enable metric collection
# enable metric collection
-d:metrics

View File

@ -74,7 +74,7 @@ process_subdir() {
fi
if [[ "${UPDATE_CACHE}" == "1" ]]; then
if [[ "${ON_MACOS}" == "1" ]]; then
brew install git-lfs # this takes almost 5 minutes on Travis, so only run it if needed
HOMEBREW_NO_AUTO_UPDATE=1 brew install git-lfs # this takes almost 5 minutes on Travis, so only run it if needed
fi
download_lfs_files "$LFS_DIR"
echo "Updating the cache."