From 33494634aaa68bdeb75f5f7d55a46b92065628af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 14 Aug 2019 20:43:02 +0200 Subject: [PATCH] CI: LFS support for the beacon-chain tests - Travis: switch language - AppVeyor: disable `mingw32-make go-checks` for now - `make update`: export GIT_LFS_SKIP_SMUDGE=1 - CI: disable the LFS script inside Makefile, since we run it separately (and git-lfs is not installed in the Travis macOS image if we found a valid cache). --- .appveyor.yml | 9 ++++++--- .travis.yml | 11 +++++++++-- Makefile | 4 ++-- vendor/nim-beacon-chain | 2 +- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index f0bb5815b..c92171dd3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,6 +9,7 @@ environment: cache: - NimBinaries + - jsonTestsCache matrix: # We always want 32-bit and 64-bit compilation @@ -27,7 +28,7 @@ install: - IF "%PLATFORM%" == "x64" SET PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH% build_script: - - cd C:\projects\%APPVEYOR_PROJECT_SLUG% + #- cd C:\projects\%APPVEYOR_PROJECT_SLUG% # the 32-bit build is done on a 64-bit image, so we need to override the architecture - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% CI_CACHE=NimBinaries update - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% fetch-dlls @@ -38,8 +39,10 @@ test_script: - build\nimbus.exe --help - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% test - IF "%PLATFORM%" == "x64" mingw32-make -j2 test-reproducibility - - mingw32-make -C vendor/nim-beacon-chain -j2 test - - mingw32-make go-checks + # LFS test fixtures + - cd vendor\nim-beacon-chain & bash scripts\process_lfs.sh ..\..\jsonTestsCache & cd ..\.. + - mingw32-make -C vendor/nim-beacon-chain DISABLE_LFS_SCRIPT=1 -j2 test + #- mingw32-make go-checks deploy: off diff --git a/.travis.yml b/.travis.yml index 87005e255..35da68839 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,11 @@ -language: c +language: go # https://docs.travis-ci.com/user/caching/ cache: directories: - rocksdbCache - vendor/Nim/bin + - jsonTestsCache git: # when multiple CI builds are queued, the tested commit needs to be in the last X commits cloned with "--depth X" @@ -12,6 +13,9 @@ git: # disable LFS file downloading during regular cloning lfs_skip_smudge: true +go: + - "1.12.x" + matrix: include: - os: linux @@ -26,11 +30,14 @@ install: # build our own rocksdb to test with a fixed version that we think works - ./build_rocksdb.sh rocksdbCache + # LFS test fixtures + - cd vendor/nim-beacon-chain; scripts/process_lfs.sh ../../jsonTestsCache; cd ../.. + script: - set -e # fail fast - make -j2 - ./build/nimbus --help - make -j2 test test-reproducibility - - make -C vendor/nim-beacon-chain -j2 test + - make -C vendor/nim-beacon-chain DISABLE_LFS_SCRIPT=1 -j2 test - make go-checks diff --git a/Makefile b/Makefile index c09ddd6d7..63fc049fb 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,7 @@ build-nim: | sanity-checks "$(CURDIR)/build_nim.sh" "$(NIM_DIR)" ../Nim-csources ../nimble "$(CI_CACHE)" #- in case of submodule URL changes, it propagates that change in the parent repo's .git directory -#- initialises and updates the Git submodules +#- initialises and updates the Git submodules, avoiding automated LFS downloads #- manages the AppVeyor cache of Nim compiler binaries #- deletes the ".nimble" dir to force the execution of the "deps" target #- deletes and recreates "nimbus.nims" which on Windows is a copy instead of a proper symlink @@ -168,7 +168,7 @@ build-nim: | sanity-checks #- rebuilds the Nim compiler if the corresponding submodule is updated $(NIM_BINARY) update: | sanity-checks git submodule sync --quiet --recursive - git submodule update --init --recursive + export GIT_LFS_SKIP_SMUDGE=1; git submodule update --init --recursive rm -rf $(NIMBLE_DIR) nimbus.nims && \ $(MAKE) nimbus.nims + $(MAKE) build-nim diff --git a/vendor/nim-beacon-chain b/vendor/nim-beacon-chain index 4daeebbf7..6a4d27f4a 160000 --- a/vendor/nim-beacon-chain +++ b/vendor/nim-beacon-chain @@ -1 +1 @@ -Subproject commit 4daeebbf7e1ce1e86a1acad73714ab24a2747223 +Subproject commit 6a4d27f4ac46b2b3f86b82f2bf56f97da6290007