Skip to content

Commit

Permalink
Merge pull request #69 from hyperledger-labs/develop
Browse files Browse the repository at this point in the history
Release v0.2.0

Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele authored Sep 7, 2022
2 parents 4f6501d + 2d89a3c commit 04879cc
Show file tree
Hide file tree
Showing 164 changed files with 175 additions and 29,924 deletions.
323 changes: 1 addition & 322 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@ on: [push, pull_request]

env:
CACHE_BIN_RELAYER_KEY: bin-relayer
CACHE_BIN_RELAYER_PATH: ./build/uly
CACHE_DOCKER_FABRIC_KEY: docker-fabric
CACHE_DOCKER_FABRIC_DIR: /tmp/fabric
CACHE_BIN_RELAYER_PATH: ./build/yrly
CACHE_DOCKER_TENDERMINT_KEY: docker-tendermint
CACHE_DOCKER_TENDERMINT_DIR: /tmp/tendermint
CACHE_DOCKER_CORDA_KEY: docker-corda
CACHE_DOCKER_CORDA_DIR: /tmp/corda
CACHE_DOCKER_ETHEREUM_GANACHE_KEY: docker-ethereum-ganache
CACHE_DOCKER_ETHEREUM_GANACHE_DIR: /tmp/ethereum/ganache

