use build_nim.sh
This commit is contained in:
parent
6357bc2a98
commit
22f518ae65
|
@ -2,11 +2,15 @@ version: '{build}'
|
|||
|
||||
image: Visual Studio 2015
|
||||
|
||||
environment:
|
||||
# disable LFS file downloading during regular cloning
|
||||
GIT_LFS_SKIP_SMUDGE: 1
|
||||
|
||||
cache:
|
||||
- sqlite-dll-win32-x86-3240000.zip -> .appveyor.yml
|
||||
- sqlite-dll-win64-x64-3240000.zip -> .appveyor.yml
|
||||
- nimbus-deps.zip -> .appveyor.yml
|
||||
- Nim -> .appveyor.yml
|
||||
- NimBinaries
|
||||
|
||||
matrix:
|
||||
# We always want 32 and 64-bit compilation
|
||||
|
@ -53,43 +57,8 @@ install:
|
|||
# build nim from our own branch - this to avoid the day-to-day churn and
|
||||
# regressions of the fast-paced Nim development while maintaining the
|
||||
# flexibility to apply patches
|
||||
- SET "NEED_REBUILD="
|
||||
|
||||
- IF NOT EXIST "Nim\\.git\\" (
|
||||
git clone https://github.com/status-im/Nim.git
|
||||
) ELSE (
|
||||
( 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 || 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
|
||||
)
|
||||
- curl -O -L -s -S https://raw.githubusercontent.com/status-im/nimbus/devel/build_nim.sh
|
||||
- env MAKE="mingw32-make -j2" ARCH_OVERRIDE=%PLATFORM% bash build_nim.sh Nim csources dist/nimble NimBinaries
|
||||
|
||||
build_script:
|
||||
- cd C:\projects\%APPVEYOR_PROJECT_SLUG%
|
||||
|
|
33
.travis.yml
33
.travis.yml
|
@ -1,16 +1,17 @@
|
|||
language: c # or other C/C++ variants
|
||||
|
||||
sudo: false
|
||||
language: c
|
||||
|
||||
# https://docs.travis-ci.com/user/caching/
|
||||
#
|
||||
# Caching the whole nim folder is better than relying on ccache - this way, we
|
||||
# skip the expensive bootstrap process and linking
|
||||
cache:
|
||||
directories:
|
||||
- nim
|
||||
- NimBinaries
|
||||
- rocksdb
|
||||
|
||||
git:
|
||||
# when multiple CI builds are queued, the tested commit needs to be in the last X commits cloned with "--depth X"
|
||||
depth: 10
|
||||
# disable LFS file downloading during regular cloning
|
||||
lfs_skip_smudge: true
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
|
@ -27,21 +28,9 @@ install:
|
|||
# build nim from our own branch - this to avoid the day-to-day churn and
|
||||
# regressions of the fast-paced Nim development while maintaining the
|
||||
# flexibility to apply patches
|
||||
#
|
||||
# check version of remote branch
|
||||
- "export NIMVER=$(git ls-remote https://github.com/status-im/nim.git HEAD | cut -f 1)"
|
||||
|
||||
# after building nim, wipe csources to save on cache space
|
||||
- "{ [ -f nim/$NIMVER/bin/nim ] && [ -f nim/$NIMVER/bin/nimble ] ; } ||
|
||||
{ rm -rf nim ;
|
||||
mkdir -p nim ;
|
||||
git clone --depth=1 https://github.com/status-im/nim.git nim/$NIMVER ;
|
||||
cd nim/$NIMVER ;
|
||||
sh build_all.sh ;
|
||||
rm -rf csources ;
|
||||
cd ../.. ;
|
||||
}"
|
||||
- "export PATH=$PWD/nim/$NIMVER/bin:$PATH"
|
||||
- curl -O -L -s -S https://raw.githubusercontent.com/status-im/nimbus/devel/build_nim.sh
|
||||
- env MAKE="make -j$NPROC" bash build_nim.sh Nim csources dist/nimble NimBinaries
|
||||
- export PATH=$PWD/Nim/bin:$PATH
|
||||
|
||||
# build our own rocksdb to test with a fixed version that we think works
|
||||
- "export ROCKSDBVER=5.14.2"
|
||||
|
|
Loading…
Reference in New Issue