refactor common code in CI pipelines (#18035)

* refactor CI with nimInternalInstallDepsWindows

* refactor CI with nimInternalBuildKochAndRunCI

* fixup
This commit is contained in:
Timothee Cour 2021-05-26 00:43:30 -07:00 • committed by GitHub
commit c495628255
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 53 deletions

View file

@ -31,6 +31,23 @@ nimIsCiSkip(){
fi
}
nimInternalInstallDepsWindows(){
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
}
nimInternalBuildKochAndRunCI(){
echo_run nim c koch
if ! echo_run ./koch runCI; then
echo_run echo "runCI failed"
echo_run nim r -tools/ci_testresults.nim
return 1
fi
}
nimDefineVars(){
. config/build_config.txt
nim_csources=bin/nim_csources_$nim_csourcesHash