From 7961d8b8b00e8585a1a6294a707b8a87d801bca3 Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 14:39:18 -0500 Subject: [PATCH 01/16] azure-pipelines: remove 32bit Linux CI We are gonna add it back later. --- azure-pipelines.yml | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f65f8ca11e479..aeaf0dde26ce4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,11 +17,6 @@ jobs: Linux_amd64: vmImage: 'ubuntu-16.04' CPU: amd64 - # Linux_i386: - # # bug #17325: fails on 'ubuntu-16.04' because it now errors with: - # # g++-multilib : Depends: gcc-multilib (>= 4:5.3.1-1ubuntu1) but it is not going to be installed - # vmImage: 'ubuntu-18.04' - # CPU: i386 OSX_amd64: vmImage: 'macOS-10.15' CPU: amd64 @@ -75,46 +70,6 @@ jobs: displayName: 'Install dependencies (amd64 Linux)' condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'amd64')) - - bash: | - set -e - . ci/funs.sh - echo_run sudo dpkg --add-architecture i386 - # Downgrade llvm: - # - llvm has to be downgraded to have 32bit version installed for sfml. - - cat << EOF | sudo tee /etc/apt/preferences.d/pin-to-rel - Package: libllvm6.0 - Pin: origin "azure.archive.ubuntu.com" - Pin-Priority: 1001 - EOF - - # echo_run sudo apt-fast update -qq - echo_run sudo apt-fast update -qq || echo "failed, see bug #17343" - # `:i386` (e.g. in `libffi-dev:i386`) is needed otherwise you may get: - # `could not load: libffi.so` during dynamic loading. - DEBIAN_FRONTEND='noninteractive' \ - echo_run sudo apt-fast install --no-install-recommends --allow-downgrades -yq \ - g++-multilib gcc-multilib libcurl4-openssl-dev:i386 libgc-dev:i386 \ - libsdl1.2-dev:i386 libsfml-dev:i386 libglib2.0-dev:i386 libffi-dev:i386 - - cat << EOF > bin/gcc - #!/bin/bash - - exec $(which gcc) -m32 "\$@" - EOF - - cat << EOF > bin/g++ - #!/bin/bash - - exec $(which g++) -m32 "\$@" - EOF - - echo_run chmod 755 bin/gcc - echo_run chmod 755 bin/g++ - - displayName: 'Install dependencies (i386 Linux)' - condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'i386')) - - bash: brew install boehmgc make sfml displayName: 'Install dependencies (OSX)' condition: eq(variables['Agent.OS'], 'Darwin') From d62b8a94b1647314c764c66f9a4053b40f1c2dc3 Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 14:43:10 -0500 Subject: [PATCH 02/16] azure-pipelines: move all build steps to ci/azure --- azure-pipelines.yml | 103 +----------------------------------------- ci/azure/ci-steps.yml | 103 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 102 deletions(-) create mode 100644 ci/azure/ci-steps.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index aeaf0dde26ce4..f1e67a5a4fc8c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -45,105 +45,4 @@ jobs: clean: all steps: - - bash: git config --global core.autocrlf false - displayName: 'Disable auto conversion to CRLF by git (Windows-only)' - condition: eq(variables['Agent.OS'], 'Windows_NT') - - - checkout: self - fetchDepth: 1 - - - bash: git clone --depth 1 https://github.com/nim-lang/csources - displayName: 'Checkout Nim csources' - - - task: NodeTool@0 - inputs: - versionSpec: '12.x' - displayName: 'Install node.js 12.x' - - - bash: | - set -e - . ci/funs.sh - echo_run sudo apt-fast update -qq - DEBIAN_FRONTEND='noninteractive' \ - echo_run 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: brew install boehmgc make sfml - displayName: 'Install dependencies (OSX)' - condition: eq(variables['Agent.OS'], 'Darwin') - - - bash: | - set -e - . ci/funs.sh - echo_run mkdir dist - echo_run curl -L https://nim-lang.org/download/mingw64.7z -o dist/mingw64.7z - echo_run curl -L https://nim-lang.org/download/dlls.zip -o dist/dlls.zip - echo_run 7z x dist/mingw64.7z -odist - echo_run 7z x dist/dlls.zip -obin - echo_run echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/dist/mingw64/bin' - - displayName: 'Install dependencies (Windows)' - condition: eq(variables['Agent.OS'], 'Windows_NT') - - - bash: echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/bin' - displayName: 'Add build binaries to PATH' - - - bash: | - set -e - . ci/funs.sh - echo_run echo 'PATH:' "$PATH" - echo_run echo '##[section]gcc version' - echo_run gcc -v - echo_run echo '##[section]nodejs version' - echo_run node -v - echo_run echo '##[section]make version' - echo_run make -v - displayName: 'System information' - - - bash: echo '##vso[task.setvariable variable=csources_version]'"$(git -C csources rev-parse HEAD)" - displayName: 'Get csources version' - - - task: Cache@2 - inputs: - key: 'csources | "$(Agent.OS)" | $(CPU) | $(csources_version)' - path: csources/bin - displayName: 'Restore built csources' - - - bash: | - set -e - . ci/funs.sh - ncpu= - ext= - case '$(Agent.OS)' in - 'Linux') - ncpu=$(nproc) - ;; - 'Darwin') - ncpu=$(sysctl -n hw.ncpu) - ;; - 'Windows_NT') - ncpu=$NUMBER_OF_PROCESSORS - ext=.exe - ;; - esac - [[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1 - - if [[ -x csources/bin/nim$ext ]]; then - echo_run echo "Found cached compiler, skipping build" - else - echo_run make -C csources -j $ncpu CC=gcc ucpu=$(CPU) koch=no - fi - - echo_run cp csources/bin/nim$ext bin - displayName: 'Build 1-stage compiler from csources' - - - bash: nim c koch - displayName: 'Build koch' - - # 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) + - template: ci/azure/ci-steps.yml diff --git a/ci/azure/ci-steps.yml b/ci/azure/ci-steps.yml new file mode 100644 index 0000000000000..0fd5115f5c197 --- /dev/null +++ b/ci/azure/ci-steps.yml @@ -0,0 +1,103 @@ +steps: + - bash: git config --global core.autocrlf false + displayName: 'Disable auto conversion to CRLF by git (Windows-only)' + condition: eq(variables['Agent.OS'], 'Windows_NT') + + - checkout: self + fetchDepth: 1 + + - bash: git clone --depth 1 https://github.com/nim-lang/csources + displayName: 'Checkout Nim csources' + + - task: NodeTool@0 + inputs: + versionSpec: '12.x' + displayName: 'Install node.js 12.x' + + - bash: | + set -e + . ci/funs.sh + echo_run sudo apt-fast update -qq + DEBIAN_FRONTEND='noninteractive' \ + echo_run 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: brew install boehmgc make sfml + displayName: 'Install dependencies (OSX)' + condition: eq(variables['Agent.OS'], 'Darwin') + + - bash: | + set -e + . ci/funs.sh + echo_run mkdir dist + echo_run curl -L https://nim-lang.org/download/mingw64.7z -o dist/mingw64.7z + echo_run curl -L https://nim-lang.org/download/dlls.zip -o dist/dlls.zip + echo_run 7z x dist/mingw64.7z -odist + echo_run 7z x dist/dlls.zip -obin + echo_run echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/dist/mingw64/bin' + + displayName: 'Install dependencies (Windows)' + condition: eq(variables['Agent.OS'], 'Windows_NT') + + - bash: echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/bin' + displayName: 'Add build binaries to PATH' + + - bash: | + set -e + . ci/funs.sh + echo_run echo 'PATH:' "$PATH" + echo_run echo '##[section]gcc version' + echo_run gcc -v + echo_run echo '##[section]nodejs version' + echo_run node -v + echo_run echo '##[section]make version' + echo_run make -v + displayName: 'System information' + + - bash: echo '##vso[task.setvariable variable=csources_version]'"$(git -C csources rev-parse HEAD)" + displayName: 'Get csources version' + + - task: Cache@2 + inputs: + key: 'csources | "$(Agent.OS)" | $(CPU) | $(csources_version)' + path: csources/bin + displayName: 'Restore built csources' + + - bash: | + set -e + . ci/funs.sh + ncpu= + ext= + case '$(Agent.OS)' in + 'Linux') + ncpu=$(nproc) + ;; + 'Darwin') + ncpu=$(sysctl -n hw.ncpu) + ;; + 'Windows_NT') + ncpu=$NUMBER_OF_PROCESSORS + ext=.exe + ;; + esac + [[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1 + + if [[ -x csources/bin/nim$ext ]]; then + echo_run echo "Found cached compiler, skipping build" + else + echo_run make -C csources -j $ncpu CC=gcc ucpu=$(CPU) koch=no + fi + + echo_run cp csources/bin/nim$ext bin + displayName: 'Build 1-stage compiler from csources' + + - bash: nim c koch + displayName: 'Build koch' + + # 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) From 3617d0efc18c9889488f48fc62ead5f0e0847dd0 Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 14:52:36 -0500 Subject: [PATCH 03/16] azure-pipelines: add 32bit Linux using nim-ci container --- azure-pipelines.yml | 17 +++++++++++++++++ ci/azure/ci-steps.yml | 14 ++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f1e67a5a4fc8c..53877527bba7f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,3 +46,20 @@ jobs: steps: - template: ci/azure/ci-steps.yml + +- job: Linux_i386 + + timeoutInMinutes: 90 # default `60` led to lots of cancelled jobs; use 0 for unlimited (may be undesirable) + + variables: + CPU: i386 + + pool: + vmImage: ubuntu-latest + + container: ghcr.io/alaviss/nim-ci:sha-1d368dc@sha256:d3f556a523a5220bc0a5b197f52c1761dd3756132a1afaa3ce062a8e2c464079 + + steps: + - template: ci/azure/ci-steps.yml + parameters: + installNode: false diff --git a/ci/azure/ci-steps.yml b/ci/azure/ci-steps.yml index 0fd5115f5c197..5e6f2bfe29f87 100644 --- a/ci/azure/ci-steps.yml +++ b/ci/azure/ci-steps.yml @@ -1,3 +1,8 @@ +parameters: + - name: installNode + type: boolean + default: true + steps: - bash: git config --global core.autocrlf false displayName: 'Disable auto conversion to CRLF by git (Windows-only)' @@ -9,10 +14,11 @@ steps: - bash: git clone --depth 1 https://github.com/nim-lang/csources displayName: 'Checkout Nim csources' - - task: NodeTool@0 - inputs: - versionSpec: '12.x' - displayName: 'Install node.js 12.x' + - ${{ if eq(parameters.installNode, true) }}: + - task: NodeTool@0 + inputs: + versionSpec: '12.x' + displayName: 'Install node.js 12.x' - bash: | set -e From 8f94bcd1a632e1e92d6a476cd9c766eb3d3ca342 Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 15:27:19 -0500 Subject: [PATCH 04/16] azure-pipelines: enable init for docker image As a zombie reaper and for the image to stay alive. --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 53877527bba7f..6f1916d01919f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -57,7 +57,9 @@ jobs: pool: vmImage: ubuntu-latest - container: ghcr.io/alaviss/nim-ci:sha-1d368dc@sha256:d3f556a523a5220bc0a5b197f52c1761dd3756132a1afaa3ce062a8e2c464079 + container: + image: ghcr.io/alaviss/nim-ci:sha-1d368dc@sha256:d3f556a523a5220bc0a5b197f52c1761dd3756132a1afaa3ce062a8e2c464079 + options: --init steps: - template: ci/azure/ci-steps.yml From 4ba522c41fbe13f0152bb8770f487601cb60dc70 Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 16:33:24 -0500 Subject: [PATCH 05/16] azure-pipelines: update docker image This image sets CMD to a run forever process, which will keep the image running. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6f1916d01919f..15bd564a61277 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -58,7 +58,7 @@ jobs: vmImage: ubuntu-latest container: - image: ghcr.io/alaviss/nim-ci:sha-1d368dc@sha256:d3f556a523a5220bc0a5b197f52c1761dd3756132a1afaa3ce062a8e2c464079 + image: ghcr.io/alaviss/nim-ci:sha-b3de271@sha256:adb55c3d5a4ea92da849564508f3a6533af7b85caa8571a120fcb3c8a68c4951 options: --init steps: From d003e7fcee8b0b9af5b93cef6ef383a6ee34198a Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 17:52:00 -0500 Subject: [PATCH 06/16] azure-pipelines: update container This new version specify the location of the preinstalled node.js binary. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 15bd564a61277..7be420bee2996 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -58,7 +58,7 @@ jobs: vmImage: ubuntu-latest container: - image: ghcr.io/alaviss/nim-ci:sha-b3de271@sha256:adb55c3d5a4ea92da849564508f3a6533af7b85caa8571a120fcb3c8a68c4951 + image: ghcr.io/alaviss/nim-ci:sha-1ee4e5b@sha256:3ac97be9c41be285d3632dacff995e56f216b03f8aa0d2bd32e907efda16bf49 options: --init steps: From f58f1a1a3e347d0e56af7a7530976bf55490a59d Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 18:03:19 -0500 Subject: [PATCH 07/16] azure-pipelines: update container image This update includes ca-certificates, needed for cloning. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7be420bee2996..6cc1a93366fb6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -58,7 +58,7 @@ jobs: vmImage: ubuntu-latest container: - image: ghcr.io/alaviss/nim-ci:sha-1ee4e5b@sha256:3ac97be9c41be285d3632dacff995e56f216b03f8aa0d2bd32e907efda16bf49 + image: ghcr.io/alaviss/nim-ci:sha-aa56233@sha256:7f6d204d43e213ff8621e9f0c9f2b788858b9f3788fed95ac62e1c821baa4476 options: --init steps: From 55bcebab8efc24d613d748903d43e259349c583b Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 18:42:35 -0500 Subject: [PATCH 08/16] koch: disable js for x86_32 Linux CI Node.js has deprecated 32-bit builds for x86 Linux: https://github.com/nodejs/build/issues/885 --- koch.nim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/koch.nim b/koch.nim index bf7fb1e620ad7..9af74b9744ec7 100644 --- a/koch.nim +++ b/koch.nim @@ -552,7 +552,13 @@ proc runCI(cmd: string) = # main bottleneck here # xxx: even though this is the main bottleneck, we could speedup the rest via batching with `--batch`. # BUG: with initOptParser, `--batch:'' all` interprets `all` as the argument of --batch, pending bug #14343 - execFold("Run tester", "nim c -r -d:nimCoroutines --putenv:NIM_TESTAMENT_REMOTE_NETWORKING:1 -d:nimStrictMode testament/testament $# all -d:nimCoroutines" % batchParam) + const Targets = + # Disable JS tests on i?86 systems since node.js has been deprecated there. + when defined(i386) and defined(linux): + "--targets:\"c cpp\"" + else: + "--targets:\"c cpp js\"" + execFold("Run tester", "nim c -r -d:nimCoroutines --putenv:NIM_TESTAMENT_REMOTE_NETWORKING:1 -d:nimStrictMode testament/testament $1 $2 all -d:nimCoroutines" % [batchParam, Targets]) block CT_FFI: when defined(posix): # windows can be handled in future PR's From 8c1f3e7ab1d2f9287d192884cdcb7e66b9b40502 Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 21:51:29 -0500 Subject: [PATCH 09/16] azure-pipelines: print container ipv6 status --- azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6cc1a93366fb6..e1541009090f3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,6 +62,10 @@ jobs: options: --init steps: + - name: Inspect container environment + script: | + sysctl net.ipv6.conf.all.disable_ipv6 + sysctl net.ipv6.conf.lo.disable_ipv6 - template: ci/azure/ci-steps.yml parameters: installNode: false From 5e4751afdae894659bd820b6c6f7af50f349c805 Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 21:53:00 -0500 Subject: [PATCH 10/16] azure-pipelines: fix script syntax --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e1541009090f3..5360753978ba3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,8 +62,8 @@ jobs: options: --init steps: - - name: Inspect container environment - script: | + - displayName: Inspect container environment + bash: | sysctl net.ipv6.conf.all.disable_ipv6 sysctl net.ipv6.conf.lo.disable_ipv6 - template: ci/azure/ci-steps.yml From 8836fc5bb2f7936c4036a3f0a7546dba795d6f1e Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 21:56:06 -0500 Subject: [PATCH 11/16] azure-pipelines: move container inspection into the template --- azure-pipelines.yml | 4 ---- ci/azure/ci-steps.yml | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5360753978ba3..6cc1a93366fb6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,10 +62,6 @@ jobs: options: --init steps: - - displayName: Inspect container environment - bash: | - sysctl net.ipv6.conf.all.disable_ipv6 - sysctl net.ipv6.conf.lo.disable_ipv6 - template: ci/azure/ci-steps.yml parameters: installNode: false diff --git a/ci/azure/ci-steps.yml b/ci/azure/ci-steps.yml index 5e6f2bfe29f87..87c5e1a84352b 100644 --- a/ci/azure/ci-steps.yml +++ b/ci/azure/ci-steps.yml @@ -4,6 +4,12 @@ parameters: default: true steps: + - bash: | + sysctl net.ipv6.conf.all.disable_ipv6 + sysctl net.ipv6.conf.lo.disable_ipv6 + displayName: Inspect container environment + condition: eq(variables['Agent.OS'], 'Linux') + - bash: git config --global core.autocrlf false displayName: 'Disable auto conversion to CRLF by git (Windows-only)' condition: eq(variables['Agent.OS'], 'Windows_NT') From 331b9b9b810da78fe9120096beca59f8ccb87906 Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 22:01:32 -0500 Subject: [PATCH 12/16] azure-pipelines: force enable ipv6 in containers --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6cc1a93366fb6..66d1f9d8dbf3c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -59,7 +59,7 @@ jobs: container: image: ghcr.io/alaviss/nim-ci:sha-aa56233@sha256:7f6d204d43e213ff8621e9f0c9f2b788858b9f3788fed95ac62e1c821baa4476 - options: --init + options: --init --sysctl net.ipv6.conf.all.disable_ipv6=0 steps: - template: ci/azure/ci-steps.yml From 4a8b9184301b9552903aa0b31fb2f942fb8ae9a9 Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 22:26:01 -0500 Subject: [PATCH 13/16] azure-pipelines: move 64-bit linux to container This gives us greater control over the linux testing environment. --- azure-pipelines.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 66d1f9d8dbf3c..023617ef5ac96 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,9 +14,6 @@ jobs: strategy: matrix: - Linux_amd64: - vmImage: 'ubuntu-16.04' - CPU: amd64 OSX_amd64: vmImage: 'macOS-10.15' CPU: amd64 @@ -47,18 +44,24 @@ jobs: steps: - template: ci/azure/ci-steps.yml -- job: Linux_i386 +- job: linux timeoutInMinutes: 90 # default `60` led to lots of cancelled jobs; use 0 for unlimited (may be undesirable) - variables: - CPU: i386 + strategy: + matrix: + amd64: + containerImage: ghcr.io/alaviss/nim-ci:sha-aa56233@sha256:43dbe085d041c95b5d39bcbc5e0c4e05d922d407ac8a8938d33064402a5a5f22 + CPU: amd64 + i386: + containerImage: ghcr.io/alaviss/nim-ci:sha-aa56233@sha256:7f6d204d43e213ff8621e9f0c9f2b788858b9f3788fed95ac62e1c821baa4476 + CPU: i386 pool: vmImage: ubuntu-latest container: - image: ghcr.io/alaviss/nim-ci:sha-aa56233@sha256:7f6d204d43e213ff8621e9f0c9f2b788858b9f3788fed95ac62e1c821baa4476 + image: $(containerImage) options: --init --sysctl net.ipv6.conf.all.disable_ipv6=0 steps: From 7a238705329783957b10cc2e61dc85d543e9a8db Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 22:43:13 -0500 Subject: [PATCH 14/16] azure/ci-steps: remove linux dependency installation The nim-ci image already bundled everything neccessary. --- ci/azure/ci-steps.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ci/azure/ci-steps.yml b/ci/azure/ci-steps.yml index 87c5e1a84352b..aa3bbb00a16f1 100644 --- a/ci/azure/ci-steps.yml +++ b/ci/azure/ci-steps.yml @@ -26,16 +26,6 @@ steps: versionSpec: '12.x' displayName: 'Install node.js 12.x' - - bash: | - set -e - . ci/funs.sh - echo_run sudo apt-fast update -qq - DEBIAN_FRONTEND='noninteractive' \ - echo_run 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: brew install boehmgc make sfml displayName: 'Install dependencies (OSX)' condition: eq(variables['Agent.OS'], 'Darwin') From 40f2e4465ec5bcfad25dc5455d23bfb7b3e4b744 Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 23:20:21 -0500 Subject: [PATCH 15/16] trunner: disable JS tests on linux i386 Node.js no longer has official support for this platform. --- tests/misc/trunner.nim | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/misc/trunner.nim b/tests/misc/trunner.nim index a66177f28b856..b685b0b7c8110 100644 --- a/tests/misc/trunner.nim +++ b/tests/misc/trunner.nim @@ -28,6 +28,8 @@ const mode = querySetting(backend) nimcache = buildDir / "nimcacheTrunner" # instead of `querySetting(nimcacheDir)`, avoids stomping on other parallel tests + noJs = defined(linux) and defined(i386) + # configurations where JS tests can't run proc runCmd(file, options = ""): auto = let fileabs = testsDir / file.unixToNativePath @@ -194,7 +196,12 @@ sub/mmain.idx""", context # test for https://github.com/nim-lang/Nim/issues/13129 # test for https://github.com/nim-lang/Nim/issues/13891 let file = testsDir / "nimdoc/m13129.nim" - for backend in fmt"{mode} js".split: + const backends = + when not noJs: + fmt"{mode} js" + else: + mode + for backend in backends.split: # pending #14343 this fails on windows: --doccmd:"-d:m13129Foo2 --hints:off" let cmd = fmt"""{nim} doc -b:{backend} --nimcache:{nimcache} -d:m13129Foo1 "--doccmd:-d:m13129Foo2 --hints:off" --usenimcache --hints:off {file}""" check execCmdEx(cmd) == (&"ok1:{backend}\nok2: backend: {backend}\n", 0) @@ -212,8 +219,9 @@ sub/mmain.idx""", context cmd = fmt"{nim} check -b:c -b:cpp --hints:off --nimcache:{nimcache} {file}" check execCmdEx(cmd) == ("", 0) # issue https://github.com/timotheecour/Nim/issues/175 - cmd = fmt"{nim} c -b:js -b:cpp --hints:off --nimcache:{nimcache} {file}" - check execCmdEx(cmd) == ("", 0) + when not noJs: + cmd = fmt"{nim} c -b:js -b:cpp --hints:off --nimcache:{nimcache} {file}" + check execCmdEx(cmd) == ("", 0) block: # some importc tests # issue #14314 @@ -242,7 +250,8 @@ tests/newconfig/bar/mfoo.nims""".splitLines let opt = "--hints:off" check fmt"""{nim} {opt} --eval:"echo defined(nimscript)"""".execCmdEx == ("true\n", 0) check fmt"""{nim} r {opt} --eval:"echo defined(c)"""".execCmdEx == ("true\n", 0) - check fmt"""{nim} r -b:js {opt} --eval:"echo defined(js)"""".execCmdEx == ("true\n", 0) + when not noJs: + check fmt"""{nim} r -b:js {opt} --eval:"echo defined(js)"""".execCmdEx == ("true\n", 0) block: # `hintProcessing` dots should not interfere with `static: echo` + friends let cmd = fmt"""{nim} r {defaultHintsOff} --hint:processing -f --eval:"static: echo 1+1"""" From 7ec8368f371efe25b2bbe280a6e22d1f91a793c7 Mon Sep 17 00:00:00 2001 From: Leorize Date: Fri, 19 Mar 2021 23:22:25 -0500 Subject: [PATCH 16/16] t13115: disable for linux i386 Node.js no longer officially support this platform. --- tests/exception/t13115.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/exception/t13115.nim b/tests/exception/t13115.nim index ee1daed26800c..1e5dc08979d32 100644 --- a/tests/exception/t13115.nim +++ b/tests/exception/t13115.nim @@ -13,10 +13,10 @@ else: const nim = getCurrentCompilerExe() const file = currentSourcePath for b in "c js cpp".split: - when defined(openbsd): + when defined(openbsd) or (defined(linux) and defined(i386)): if b == "js": # xxx bug: pending #13115 - # remove special case once nodejs updated >= 12.16.2 + # remove special case for openbsd once nodejs updated >= 12.16.2 # refs https://github.com/nim-lang/Nim/pull/16167#issuecomment-738270751 continue