jobs:
relayer-build:
Expand Down Expand Up @@ -64,122 +58,6 @@ jobs:
run: |
./save_docker_images $CACHE_DOCKER_TENDERMINT_DIR tendermint-chain0:latest tendermint-chain1:latest
fabric-build:
name: fabric-build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache-docker-fabric
with:
path: ${{ env.CACHE_DOCKER_FABRIC_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_FABRIC_KEY }}-${{ hashFiles('tests/chains/fabric/**', '!**/.git/**') }}
- name: Download Fabric binaries
id: download-fabric-binaries
if: steps.cache-docker-fabric.outputs.cache-hit != 'true'
working-directory: ./tests/chains/fabric
run: make bin
- name: Create snapshot
id: scaffold
if: steps.cache-docker-fabric.outputs.cache-hit != 'true'
working-directory: ./tests/chains/fabric
run: |
make initial-data snapshot
- name: Build docker images
if: steps.cache-docker-fabric.outputs.cache-hit != 'true'
working-directory: ./tests/chains/fabric
run: |
make docker-images
- name: Save docker images
if: steps.cache-docker-fabric.outputs.cache-hit != 'true'
working-directory: ./tests/scripts
run: |
./save_docker_images $CACHE_DOCKER_FABRIC_DIR \
fabric-orderer:latest \
fabric-data:latest \
fabric-peer0-org1:latest \
fabric-chaincode-org1:latest \
fabric-peer0-org2:latest \
fabric-chaincode-org2:latest
corda-build:
name: corda-build
runs-on: ubuntu-20.04
needs:
- fabric-build
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/cache@v2
id: cache-docker-corda
with:
path: ${{ env.CACHE_DOCKER_CORDA_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_CORDA_KEY }}-${{ hashFiles('tests/chains/corda/**', 'tests/chains/fabric/**', '!**/.git/**') }}
- name: Restore Fabric docker image cache
if: steps.cache-docker-corda.outputs.cache-hit != 'true'
uses: actions/cache@v2
with:
path: ${{ env.CACHE_DOCKER_FABRIC_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_FABRIC_KEY }}-${{ hashFiles('tests/chains/fabric/**', '!**/.git/**') }}
- name: Load Fabric docker images
if: steps.cache-docker-corda.outputs.cache-hit != 'true'
working-directory: ./tests/scripts
run: |
./load_docker_images $CACHE_DOCKER_FABRIC_DIR \
fabric-chaincode-org1:latest
- name: Build docker images
if: steps.cache-docker-corda.outputs.cache-hit != 'true'
working-directory: ./tests/chains/corda
run: |
make docker-images
make rebuild-chaincode1-image
- name: Save docker images
if: steps.cache-docker-corda.outputs.cache-hit != 'true'
working-directory: ./tests/scripts
run: |
./save_docker_images $CACHE_DOCKER_CORDA_DIR \
yui-corda-ibc:latest \
yui-corda-ibc-client:latest \
fabric-chaincode-org1:latest
ethereum-build:
name: ethereum-build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
- uses: actions/cache@v2
id: cache-docker-ethereum-ganache
with:
path: ${{ env.CACHE_DOCKER_ETHEREUM_GANACHE_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_ETHEREUM_GANACHE_KEY }}-${{ hashFiles('tests/chains/ethereum/**', '!**/.git/**') }}
- uses: actions/cache@v2
id: cache-ethereum-contract
if: steps.cache-docker-ethereum-ganache.outputs.cache-hit != 'true'
with:
path: tests/chains/ethereum/contract/node_modules
key: ${{ runner.os }}-ethereum-contract-${{ hashFiles('tests/chains/ethereum/contract/package-lock.json') }}
restore-keys: |
${{ runner.os }}-ethereum-contract-
- name: Install node_modules
if: steps.cache-docker-ethereum-ganache.outputs.cache-hit != 'true'
working-directory: ./tests/chains/ethereum/contract
run: |
npm install
- name: Build docker images
if: steps.cache-docker-ethereum-ganache.outputs.cache-hit != 'true'
working-directory: ./tests/chains/ethereum
run: |
make docker-images
- name: Save docker images
if: steps.cache-docker-ethereum-ganache.outputs.cache-hit != 'true'
working-directory: ./tests/scripts
run: |
./save_docker_images $CACHE_DOCKER_ETHEREUM_GANACHE_DIR ethereum-ganache0:latest ethereum-ganache1:latest
tm2tm-test:
name: tm2tm-test
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -208,202 +86,3 @@ jobs:
make network
make test
make network-down
tm2fab-test:
name: tm2fab-test
runs-on: ubuntu-20.04
needs:
- relayer-build
- tendermint-build
- fabric-build
steps:
- uses: actions/checkout@v2
- name: Restore relayer binary cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_BIN_RELAYER_PATH }}
key: ${{ runner.os }}-${{ env.CACHE_BIN_RELAYER_KEY }}-${{ github.sha }}
- name: Restore Tendermint docker image cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_DOCKER_TENDERMINT_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_TENDERMINT_KEY }}-${{ hashFiles('tests/chains/tendermint/**', '!**/.git/**') }}
- name: Load Tendermint docker image
working-directory: ./tests/scripts
run: |
./load_docker_images $CACHE_DOCKER_TENDERMINT_DIR tendermint-chain0:latest
- name: Restore Fabric docker image cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_DOCKER_FABRIC_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_FABRIC_KEY }}-${{ hashFiles('tests/chains/fabric/**', '!**/.git/**') }}
- name: Load Fabric docker images
working-directory: ./tests/scripts
run: |
./load_docker_images $CACHE_DOCKER_FABRIC_DIR \
fabric-orderer:latest \
fabric-data:latest \
fabric-peer0-org1:latest \
fabric-chaincode-org1:latest
- name: Run Test
working-directory: ./tests/cases/tm2fab
run: |
make network
make test
make network-down
fab2fab-test:
name: fab2fab-test
runs-on: ubuntu-20.04
needs:
- relayer-build
- fabric-build
steps:
- uses: actions/checkout@v2
- name: Restore relayer binary cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_BIN_RELAYER_PATH }}
key: ${{ runner.os }}-${{ env.CACHE_BIN_RELAYER_KEY }}-${{ github.sha }}
- name: Restore Fabric docker image cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_DOCKER_FABRIC_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_FABRIC_KEY }}-${{ hashFiles('tests/chains/fabric/**', '!**/.git/**') }}
- name: Load Fabric docker image
working-directory: ./tests/scripts
run: |
./load_docker_images $CACHE_DOCKER_FABRIC_DIR \
fabric-orderer:latest \
fabric-data:latest \
fabric-peer0-org1:latest \
fabric-chaincode-org1:latest \
fabric-peer0-org2:latest \
fabric-chaincode-org2:latest
- name: Run Test
working-directory: ./tests/cases/fab2fab
run: |
make network
make test
make network-down
corda2fab-test:
name: corda2fab-test
runs-on: ubuntu-20.04
needs:
- relayer-build
- corda-build
- fabric-build
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Restore relayer binary cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_BIN_RELAYER_PATH }}
key: ${{ runner.os }}-${{ env.CACHE_BIN_RELAYER_KEY }}-${{ github.sha }}
- name: Restore Fabric docker image cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_DOCKER_FABRIC_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_FABRIC_KEY }}-${{ hashFiles('tests/chains/fabric/**', '!**/.git/**') }}
- name: Load Fabric docker images
working-directory: ./tests/scripts
run: |
./load_docker_images $CACHE_DOCKER_FABRIC_DIR \
fabric-orderer:latest \
fabric-data:latest \
fabric-peer0-org1:latest \
fabric-chaincode-org1:latest
- name: Restore Corda docker image cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_DOCKER_CORDA_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_CORDA_KEY }}-${{ hashFiles('tests/chains/corda/**', 'tests/chains/fabric/**', '!**/.git/**') }}
- name: Load Corda docker images
working-directory: ./tests/scripts
run: |
./load_docker_images $CACHE_DOCKER_CORDA_DIR \
yui-corda-ibc:latest \
yui-corda-ibc-client:latest \
fabric-chaincode-org1:latest
- name: Run Test
working-directory: ./tests/cases/corda2fab
run: |
make network
make test
make network-down
corda2corda-test:
name: corda2corda-test
runs-on: ubuntu-20.04
needs:
- relayer-build
- corda-build
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Restore relayer binary cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_BIN_RELAYER_PATH }}
key: ${{ runner.os }}-${{ env.CACHE_BIN_RELAYER_KEY }}-${{ github.sha }}
- name: Restore Corda docker image cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_DOCKER_CORDA_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_CORDA_KEY }}-${{ hashFiles('tests/chains/corda/**', 'tests/chains/fabric/**', '!**/.git/**') }}
- name: Load Corda docker images
working-directory: ./tests/scripts
run: |
./load_docker_images $CACHE_DOCKER_CORDA_DIR \
yui-corda-ibc:latest \
yui-corda-ibc-client:latest
- name: Run Test
working-directory: ./tests/cases/corda2corda
run: |
make network
make test
make network-down
tm2eth-test:
name: tm2eth-test
runs-on: ubuntu-20.04
needs:
- relayer-build
- tendermint-build
- ethereum-build
steps:
- uses: actions/checkout@v2
- name: Restore relayer binary cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_BIN_RELAYER_PATH }}
key: ${{ runner.os }}-${{ env.CACHE_BIN_RELAYER_KEY }}-${{ github.sha }}
- name: Restore Tendermint docker image cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_DOCKER_TENDERMINT_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_TENDERMINT_KEY }}-${{ hashFiles('tests/chains/tendermint/**', '!**/.git/**') }}
- name: Load Tendermint docker image
working-directory: ./tests/scripts
run: |
./load_docker_images $CACHE_DOCKER_TENDERMINT_DIR tendermint-chain0:latest
- name: Restore Ethereum docker image cache
uses: actions/cache@v2
with:
path: ${{ env.CACHE_DOCKER_ETHEREUM_GANACHE_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_ETHEREUM_GANACHE_KEY }}-${{ hashFiles('tests/chains/ethereum/**', '!**/.git/**') }}
- name: Load Ethereum docker image
working-directory: ./tests/scripts
run: |
./load_docker_images $CACHE_DOCKER_ETHEREUM_GANACHE_DIR \
ethereum-ganache0:latest
- name: Run Test
working-directory: ./tests/cases/tm2eth
run: |
make network
make test
make network-down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build
build:
go build -o ./build/uly .
go build -o ./build/yrly .

.PHONY: test
test:
Expand All @@ -9,4 +9,4 @@ test:
.PHONY: proto-gen
proto-gen:
@echo "Generating Protobuf files"
docker run -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh
docker run -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen:v0.3 sh ./scripts/protocgen.sh
Loading

0 comments on commit 04879cc

Please sign in to comment.