-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An overhaul of Nim's CI #17424
Closed
Closed
An overhaul of Nim's CI #17424
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7961d8b
azure-pipelines: remove 32bit Linux CI
alaviss d62b8a9
azure-pipelines: move all build steps to ci/azure
alaviss 3617d0e
azure-pipelines: add 32bit Linux using nim-ci container
alaviss 8f94bcd
azure-pipelines: enable init for docker image
alaviss 4ba522c
azure-pipelines: update docker image
alaviss d003e7f
azure-pipelines: update container
alaviss f58f1a1
azure-pipelines: update container image
alaviss 55bceba
koch: disable js for x86_32 Linux CI
alaviss 8c1f3e7
azure-pipelines: print container ipv6 status
alaviss 5e4751a
azure-pipelines: fix script syntax
alaviss 8836fc5
azure-pipelines: move container inspection into the template
alaviss 331b9b9
azure-pipelines: force enable ipv6 in containers
alaviss 4a8b918
azure-pipelines: move 64-bit linux to container
alaviss 7a23870
azure/ci-steps: remove linux dependency installation
alaviss 40f2e44
trunner: disable JS tests on linux i386
alaviss 7ec8368
t13115: disable for linux i386
alaviss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
parameters: | ||
- name: installNode | ||
type: boolean | ||
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') | ||
|
||
- checkout: self | ||
fetchDepth: 1 | ||
|
||
- bash: git clone --depth 1 https://github.com/nim-lang/csources | ||
displayName: 'Checkout Nim csources' | ||
|
||
- ${{ if eq(parameters.installNode, true) }}: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: '12.x' | ||
displayName: 'Install node.js 12.x' | ||
|
||
- 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything to test the repo must live in the Nim organization IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juancarlospaco then maybe just move nim-ci under @nim-lang organization, no need to have it in the same repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True