Merge branch 'master' of https://github.com/status-im/nim-beacon-chain
This commit is contained in:
commit
36fef4455d
132
.appveyor.yml
132
.appveyor.yml
|
@ -1,77 +1,87 @@
|
||||||
# Appveyor config.
|
|
||||||
|
|
||||||
version: '{build}'
|
version: '{build}'
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- nim-0.18.0_x64.zip
|
- x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z -> .appveyor.yml
|
||||||
- x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
|
- i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z -> .appveyor.yml
|
||||||
- i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
|
- Nim -> .appveyor.yml
|
||||||
- packages -> **\packages.config
|
|
||||||
- '%LocalAppData%\NuGet\Cache -> **\packages.config'
|
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
# We always want 32 and 64-bit compilation
|
||||||
|
fast_finish: false
|
||||||
|
|
||||||
environment:
|
platform:
|
||||||
matrix:
|
- x86
|
||||||
- MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
|
- x64
|
||||||
MINGW_DIR: mingw64
|
|
||||||
# We need to hardcode a mirror otherwise the download fails
|
|
||||||
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
|
|
||||||
# NIM_ARCHIVE: nim-0.18.0_x64.zip
|
|
||||||
# NIM_DIR: nim-0.18.0
|
|
||||||
# NIM_URL: https://nim-lang.org/download/nim-0.18.0_x64.zip
|
|
||||||
platform: x64
|
|
||||||
- MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
|
|
||||||
MINGW_DIR: mingw32
|
|
||||||
# We need to hardcode a mirror otherwise the download fails
|
|
||||||
MINGW_URL: https://netcologne.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/dwarf/i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
|
|
||||||
# NIM_ARCHIVE: nim-0.18.0_x64.zip
|
|
||||||
# NIM_DIR: nim-0.18.0
|
|
||||||
# NIM_URL: https://nim-lang.org/download/nim-0.18.0_x32.zip
|
|
||||||
platform: x86
|
|
||||||
|
|
||||||
## Use the following to test against stable
|
|
||||||
# install:
|
|
||||||
# - MKDIR %CD%\tools_tmp
|
|
||||||
# - IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
|
|
||||||
# - 7z x -y "%MINGW_ARCHIVE%" -o"%CD%\tools_tmp"> nul
|
|
||||||
# - IF not exist "%NIM_ARCHIVE%" appveyor DownloadFile "%NIM_URL%" -FileName "%NIM_ARCHIVE%"
|
|
||||||
# - 7z x -y "%NIM_ARCHIVE%" -o"%CD%\tools_tmp"> nul
|
|
||||||
# - SET PATH=%CD%\tools_tmp\%NIM_DIR%\bin;%CD%\tools_tmp\%MINGW_DIR%\bin;%PATH%
|
|
||||||
# # - ps: nuget install YourDependency -o "${env:APPVEYOR_BUILD_FOLDER}"
|
|
||||||
# # - ps: cp YourDependency.0.1.2.3/lib/native/bin/x64/libyourdependency.dll yourdependency.dll
|
|
||||||
# - SET PATH=%PATH%;%CD%
|
|
||||||
|
|
||||||
## Test against devel with Status patches
|
|
||||||
install:
|
install:
|
||||||
- setlocal EnableExtensions EnableDelayedExpansion
|
- setlocal EnableExtensions EnableDelayedExpansion
|
||||||
- IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
|
|
||||||
- 7z x -y "%MINGW_ARCHIVE%" > nul
|
- IF "%PLATFORM%" == "x86" (
|
||||||
|
SET "MINGW_ARCHIVE=i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z" &
|
||||||
|
SET "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" &
|
||||||
|
SET "MINGW_DIR=mingw32"
|
||||||
|
) ELSE (
|
||||||
|
IF "%PLATFORM%" == "x64" (
|
||||||
|
SET "MINGW_ARCHIVE=x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z" &
|
||||||
|
SET "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" &
|
||||||
|
SET "MINGW_DIR=mingw64"
|
||||||
|
) else (
|
||||||
|
echo "Unknown platform"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
- SET PATH=%CD%\%MINGW_DIR%\bin;%CD%\Nim\bin;%PATH%
|
- SET PATH=%CD%\%MINGW_DIR%\bin;%CD%\Nim\bin;%PATH%
|
||||||
- git clone https://github.com/nim-lang/Nim.git
|
|
||||||
- cd %CD%\Nim
|
# Unpack mingw
|
||||||
- git remote add statusim https://github.com/status-im/Nim.git
|
- IF NOT EXIST "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
|
||||||
- git fetch statusim
|
- 7z x -y "%MINGW_ARCHIVE%" > nul
|
||||||
- git config --global user.email "you@example.com"
|
|
||||||
- git config --global user.name "Your Name"
|
# build nim from our own branch - this to avoid the day-to-day churn and
|
||||||
- for /f "tokens=*" %%G IN ('git branch -a --list ^"statusim/status-autopatch-*^"') DO (git merge %%G)
|
# regressions of the fast-paced Nim development while maintaining the
|
||||||
- git clone --depth 1 https://github.com/nim-lang/csources
|
# flexibility to apply patches
|
||||||
- cd csources
|
- SET "NEED_REBUILD="
|
||||||
- IF "%PLATFORM%" == "x64" ( build64.bat ) else ( build.bat )
|
|
||||||
- cd ..
|
- IF NOT EXIST "Nim\\.git\\" (
|
||||||
- bin\nim c koch
|
git clone https://github.com/status-im/Nim.git
|
||||||
- koch boot -d:release
|
) ELSE (
|
||||||
- koch nimble
|
( cd Nim ) &
|
||||||
|
( git pull ) &
|
||||||
|
( cd .. )
|
||||||
|
)
|
||||||
|
|
||||||
|
# Rebuild Nim if HEAD has moved or if we don't yet have a cached version
|
||||||
|
- IF NOT EXIST "Nim\\ver.txt" (
|
||||||
|
SET NEED_REBUILD=1
|
||||||
|
) ELSE (
|
||||||
|
( CD Nim ) &
|
||||||
|
( git rev-parse HEAD > ..\\cur_ver.txt ) &
|
||||||
|
( fc ver.txt ..\\cur_ver.txt > nul ) &
|
||||||
|
( IF NOT ERRORLEVEL == 0 SET NEED_REBUILD=1 ) &
|
||||||
|
( cd .. )
|
||||||
|
)
|
||||||
|
|
||||||
|
- IF NOT EXIST "Nim\\bin\\nim.exe" SET NEED_REBUILD=1
|
||||||
|
- IF NOT EXIST "Nim\\bin\\nimble.exe" SET NEED_REBUILD=1
|
||||||
|
|
||||||
|
# after building nim, wipe csources to save on cache space
|
||||||
|
- IF DEFINED NEED_REBUILD (
|
||||||
|
cd Nim &
|
||||||
|
( IF EXIST "csources" rmdir /s /q csources ) &
|
||||||
|
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 &
|
||||||
|
git rev-parse HEAD > ver.txt &
|
||||||
|
rmdir /s /q csources
|
||||||
|
)
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cd C:\projects\%APPVEYOR_PROJECT_SLUG%
|
- cd C:\projects\%APPVEYOR_PROJECT_SLUG%
|
||||||
- nimble install -y
|
- nimble install -y
|
||||||
|
|
||||||
build_script:
|
|
||||||
- nimble.exe refresh
|
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
# - git submodule update --init --recursive
|
- nimble test
|
||||||
- nimble.exe test
|
|
||||||
|
|
||||||
deploy: off
|
deploy: off
|
||||||
|
|
69
.travis.yml
69
.travis.yml
|
@ -1,42 +1,39 @@
|
||||||
# Travis config for beacon_chain using Status Nim docker.
|
language: c # or other C/C++ variants
|
||||||
|
|
||||||
matrix:
|
sudo: false
|
||||||
# allow_failures:
|
|
||||||
# - os: osx
|
|
||||||
|
|
||||||
include:
|
# https://docs.travis-ci.com/user/caching/
|
||||||
- os: linux
|
#
|
||||||
sudo: required
|
# Caching the whole nim folder is better than relying on ccache - this way, we
|
||||||
services:
|
# skip the expensive bootstrap process and linking
|
||||||
- docker
|
cache:
|
||||||
before_install:
|
directories:
|
||||||
- docker pull statusteam/nim-base
|
- nim
|
||||||
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: osx
|
os:
|
||||||
before_install:
|
- linux
|
||||||
- brew update
|
- osx
|
||||||
- brew install rocksdb
|
|
||||||
# - brew install gcc
|
|
||||||
|
|
||||||
- git clone https://github.com/nim-lang/nim.git
|
install:
|
||||||
- cd nim
|
# build nim from our own branch - this to avoid the day-to-day churn and
|
||||||
- git remote add statusim https://github.com/status-im/nim.git
|
# regressions of the fast-paced Nim development while maintaining the
|
||||||
- git fetch statusim
|
# flexibility to apply patches
|
||||||
- git config --global user.email "you@example.com"
|
#
|
||||||
- git config --global user.name "Your Name"
|
# check version of remote branch
|
||||||
- for b in $(git branch -a --list 'statusim/status-autopatch-*'); do git merge $b; done
|
- "export NIMVER=$(git ls-remote https://github.com/status-im/nim.git HEAD | cut -f 1)"
|
||||||
- git clone --depth 1 https://github.com/nim-lang/csources.git
|
|
||||||
- cd csources
|
# after building nim, wipe csources to save on cache space
|
||||||
- sh build.sh
|
- "{ [ -f nim/$NIMVER/bin/nim ] && [ -f nim/$NIMVER/bin/nimble ] ; } ||
|
||||||
- cd ..
|
{ rm -rf nim ;
|
||||||
- export PATH=$PWD/bin:$PATH
|
mkdir -p nim ;
|
||||||
- nim c koch
|
git clone --depth=1 https://github.com/status-im/nim.git nim/$NIMVER ;
|
||||||
- ./koch boot -d:release
|
cd nim/$NIMVER ;
|
||||||
- ./koch nimble
|
sh build_all.sh ;
|
||||||
- cd ..
|
rm -rf csources ;
|
||||||
|
cd ../.. ;
|
||||||
|
}"
|
||||||
|
- "export PATH=$PWD/nim/$NIMVER/bin:$PATH"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- nimble install -dy && nimble test
|
- nimble install -y
|
||||||
|
- nimble test
|
||||||
|
|
Loading…
Reference in New Issue