remove last traces of git-lfs usage

This commit is contained in:
Ștefan Talpalaru 2019-11-22 14:21:16 +01:00 committed by Dustin Brody
parent 41fa377638
commit e46e9b12a2
7 changed files with 15 additions and 21 deletions

View File

@ -2,10 +2,6 @@ version: '{build}'
image: Visual Studio 2015
environment:
# disable LFS file downloading during regular cloning
GIT_LFS_SKIP_SMUDGE: 1
init: # Scripts called at the very beginning
# Enable paths > 260 characters
- ps: Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
@ -30,7 +26,7 @@ install:
- IF "%PLATFORM%" == "x86" SET PATH=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;%PATH%
- IF "%PLATFORM%" == "x64" SET PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
# LFS test fixtures
# official test fixtures
- bash scripts\setup_official_tests.sh jsonTestsCache
build_script:
@ -41,6 +37,6 @@ build_script:
test_script:
# the "go-checks" target fails in AppVeyor, for some reason; easier to disable than to debug
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_GO_CHECKS=1 P2PD_CACHE=p2pdCache
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_LFS_SCRIPT=1 DISABLE_GO_CHECKS=1 test
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% DISABLE_TEST_FIXTURES_SCRIPT=1 DISABLE_GO_CHECKS=1 test
deploy: off

View File

@ -13,8 +13,6 @@ cache:
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
go:
- "1.12.x"
@ -50,11 +48,12 @@ matrix:
install:
# LFS test fixtures
# official test fixtures
- scripts/setup_official_tests.sh jsonTestsCache
script:
- set -e # fail fast
- make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" update # to allow a newer Nim version to be detected
- make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}"
- make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" DISABLE_LFS_SCRIPT=1 test
- make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" DISABLE_TEST_FIXTURES_SCRIPT=1 test

1
Jenkinsfile vendored
View File

@ -1,6 +1,5 @@
node('linux') {
stage('Clone') {
env.GIT_LFS_SKIP_SMUDGE = 1
checkout scm
}
stage('Build') {

View File

@ -24,7 +24,7 @@ all: | build-system-checks $(TOOLS)
# must be included after the default target
-include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk
GIT_SUBMODULE_UPDATE := export GIT_LFS_SKIP_SMUDGE=1; git submodule update --init --recursive
GIT_SUBMODULE_UPDATE := git submodule update --init --recursive
build-system-checks:
@[[ -e "$(BUILD_SYSTEM_DIR)/makefiles" ]] || { \
echo -e "'$(BUILD_SYSTEM_DIR)/makefiles' not found. Running '$(GIT_SUBMODULE_UPDATE)'.\n"; \
@ -52,9 +52,9 @@ p2pd: | go-checks
# Windows 10 with WSL enabled, but no distro installed, fails if "../../nimble.sh" is executed directly
# in a Makefile recipe but works when prefixing it with `bash`. No idea how the PATH is overridden.
DISABLE_LFS_SCRIPT := 0
DISABLE_TEST_FIXTURES_SCRIPT := 0
test: | build deps
ifeq ($(DISABLE_LFS_SCRIPT), 0)
ifeq ($(DISABLE_TEST_FIXTURES_SCRIPT), 0)
V=$(V) scripts/setup_official_tests.sh
endif
$(ENV_SCRIPT) nim test $(NIM_PARAMS) beacon_chain.nims && rm -f 0000-*.json

View File

@ -24,7 +24,7 @@ jobs:
path: p2pdCache
- task: CacheBeta@1
displayName: 'cache LFS JSON fixtures'
displayName: 'cache official test fixtures'
inputs:
key: jsonTestsCache
path: jsonTestsCache
@ -64,12 +64,11 @@ jobs:
export PATH="/c/custom/${MINGW_DIR}/bin:$PATH"
echo "Fetching submodules"
git config --global core.longpaths true
export GIT_LFS_SKIP_SMUDGE=1
git submodule --quiet update --init --recursive
scripts/setup_official_tests.sh jsonTestsCache
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinaries update
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} fetch-dlls
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} P2PD_CACHE=p2pdCache
file build/beacon_node
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} DISABLE_LFS_SCRIPT=1 test
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} DISABLE_TEST_FIXTURES_SCRIPT=1 test
displayName: 'build and test'

View File

@ -63,6 +63,3 @@ task test, "Run all tests":
# State sim; getting into 4th epoch useful to trigger consensus checks
buildBinary "state_sim", "research/", "-r -d:release", "--validators=128 --slots=40"
task sync_lfs_tests, "Sync LFS json tests":
# Syncs the json test files (but not the EF yaml tests)
exec "scripts/setup_official_tests.sh"

View File

@ -13,7 +13,7 @@ SUBREPO_DIR="tests/official/fixtures"
# verbosity level
[[ -z "$V" ]] && V=0
[[ -z "$BUILD_MSG" ]] && BUILD_MSG="Downloading official test vectors"
CACHE_DIR="$1" # optional parameter pointing to a CI cache dir. Without it, we just download the LFS files for a local `make test`.
CACHE_DIR="$1" # optional parameter pointing to a CI cache dir. Without it, we just download the test vectors for a local `make test`.
[[ -d "${SUBREPO_DIR}" ]] || { echo "This script should be run from the \"nim-beacon-chain\" repo top dir."; exit 1; }
@ -25,10 +25,14 @@ echo -e "$BUILD_MSG"
# Main()
if [[ -n "${CACHE_DIR}" ]]; then
# delete old cache entries we no longer use (let this run for a month or so)
rm -f "${CACHE_DIR}"/*.tar.xz
# Ethereum Foundation test vectors
mkdir -p "${CACHE_DIR}/tarballs"
rm -rf "${SUBREPO_DIR}/tarballs"
ln -s "$(pwd -P)/${CACHE_DIR}/tarballs" "${SUBREPO_DIR}"
# (the dir symlink above also takes care of updating the cache)
fi
pushd "${SUBREPO_DIR}"