Use the same CI build system as Nimbus

This commit is contained in:
mratsim 2018-07-23 14:28:14 +02:00
parent caa457210a
commit 1129d55a1f
2 changed files with 64 additions and 54 deletions

View File

@ -1,37 +1,48 @@
version: '{build}' version: '{build}'
cache: cache:
- nim-0.17.2_x64.zip
- x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z - x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
- packages -> **\packages.config - i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
- '%LocalAppData%\NuGet\Cache -> **\packages.config'
# We always want 32 and 64-bit compilation
matrix: matrix:
fast_finish: true fast_finish: false # set this flag to immediately finish build once one of the jobs fails.
environment: environment:
matrix: matrix:
- MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z - MINGW_DIR: mingw32
MINGW_DIR: mingw64 MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/dwarf/i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z/download
MINGW_URL: https://ayera.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
NIM_ARCHIVE: nim-0.17.2_x64.zip platform: x86
NIM_DIR: nim-0.17.2 - MINGW_DIR: mingw64
NIM_URL: https://nim-lang.org/download/nim-0.17.2_x64.zip MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z/download
MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
platform: x64 platform: x64
install: install:
- MKDIR %CD%\tools_tmp - setlocal EnableExtensions EnableDelayedExpansion
- IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%" - IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
- 7z x -y "%MINGW_ARCHIVE%" -o"%CD%\tools_tmp"> nul - 7z x -y "%MINGW_ARCHIVE%" > nul
- IF not exist "%NIM_ARCHIVE%" appveyor DownloadFile "%NIM_URL%" -FileName "%NIM_ARCHIVE%" - SET PATH=%CD%\%MINGW_DIR%\bin;%CD%\Nim\bin;%PATH%
- 7z x -y "%NIM_ARCHIVE%" -o"%CD%\tools_tmp"> nul - git clone https://github.com/nim-lang/Nim.git
- SET PATH=%CD%\tools_tmp\%NIM_DIR%\bin;%CD%\tools_tmp\%MINGW_DIR%\bin;%PATH% - cd %CD%\Nim
- SET PATH=%PATH%;%CD% - git remote add statusim https://github.com/status-im/Nim.git
- git fetch statusim
- git config --global user.email "you@example.com"
- git config --global user.name "Your Name"
- for /f "tokens=*" %%G IN ('git branch -a --list ^"statusim/status-autopatch-*^"') DO (git merge %%G)
- git clone --depth 1 https://github.com/nim-lang/csources
- cd csources
- IF "%PLATFORM%" == "x64" ( build64.bat ) else ( build.bat )
- cd ..
- bin\nim c koch
- koch boot -d:release
- koch nimble
build_script: build_script:
- nimble.exe refresh - cd C:\projects\%APPVEYOR_PROJECT_SLUG%
- nimble install -y
test_script: test_script:
- nimble.exe test - nimble test
deploy: off deploy: off

View File

@ -1,43 +1,42 @@
language: c
cache: ccache cache: ccache
matrix: matrix:
# allow_failures:
# - os: osx
include: include:
# Build and test against the master (stable) and devel branches of Nim
# Build and test using both gcc and clang
- os: linux - os: linux
env: CHANNEL=stable sudo: required
compiler: gcc services:
- docker
before_install:
- docker pull statusteam/nim-base
script:
- docker run statusteam/nim-base nim --version
- docker run -v "$(pwd):/project" -w /project statusteam/nim-base sh -c "nimble install -dy && nimble test"
- os: linux
env: CHANNEL=devel
compiler: gcc
# On OSX we only test against clang (gcc is mapped to clang by default)
- os: osx - os: osx
env: CHANNEL=stable before_install:
compiler: clang - brew update
- brew install rocksdb
# - brew install gcc
allow_failures: - git clone https://github.com/nim-lang/nim.git
# Ignore failures when building against the devel Nim branch - cd nim
# Also ignore OSX, due to very long build time and Homebrew/curl SSLRead errors - git remote add statusim https://github.com/status-im/nim.git
- env: CHANNEL=devel - git fetch statusim
- os: osx - git config --global user.email "you@example.com"
fast_finish: true - git config --global user.name "Your Name"
- for b in $(git branch -a --list 'statusim/status-autopatch-*'); do git merge $b; done
- git clone --depth 1 https://github.com/nim-lang/csources.git
- cd csources
- sh build.sh
- cd ..
- export PATH=$PWD/bin:$PATH
- nim c koch
- ./koch boot -d:release
- ./koch nimble
- cd ..
install: script:
- export CHOOSENIM_NO_ANALYTICS=1 - nimble install -dy && nimble test
- curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh
- sh init.sh -y
- export PATH=~/.nimble/bin:$PATH
- echo "export PATH=~/.nimble/bin:$PATH" >> ~/.profile
- choosenim $CHANNEL
script:
- nimble refresh
- nimble test
branches:
except:
- gh-pages