Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #474 from jovfer/feature/rc_1_3_0
Browse files Browse the repository at this point in the history
Feature/rc 1 3 0
  • Loading branch information
jovfer authored Jan 12, 2018
2 parents d77d5ee + 42206af commit a103c28
Show file tree
Hide file tree
Showing 14 changed files with 530 additions and 82 deletions.
100 changes: 86 additions & 14 deletions Jenkinsfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ def testing() {
stage('Testing') {
parallel([
'ubuntu-test' : { ubuntuTesting() },
'macos-test' : { macosTesting() },
// 'ios-test' : { iosTesting() },
'redhat-test' : { rhelTesting() },
'windows-test': { windowsTesting() }
])
Expand Down Expand Up @@ -68,6 +70,72 @@ def windowsTesting() {
}
}

def macosTesting() {
node('macos') {
stage('MacOS Test') {
try {
echo "MacOS Test: Checkout scm"
checkout scm

dir('libindy') {
echo "MacOS Test: Build"
sh "cargo build"

// TODO testing
}

//TODO wrappers testing
} finally {
step([$class: 'WsCleanup'])
}
}
}
}

def iosTesting() {
node('macos') {
stage('iOS Test') {
try {
echo "iOS Test: Checkout scm"
checkout scm

echo "iOS Test: Running pool"
sh "docker build -f ci/indy-pool.dockerfile -t indy_pool ci"
sh "docker run -d --network host --name indy_pool -p 9701-9708:9701-9708 indy_pool"

dir('libindy') {
echo 'iOS Test: build libindy pod'
sh './build-libindy-ios.sh'
}

dir('wrappers/ios/libindy-pod') {
echo "iOS Test: Installing dependencies (pods)"
sh "pod install"
}

// FIXME replace this hack (manually rewrite installed pod)
sh "rm -f wrappers/ios/libindy-pod/Pods/libindy/*.[ah]"
sh "cp libindy/out_libindy_pod/*.[ah] wrappers/ios/libindy-pod/Pods/libindy"

dir('wrappers/ios/libindy-pod') {
echo "iOS Test: Testing"
sh "xcodebuild test -workspace Indy.xcworkspace -scheme Indy-demo -destination 'platform=iOS Simulator,name=iPhone 7 Plus,OS=10.3.1'"
}
} finally {
try {
sh "docker stop indy_pool"
} catch (ignore) {
}
try {
sh "docker rm indy_pool"
} catch (ignore) {
}
step([$class: 'WsCleanup'])
}
}
}
}

def ubuntuTesting() {
node('ubuntu') {
stage('Ubuntu Test') {
Expand Down Expand Up @@ -172,27 +240,31 @@ def openPool(env_name, network_name, pool_type = null, pool_ver = null, plenum_v

def closePool(env_name, network_name, poolInst) {
echo "${env_name} Test: Cleanup"
try {
sh "docker network inspect ${network_name}"
} catch (error) {
echo "${env_name} Tests: error while inspect network ${network_name} - ${error}"
if (network_name != null) {
try {
sh "docker network inspect ${network_name}"
} catch (error) {
echo "${env_name} Tests: error while inspect network ${network_name} - ${error}"
}
}
try {
echo "${env_name} Test: stop pool"
poolInst.stop()
} catch (error) {
echo "${env_name} Tests: error while stop pool ${error}"
}
try {
sh "docker ps --format '{{.ID}}' --filter network=${network_name} | xargs docker rm -f"
} catch (error) {
echo "${env_name} Test: error while force clean-up network ${network_name} - ${error}"
}
try {
echo "${env_name} Test: remove pool network ${network_name}"
sh "docker network rm ${network_name}"
} catch (error) {
echo "${env_name} Test: error while delete ${network_name} - ${error}"
if (network_name != null) {
try {
sh "docker ps --format '{{.ID}}' --filter network=${network_name} | xargs docker rm -f"
} catch (error) {
echo "${env_name} Test: error while force clean-up network ${network_name} - ${error}"
}
try {
echo "${env_name} Test: remove pool network ${network_name}"
sh "docker network rm ${network_name}"
} catch (error) {
echo "${env_name} Test: error while delete ${network_name} - ${error}"
}
}
step([$class: 'WsCleanup'])
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ us on [Hyperledger's Rocket.Chat](https://chat.hyperledger.org/) at #indy-sdk to
* [iOS](wrappers/ios/ios-build.md)

## Binaries
Builded binaries can be downloaded from https://repo.sovrin.org/:
Pre-Built binaries can be downloaded from https://repo.sovrin.org/:
* lib/apt/xenial/{master,stable,rc} - Ubuntu deb packages
* windows/libindy/{master,stable,rc} - Windows zip-archive with all required DLLs (include libindy itself) and headers
* windows/libindy/deps/ - Windows zip archive with dependencies (DLLs and headers) to build libindy from sources
Expand Down
23 changes: 23 additions & 0 deletions Specs/libindy-objc/1.3.0/libindy-objc.podspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "libindy-objc",
"version": "1.3.0",
"summary": "Summary TODO.",
"homepage": "TODO",
"license": {
"type": "Apache License 2.0",
"file": "LICENSE"
},
"authors": {
"Daniel Hardman": "[email protected]"
},
"source": {
"http": "https://repo.sovrin.org/ios/libindy/stable/indy-objc/1.3.0/libindy-objc.zip"
},
"platforms": {
"ios": "10.0"
},
"ios": {
"vendored_frameworks": "libindy-objc/Indy.framework"
},
"module_name": "Indy"
}
23 changes: 23 additions & 0 deletions Specs/libindy/1.3.0/libindy.podspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "libindy",
"version": "1.3.0",
"summary": "Summary TODO.",
"description": "Description TODO.",
"homepage": "TODO",
"license": {
"type": "Apache License 2.0",
"file": "LICENSE"
},
"authors": {
"Daniel Hardman": "[email protected]"
},
"platforms": {
"ios": "10.0"
},
"source": {
"http": "https://repo.sovrin.org/ios/libindy/stable/libindy-core/1.3.0/libindy.tar.gz"
},
"source_files": "*.h",
"vendored_libraries": "*.a",
"requires_arc": false
}
44 changes: 40 additions & 4 deletions doc/windows-build.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@
# Setup Indy SDK build environment for Windows

## Build Environment

1. Setup a windows virtual machine. Free images are available at [here](https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/)
1. Launch the virtual machine
1. Download Visual Studio Community Edition 2017
1. Check the boxes for the _Desktop development with C++_ and _Linux Development with C++_
1. In the summary portion on the right hand side also check _C++/CLI support_
1. Click install
1. Download git-scm for windows [here](https://git-scm.com/downloads/win)
1. Install git for windows using:
1. _Use Git from Git Bash Only_ so it doesn't change any path settings of the command prompt
1. _Checkout as is, commit Unix-style line endings_. You shouldn't be commiting anything anyway but just in case
1. _Use MinTTY_
1. Check all the boxes for:
1. Enable file system caching
1. Enable Git Credential Manager
1. Enable symbolic links
1. Download rust for windows [here](https://www.rust-lang.org/en-US/install.html)
1. Choose installation option *1*

## Get/build dependencies

All prebuilt can be downloaded from
https://repo.sovrin.org/windows/libindy/deps/
- Open a the Git Bash command prompt
- Change directories to Downloads:
```bash
cd Downloads
```

- Clone the _indy-sdk_ repository from github.
```bash
git clone https://github.com/hyperledger/indy-sdk.git
```

- Download the prebuilt dependencies [here](https://repo.sovrin.org/windows/libindy/deps/)
- Extract them into the folder _C:\BIN\x64_
> It really doesn't matter where you put these as long as you remember where so you can set
> the environment variables to this path
- If you are not building dependencies from source you may skip to *Build*

### Binary deps

Expand Down Expand Up @@ -44,6 +79,7 @@ Checkout https://github.com/evernym/libzmq-pw repository.

- Get binary dependencies (libamcl*, openssl, libsodium, libzmq, sqlite3).
- Put all *.{lib,dll} into one directory and headers into include/ subdirectory.
- Open a windows command prompt
- Configure MSVS environment to privide 64-bit builds by execution of `vcvars64.bat`:

```
Expand All @@ -61,7 +97,7 @@ Checkout https://github.com/evernym/libzmq-pw repository.
- set OPENSSL_DIR=C:\BIN\x64
- set PATH to find .dlls:
- set PATH=C:\BIN\x64\lib;%PATH%
- change dir to indy-client and run cargo (you may want to add --release --target x86_64-pc-windows-msvc keys to cargo)
- change dir to indy-sdk/libindy and run cargo (you may want to add --release --target x86_64-pc-windows-msvc keys to cargo)

## openssl-sys workaround

Expand Down Expand Up @@ -100,4 +136,4 @@ Then try to rebuild whole project.

```
RUST_TEST_THREADS=1 cargo test
```
```
28 changes: 18 additions & 10 deletions libindy/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions libindy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "indy"
version = "1.2.0"
version = "1.3.0"
authors = [
"Sergej Pupykin <[email protected]>",
"Vyacheslav Gudkov <[email protected]>",
Expand Down Expand Up @@ -44,7 +44,7 @@ libc = "0.2.21"
log = "0.3.7"
openssl = { version = "0.9.11", optional = true }
rand = "0.3"
rusqlite = "0.10.1"
rusqlcipher = { version = "0.14.6", features=["bundled"] }
rust-base58 = {version = "0.0.4", optional = true}
base64 = "0.6.0"
serde = "1.0"
Expand Down
Loading

0 comments on commit a103c28

Please sign in to comment.