CI fix timeout error (#13134)

This commit is contained in:
Timothee Cour 2020-01-15 13:54:05 -08:00 • committed by Andreas Rumpf
commit d5f011d9e6

View file

@ -1,148 +1,153 @@
strategy: jobs:
matrix: - job: packages
Linux_amd64:
vmImage: 'ubuntu-16.04'
CPU: amd64
Linux_i386:
vmImage: 'ubuntu-16.04'
CPU: i386
OSX_amd64:
vmImage: 'macOS-10.14'
CPU: amd64
OSX_amd64_cpp:
vmImage: 'macOS-10.14'
CPU: amd64
NIM_COMPILE_TO_CPP: true
Windows_amd64:
vmImage: 'windows-2019'
CPU: amd64
Windows_amd64_pkg:
vmImage: 'windows-2019'
CPU: amd64
NIM_TEST_PACKAGES: true
pool: timeoutInMinutes: 90 # default `60` led to lots of cancelled jobs; use 0 for unlimited (may be undesirable)
vmImage: $(vmImage)
workspace: strategy:
clean: all matrix:
Linux_amd64:
vmImage: 'ubuntu-16.04'
CPU: amd64
Linux_i386:
vmImage: 'ubuntu-16.04'
CPU: i386
OSX_amd64:
vmImage: 'macOS-10.14'
CPU: amd64
OSX_amd64_cpp:
vmImage: 'macOS-10.14'
CPU: amd64
NIM_COMPILE_TO_CPP: true
Windows_amd64:
vmImage: 'windows-2019'
CPU: amd64
Windows_amd64_pkg:
vmImage: 'windows-2019'
CPU: amd64
NIM_TEST_PACKAGES: true
steps: pool:
- bash: git config --global core.autocrlf false vmImage: $(vmImage)
displayName: 'Disable auto conversion to CRLF by git (Windows-only)'
condition: eq(variables['Agent.OS'], 'Windows_NT')
- checkout: self workspace:
clean: all
- bash: git clone --depth 1 https://github.com/nim-lang/csources.git steps:
displayName: 'Checkout csources' - bash: git config --global core.autocrlf false
displayName: 'Disable auto conversion to CRLF by git (Windows-only)'
condition: eq(variables['Agent.OS'], 'Windows_NT')
- task: NodeTool@0 - checkout: self
inputs:
versionSpec: '8.x'
displayName: 'Install node.js 8.x'
- bash: | - bash: git clone --depth 1 https://github.com/nim-lang/csources.git
sudo apt-fast update -qq displayName: 'Checkout csources'
DEBIAN_FRONTEND='noninteractive' \
sudo apt-fast install --no-install-recommends -yq \
libcurl4-openssl-dev libgc-dev libsdl1.2-dev libsfml-dev valgrind libc6-dbg
displayName: 'Install dependencies (amd64 Linux)'
condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'amd64'))
- bash: | - task: NodeTool@0
sudo dpkg --add-architecture i386 inputs:
versionSpec: '8.x'
displayName: 'Install node.js 8.x'
# Downgrade llvm, libgcc and libstdc++: - bash: |
# - llvm has to be downgraded to have 32bit version installed for sfml. sudo apt-fast update -qq
# - libgcc and libstdc++ have to be downgraded as an optimization to DEBIAN_FRONTEND='noninteractive' \
# prevent the use of the toolchain ppa, which has a terrible download sudo apt-fast install --no-install-recommends -yq \
# speed. libcurl4-openssl-dev libgc-dev libsdl1.2-dev libsfml-dev valgrind libc6-dbg
cat << EOF | sudo tee /etc/apt/preferences.d/pin-to-rel displayName: 'Install dependencies (amd64 Linux)'
Package: libllvm6.0 libgcc1 libstdc++6 condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'amd64'))
Pin: origin "azure.archive.ubuntu.com"
Pin-Priority: 1001
Package: * - bash: |
Pin: release o=LP-PPA-ubuntu-toolchain-r-test sudo dpkg --add-architecture i386
Pin-Priority: 100
EOF
sudo apt-fast update -qq # Downgrade llvm, libgcc and libstdc++:
DEBIAN_FRONTEND='noninteractive' \ # - llvm has to be downgraded to have 32bit version installed for sfml.
sudo apt-fast install --no-install-recommends --allow-downgrades -yq \ # - libgcc and libstdc++ have to be downgraded as an optimization to
g++-multilib gcc-multilib libcurl4-openssl-dev:i386 libgc-dev:i386 \ # prevent the use of the toolchain ppa, which has a terrible download
libsdl1.2-dev:i386 libsfml-dev:i386 libglib2.0-dev:i386 # speed.
cat << EOF | sudo tee /etc/apt/preferences.d/pin-to-rel
Package: libllvm6.0 libgcc1 libstdc++6
Pin: origin "azure.archive.ubuntu.com"
Pin-Priority: 1001
cat << EOF > bin/gcc Package: *
#!/bin/bash Pin: release o=LP-PPA-ubuntu-toolchain-r-test
Pin-Priority: 100
EOF
exec $(which gcc) -m32 "\$@" sudo apt-fast update -qq
EOF DEBIAN_FRONTEND='noninteractive' \
cat << EOF > bin/g++ sudo apt-fast install --no-install-recommends --allow-downgrades -yq \
#!/bin/bash g++-multilib gcc-multilib libcurl4-openssl-dev:i386 libgc-dev:i386 \
libsdl1.2-dev:i386 libsfml-dev:i386 libglib2.0-dev:i386
exec $(which g++) -m32 "\$@" cat << EOF > bin/gcc
EOF #!/bin/bash
chmod 755 bin/gcc exec $(which gcc) -m32 "\$@"
chmod 755 bin/g++ EOF
cat << EOF > bin/g++
#!/bin/bash
displayName: 'Install dependencies (i386 Linux)' exec $(which g++) -m32 "\$@"
condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'i386')) EOF
- bash: brew install boehmgc make sfml chmod 755 bin/gcc
displayName: 'Install dependencies (OSX)' chmod 755 bin/g++
condition: eq(variables['Agent.OS'], 'Darwin')
- bash: | displayName: 'Install dependencies (i386 Linux)'
mkdir dist condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'i386'))
curl -L https://nim-lang.org/download/mingw64.7z -o dist/mingw64.7z
curl -L https://nim-lang.org/download/dlls.zip -o dist/dlls.zip
7z x dist/mingw64.7z -odist
7z x dist/dlls.zip -obin
echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/dist/mingw64/bin'
displayName: 'Install dependencies (Windows)' - bash: brew install boehmgc make sfml
condition: eq(variables['Agent.OS'], 'Windows_NT') displayName: 'Install dependencies (OSX)'
condition: eq(variables['Agent.OS'], 'Darwin')
- bash: echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/bin' - bash: |
displayName: 'Add build binaries to PATH' mkdir dist
curl -L https://nim-lang.org/download/mingw64.7z -o dist/mingw64.7z
curl -L https://nim-lang.org/download/dlls.zip -o dist/dlls.zip
7z x dist/mingw64.7z -odist
7z x dist/dlls.zip -obin
echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/dist/mingw64/bin'
- bash: | displayName: 'Install dependencies (Windows)'
echo 'PATH:' "$PATH" condition: eq(variables['Agent.OS'], 'Windows_NT')
echo '##[section]gcc version'
gcc -v
echo '##[section]nodejs version'
node -v
echo '##[section]make version'
make -v
displayName: 'System information'
- bash: | - bash: echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/bin'
ncpu= displayName: 'Add build binaries to PATH'
case '$(Agent.OS)' in
'Linux')
ncpu=$(nproc)
;;
'Darwin')
ncpu=$(sysctl -n hw.ncpu)
;;
'Windows_NT')
ncpu=$NUMBER_OF_PROCESSORS
;;
esac
[[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1
make -C csources -j $ncpu CC=gcc ucpu=$(CPU) - bash: |
displayName: 'Build csources' echo 'PATH:' "$PATH"
echo '##[section]gcc version'
gcc -v
echo '##[section]nodejs version'
node -v
echo '##[section]make version'
make -v
displayName: 'System information'
- bash: nim c koch - bash: |
displayName: 'Build koch' ncpu=
case '$(Agent.OS)' in
'Linux')
ncpu=$(nproc)
;;
'Darwin')
ncpu=$(sysctl -n hw.ncpu)
;;
'Windows_NT')
ncpu=$NUMBER_OF_PROCESSORS
;;
esac
[[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1
# set result to omit the "bash exited with error code '1'" message make -C csources -j $ncpu CC=gcc ucpu=$(CPU)
- bash: | displayName: 'Build csources'
./koch runCI || echo '##vso[task.complete result=Failed]'
displayName: 'Run CI' - bash: nim c koch
env: displayName: 'Build koch'
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
# set result to omit the "bash exited with error code '1'" message
- bash: |
./koch runCI || echo '##vso[task.complete result=Failed]'
displayName: 'Run CI'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)