mirror of
https://github.com/status-im/nim-rocksdb.git
synced 2025-02-21 11:28:29 +00:00
add .appveyor.yml; use build_nim.sh and build_rocksdb.sh
This commit is contained in:
parent
22ab21a5ef
commit
9d309f07d5
50
.appveyor.yml
Normal file
50
.appveyor.yml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
version: '{build}'
|
||||||
|
|
||||||
|
image: Visual Studio 2015
|
||||||
|
|
||||||
|
cache:
|
||||||
|
- nimbus-deps.zip -> .appveyor.yml
|
||||||
|
- NimBinaries
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
# We always want 32 and 64-bit compilation
|
||||||
|
fast_finish: false
|
||||||
|
|
||||||
|
platform:
|
||||||
|
- x86
|
||||||
|
- x64
|
||||||
|
|
||||||
|
# when multiple CI builds are queued, the tested commit needs to be in the last X commits cloned with "--depth X"
|
||||||
|
clone_depth: 10
|
||||||
|
|
||||||
|
install:
|
||||||
|
- SET "ROCKSDB_URL=https://github.com/status-im/nimbus-deps/releases/download/nimbus-deps/nimbus-deps.zip"
|
||||||
|
- SET "ROCKSDB_ARCHIVE=nimbus-deps.zip"
|
||||||
|
|
||||||
|
# use the newest versions documented here: https://www.appveyor.com/docs/windows-images-software/#mingw-msys-cygwin
|
||||||
|
- 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%
|
||||||
|
|
||||||
|
- MKDIR %CD%\bin
|
||||||
|
- SET PATH=%CD%\bin;%CD%\Nim\bin;%PATH%
|
||||||
|
|
||||||
|
# Unpack rocksdb
|
||||||
|
- IF not exist "%ROCKSDB_ARCHIVE%" appveyor DownloadFile "%ROCKSDB_URL%" -FileName "%ROCKSDB_ARCHIVE%"
|
||||||
|
- 7z x -y "%ROCKSDB_ARCHIVE%" > nul
|
||||||
|
- IF "%PLATFORM%" == "x64" ( copy %CD%\x64\librocksdb.dll %CD%\bin\librocksdb.dll ) ELSE ( copy %CD%\x86\librocksdb.dll %CD%\bin\librocksdb.dll )
|
||||||
|
|
||||||
|
# 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
|
||||||
|
- 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%
|
||||||
|
- bash -c "nimble install -y"
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
- nimble test
|
||||||
|
|
||||||
|
deploy: off
|
||||||
|
|
67
.travis.yml
67
.travis.yml
@ -1,63 +1,44 @@
|
|||||||
language: c
|
language: c
|
||||||
|
|
||||||
cache: ccache
|
# https://docs.travis-ci.com/user/caching/
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- NimBinaries
|
||||||
|
- rocksdbCache
|
||||||
|
|
||||||
|
git:
|
||||||
|
# when multiple CI builds are queued, the tested commit needs to be in the last X commits cloned with "--depth X"
|
||||||
|
depth: 10
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Build and test against the master (stable) and devel branches of Nim
|
|
||||||
# Build and test using both gcc and clang
|
# Build and test using both gcc and clang
|
||||||
# For faster testing we don't test clang on linux, only on macOS
|
# For faster testing we don't test clang on linux, only on macOS
|
||||||
- os: linux
|
- os: linux
|
||||||
env:
|
|
||||||
- CHANNEL=stable
|
|
||||||
# - CHANNEL=devel
|
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
sudo: required
|
sudo: required
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
before_install:
|
before_install:
|
||||||
# RocksDB is packaged for Ubuntu 16.04+ or Debian Stretch only
|
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
|
||||||
# Travis only supports 14.04 at the moment
|
|
||||||
- docker pull statusteam/nim-base
|
|
||||||
|
|
||||||
## Travis OSX version is too old and does not have rocksdb
|
|
||||||
- os: osx
|
- os: osx
|
||||||
env: CHANNEL=stable
|
|
||||||
compiler: clang
|
compiler: clang
|
||||||
addons:
|
before_install:
|
||||||
homebrew:
|
- launchctl setenv LIBRARY_PATH /usr/local/lib # for RocksDB
|
||||||
packages:
|
|
||||||
- rocksdb
|
|
||||||
|
|
||||||
#allow_failures:
|
|
||||||
## Ignore failures when building against the devel Nim branch
|
|
||||||
## Also ignore OSX, due to very long build time for Travis
|
|
||||||
#- env: CHANNEL=devel
|
|
||||||
#- os: osx
|
|
||||||
fast_finish: true
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- if [ $TRAVIS_OS_NAME = osx ]; then
|
# build nim from our own branch - this to avoid the day-to-day churn and
|
||||||
export CHOOSENIM_NO_ANALYTICS=1;
|
# regressions of the fast-paced Nim development while maintaining the
|
||||||
curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh;
|
# flexibility to apply patches
|
||||||
sh init.sh -y;
|
- curl -O -L -s -S https://raw.githubusercontent.com/status-im/nimbus/devel/build_nim.sh
|
||||||
export PATH=~/.nimble/bin:$PATH;
|
- env MAKE="make -j2" bash build_nim.sh Nim csources dist/nimble NimBinaries
|
||||||
echo "export PATH=~/.nimble/bin:$PATH" >> ~/.profile;
|
- export PATH=$PWD/Nim/bin:$PATH
|
||||||
choosenim $CHANNEL;
|
|
||||||
fi;
|
# build our own rocksdb to test with a fixed version that we think works
|
||||||
- if [ $TRAVIS_OS_NAME = linux ]; then
|
- curl -O -L -s -S https://raw.githubusercontent.com/status-im/nimbus/devel/build_rocksdb.sh
|
||||||
docker run statusteam/nim-base nim --version;
|
- bash build_rocksdb.sh rocksdbCache
|
||||||
fi;
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if [ $TRAVIS_OS_NAME = osx ]; then
|
- nimble install -y
|
||||||
nimble refresh;
|
- nimble test
|
||||||
nimble test;
|
|
||||||
fi;
|
|
||||||
- if [ $TRAVIS_OS_NAME = linux ]; then
|
|
||||||
docker run -v "$(pwd):/project" -w /project statusteam/nim-base run "apt-get -qq update && apt-get install -y librocksdb-dev && nimble install -y && nimble test";
|
|
||||||
fi;
|
|
||||||
|
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user