From 22f518ae65e7394215bc9ae8aea7d7e4159712b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 12 Jun 2019 18:15:15 +0200 Subject: [PATCH] use build_nim.sh --- .appveyor.yml | 45 +++++++-------------------------------------- .travis.yml | 33 +++++++++++---------------------- 2 files changed, 18 insertions(+), 60 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index bce7bc5ee..6f5b0da4a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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% diff --git a/.travis.yml b/.travis.yml index 15d115fa7..6d0b56fd2 100644 --- a/.travis.yml +++ b/.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"