Skip to content

Commit 24a4914

Browse files
authored
Merge pull request #124 from renproject/fix/zcash-ci
fix: wait longer for daemon to start
2 parents c3ed826 + c1c8f0e commit 24a4914

File tree

2 files changed

+124
-124
lines changed

2 files changed

+124
-124
lines changed

.github/workflows/test.yml

+123-123
Original file line numberDiff line numberDiff line change
@@ -239,129 +239,129 @@ jobs:
239239
-fil=true \
240240
-timeout 1500s
241241
242-
# test-zcash:
243-
# runs-on: ubuntu-latest
244-
# env:
245-
# FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801
246-
# SOLANA_FFI_COMMIT: 1428533377eb4ce00e81d04a53bad92f5339db00
247-
# steps:
248-
# - name: Set up Go 1.16
249-
# uses: actions/setup-go@v1
250-
# with:
251-
# go-version: 1.16
252-
# id: go
253-
#
254-
# - name: Configure git for Private Modules
255-
# env:
256-
# TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
257-
# run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com"
258-
#
259-
# - name: Check out code into the Go module directory
260-
# uses: actions/checkout@v1
261-
# with:
262-
# token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
263-
# submodules: recursive
264-
#
265-
# - name: Caching modules
266-
# uses: actions/cache@v1
267-
# with:
268-
# path: ~/go/pkg/mod
269-
# key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}
270-
#
271-
# - name: Cache extern dependencies (FFI)
272-
# id: cache-extern
273-
# uses: actions/cache@v2
274-
# env:
275-
# cache-name: cache-externs
276-
# with:
277-
# path: .extern
278-
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}
279-
#
280-
# # Remove apt repos that are known to break from time to time
281-
# # See https://github.com/actions/virtual-environments/issues/323
282-
# - name: Install dependency packages
283-
# run: |
284-
# for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
285-
# sudo apt-get update
286-
# sudo apt-get install -y build-essential
287-
# sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev
288-
# curl https://sh.rustup.rs -sSf | sh -s -- -y
289-
# source $HOME/.cargo/env
290-
#
291-
# - name: Get dependencies
292-
# run: |
293-
# export PATH=$PATH:$(go env GOPATH)/bin
294-
# source $HOME/.cargo/env
295-
# go get -u github.com/onsi/ginkgo/ginkgo
296-
# go get -u github.com/onsi/gomega/...
297-
# go get -u golang.org/x/lint/golint
298-
# go get -u github.com/loongy/covermerge
299-
# go get -u github.com/mattn/goveralls
300-
# go get -u github.com/xlab/c-for-go
301-
#
302-
# - name: Install dependencies (Filecoin FFI)
303-
# if: steps.cache-extern.outputs.cache-hit != 'true'
304-
# run: |
305-
# export PATH=$PATH:$(go env GOPATH)/bin
306-
# source $HOME/.cargo/env
307-
# cd $GITHUB_WORKSPACE
308-
# mkdir .extern && cd .extern
309-
# git clone https://github.com/filecoin-project/filecoin-ffi.git
310-
# cd filecoin-ffi
311-
# git checkout ${{ env.FILECOIN_FFI_COMMIT }}
312-
# make
313-
#
314-
# - name: Install dependencies (Solana FFI)
315-
# if: steps.cache-extern.outputs.cache-hit != 'true'
316-
# run: |
317-
# export PATH=$PATH:$(go env GOPATH)/bin
318-
# source $HOME/.cargo/env
319-
# cd $GITHUB_WORKSPACE/.extern
320-
# git clone https://github.com/renproject/solana-ffi.git
321-
# cd solana-ffi
322-
# git checkout ${{ env.SOLANA_FFI_COMMIT }}
323-
# make clean
324-
# make
325-
#
326-
# - name: Run vetting
327-
# run: |
328-
# export PATH=$PATH:$(go env GOPATH)/bin
329-
# source $HOME/.cargo/env
330-
# go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi
331-
# go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi
332-
# go vet ./...
333-
#
334-
# - name: Run linting
335-
# run: |
336-
# cd $GITHUB_WORKSPACE
337-
# export PATH=$PATH:$(go env GOPATH)/bin
338-
# go get -u golang.org/x/lint/golint
339-
# golint $(go list ./... | grep -v filecoin-ffi)
340-
#
341-
# - name: Run multichain infrastructure
342-
# run: |
343-
# cd $GITHUB_WORKSPACE/infra
344-
# source .env
345-
# docker-compose up -d --build zcash
346-
#
347-
# - name: Sleep until the nodes are up
348-
# uses: jakejarvis/wait-action@master
349-
# with:
350-
# time: '1m'
351-
#
352-
# - name: Check on docker containers
353-
# run: docker ps -a
354-
#
355-
# - name: Run tests and report test coverage
356-
# env:
357-
# COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
358-
# run: |
359-
# export PATH=$PATH:$(go env GOPATH)/bin
360-
# source ./infra/.env
361-
# cd $GITHUB_WORKSPACE
362-
# go test \
363-
# -zec=true \
364-
# -timeout 1500s
242+
test-zcash:
243+
runs-on: ubuntu-latest
244+
env:
245+
FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801
246+
SOLANA_FFI_COMMIT: 1428533377eb4ce00e81d04a53bad92f5339db00
247+
steps:
248+
- name: Set up Go 1.16
249+
uses: actions/setup-go@v1
250+
with:
251+
go-version: 1.16
252+
id: go
253+
254+
- name: Configure git for Private Modules
255+
env:
256+
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
257+
run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com"
258+
259+
- name: Check out code into the Go module directory
260+
uses: actions/checkout@v1
261+
with:
262+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
263+
submodules: recursive
264+
265+
- name: Caching modules
266+
uses: actions/cache@v1
267+
with:
268+
path: ~/go/pkg/mod
269+
key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}
270+
271+
- name: Cache extern dependencies (FFI)
272+
id: cache-extern
273+
uses: actions/cache@v2
274+
env:
275+
cache-name: cache-externs
276+
with:
277+
path: .extern
278+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}
279+
280+
# Remove apt repos that are known to break from time to time
281+
# See https://github.com/actions/virtual-environments/issues/323
282+
- name: Install dependency packages
283+
run: |
284+
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
285+
sudo apt-get update
286+
sudo apt-get install -y build-essential
287+
sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev
288+
curl https://sh.rustup.rs -sSf | sh -s -- -y
289+
source $HOME/.cargo/env
290+
291+
- name: Get dependencies
292+
run: |
293+
export PATH=$PATH:$(go env GOPATH)/bin
294+
source $HOME/.cargo/env
295+
go get -u github.com/onsi/ginkgo/ginkgo
296+
go get -u github.com/onsi/gomega/...
297+
go get -u golang.org/x/lint/golint
298+
go get -u github.com/loongy/covermerge
299+
go get -u github.com/mattn/goveralls
300+
go get -u github.com/xlab/c-for-go
301+
302+
- name: Install dependencies (Filecoin FFI)
303+
if: steps.cache-extern.outputs.cache-hit != 'true'
304+
run: |
305+
export PATH=$PATH:$(go env GOPATH)/bin
306+
source $HOME/.cargo/env
307+
cd $GITHUB_WORKSPACE
308+
mkdir .extern && cd .extern
309+
git clone https://github.com/filecoin-project/filecoin-ffi.git
310+
cd filecoin-ffi
311+
git checkout ${{ env.FILECOIN_FFI_COMMIT }}
312+
make
313+
314+
- name: Install dependencies (Solana FFI)
315+
if: steps.cache-extern.outputs.cache-hit != 'true'
316+
run: |
317+
export PATH=$PATH:$(go env GOPATH)/bin
318+
source $HOME/.cargo/env
319+
cd $GITHUB_WORKSPACE/.extern
320+
git clone https://github.com/renproject/solana-ffi.git
321+
cd solana-ffi
322+
git checkout ${{ env.SOLANA_FFI_COMMIT }}
323+
make clean
324+
make
325+
326+
- name: Run vetting
327+
run: |
328+
export PATH=$PATH:$(go env GOPATH)/bin
329+
source $HOME/.cargo/env
330+
go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi
331+
go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi
332+
go vet ./...
333+
334+
- name: Run linting
335+
run: |
336+
cd $GITHUB_WORKSPACE
337+
export PATH=$PATH:$(go env GOPATH)/bin
338+
go get -u golang.org/x/lint/golint
339+
golint $(go list ./... | grep -v filecoin-ffi)
340+
341+
- name: Run multichain infrastructure
342+
run: |
343+
cd $GITHUB_WORKSPACE/infra
344+
source .env
345+
docker-compose up -d --build zcash
346+
347+
- name: Sleep until the nodes are up
348+
uses: jakejarvis/wait-action@master
349+
with:
350+
time: '1m'
351+
352+
- name: Check on docker containers
353+
run: docker ps -a
354+
355+
- name: Run tests and report test coverage
356+
env:
357+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
358+
run: |
359+
export PATH=$PATH:$(go env GOPATH)/bin
360+
source ./infra/.env
361+
cd $GITHUB_WORKSPACE
362+
go test \
363+
-zec=true \
364+
-timeout 1500s
365365
366366
test-terra:
367367
runs-on: ubuntu-latest

infra/zcash/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ zcashd \
99
-nuparams=2bb40e60:30 \
1010
-nuparams=f5b9230b:40 \
1111
-nuparams=e9ff75a6:50
12-
sleep 10
12+
sleep 20
1313

1414
echo "ZCASH_ADDRESS=$ADDRESS"
1515

0 commit comments

Comments
 (0)