diff --git a/.github/workflows/zcashd-nightly.yml b/.github/workflows/zcashd-nightly.yml new file mode 100644 index 00000000..52017310 --- /dev/null +++ b/.github/workflows/zcashd-nightly.yml @@ -0,0 +1,95 @@ +name: zcashd-nightly + +on: + workflow_dispatch: + push: + branches: [ "main" ] + +jobs: + install-zcashd: + runs-on: ubuntu-latest + steps: + - name: clone zcashd + run: git clone https://github.com/zcash/zcash + - name: build zcashd + run: | + cd zcash + ./zcutil/build.sh -j$(nproc) + - uses: actions/upload-artifact@v2 + with: + name: zcashd-fetch-params + path: ./zcash/zcutil/fetch-params.sh + - uses: actions/upload-artifact@v2 + with: + name: zcashd-executable + path: ./zcash/src/zcashd + + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - uses: Swatinem/rust-cache@v1 + - uses: actions-rs/cargo@v1 + with: + command: test + args: --all-targets --no-run + - uses: actions/upload-artifact@v2 + with: + name: ziggurat-executable + path: ./target/debug/deps/ziggurat-* + + test-zcashd: + runs-on: ubuntu-latest + needs: [ check, install-zcashd ] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/download-artifact@v3 + with: + name: zcashd-fetch-params + path: ./zcash + - uses: actions/download-artifact@v3 + with: + name: zcashd-executable + path: ./zcash + - uses: actions/download-artifact@v3 + with: + name: ziggurat-executable + path: ./ziggurat + - name: Create ~/.ziggurat/config.toml + run: | + mkdir ~/.ziggurat/ + touch ~/.ziggurat/config.toml + echo kind = \"zcashd\" >> ~/.ziggurat/config.toml + echo path = \"/home/runner/work/ziggurat/ziggurat/zcash\" >> ~/.ziggurat/config.toml + echo start_command = \"./zcashd -debug=1 -printtoconsole -logips=1 -dnsseed=0 -dns=0 -listenonion=0\" >> ~/.ziggurat/config.toml + - name: Fetch zcashd params + run: | + chmod +x zcash/fetch-params.sh + ./zcash/fetch-params.sh + - name: Run ziggurat suite + continue-on-error: true + env: + FILENAME: ${{ github.event.repository.updated_at }} + run: | + rm ./ziggurat/*.d + mv ./ziggurat/ziggurat-* ziggurat_test + chmod +x ziggurat_test + chmod +x zcash/zcashd + mkdir -p results + ./ziggurat_test --test-threads=1 --nocapture -Z unstable-options --report-time --format json > results/$FILENAME.jsonl + rm -r results/latest.jsonl + cp results/$FILENAME.jsonl results/latest.jsonl + - name: git + run: | + git config user.name "GitHub Actions Bot" + git config user.email "<>" + git add results + git commit -m "ci: zcashd suite results" + git push diff --git a/.github/workflows/zcashd.yml b/.github/workflows/zcashd.yml index 9814991f..cfef6229 100644 --- a/.github/workflows/zcashd.yml +++ b/.github/workflows/zcashd.yml @@ -3,9 +3,7 @@ name: zcashd on: workflow_dispatch: push: - branches: [ "zcash-ci" ] - # pull_request: - # branches: [ main ] + branches: [ "main" ] jobs: install-zcashd: @@ -13,14 +11,14 @@ jobs: steps: - name: clone zcashd run: git clone https://github.com/zcash/zcash - - name: fetch params - run: | - cd zcash - ./zcutil/fetch-params.sh - name: build zcashd run: | cd zcash ./zcutil/build.sh -j$(nproc) + - uses: actions/upload-artifact@v2 + with: + name: zcashd-fetch-params + path: ./zcash/zcutil/fetch-params.sh - uses: actions/upload-artifact@v2 with: name: zcashd-executable @@ -49,25 +47,37 @@ jobs: runs-on: ubuntu-latest needs: [ check, install-zcashd ] steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/download-artifact@v3 + with: + name: zcashd-fetch-params + path: ./zcash - uses: actions/download-artifact@v3 with: name: zcashd-executable - path: ./zcashd + path: ./zcash - uses: actions/download-artifact@v3 with: name: ziggurat-executable path: ./ziggurat - name: Create ~/.ziggurat/config.toml run: | - git clone https://github.com/zcash/zcash mkdir ~/.ziggurat/ touch ~/.ziggurat/config.toml echo kind = \"zcashd\" >> ~/.ziggurat/config.toml - echo path = \"./zcash\" >> ~/.ziggurat/config.toml - echo start_command = \"../zcashd -debug=1 -printtoconsole -logips=1 -dnsseed=0 -dns=0 -listenonion=0\" >> ~/.ziggurat/config.toml - - run: | + echo path = \"/home/runner/work/ziggurat/ziggurat/zcash\" >> ~/.ziggurat/config.toml + echo start_command = \"./zcashd -debug=1 -printtoconsole -logips=1 -dnsseed=0 -dns=0 -listenonion=0\" >> ~/.ziggurat/config.toml + - name: Fetch zcashd params + run: | + chmod +x zcash/fetch-params.sh + ./zcash/fetch-params.sh + - name: Run ziggurat suite + continue-on-error: true + run: | rm ./ziggurat/*.d mv ./ziggurat/ziggurat-* ziggurat_test chmod +x ziggurat_test - chmod +x zcashd - ./ziggurat_test --test-threads=1 + chmod +x zcash/zcashd + ./ziggurat_test --test-threads=1 --nocapture diff --git a/.github/workflows/zebra.yml b/.github/workflows/zebra.yml index e4b817e7..ad92c42c 100644 --- a/.github/workflows/zebra.yml +++ b/.github/workflows/zebra.yml @@ -3,9 +3,7 @@ name: Zebra on: workflow_dispatch: push: - branches: [ "zcash-ci" ] - # pull_request: - # branches: [ main ] + branches: [ "main" ] jobs: build-zebra: @@ -33,7 +31,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable + toolchain: nightly override: true - uses: Swatinem/rust-cache@v1 - uses: actions-rs/cargo@v1 @@ -65,7 +63,7 @@ jobs: mkdir ~/.ziggurat/ touch ~/.ziggurat/config.toml echo kind = \"zebra\" >> ~/.ziggurat/config.toml - echo path = \"./zebra\" >> ~/.ziggurat/config.toml + echo path = \"zebra\" >> ~/.ziggurat/config.toml echo start_command = \"../zebrad/zebrad start\" >> ~/.ziggurat/config.toml - name: Download Zebra params run: | @@ -74,4 +72,4 @@ jobs: rm ./ziggurat/*.d mv ./ziggurat/ziggurat-* ziggurat_test chmod +x ziggurat_test - ./ziggurat_test --test-threads=1 \ No newline at end of file + ./ziggurat_test --test-threads=1 -Z unstable-options --format json diff --git a/src/tools/mod.rs b/src/tools/mod.rs index 609ab269..9c1da3f7 100644 --- a/src/tools/mod.rs +++ b/src/tools/mod.rs @@ -9,9 +9,9 @@ use std::time::Duration; /// Default timeout for connection operations in seconds. /// TODO: move to config file. -pub const LONG_TIMEOUT: Duration = Duration::from_secs(10); +pub const LONG_TIMEOUT: Duration = Duration::from_secs(30); /// Default timeout for response-specific reads in seconds. -pub const RECV_TIMEOUT: Duration = Duration::from_millis(100); +pub const RECV_TIMEOUT: Duration = Duration::from_millis(300); /// Waits until an expression is true or times out. ///