|
13 | 13 | jobs:
|
14 | 14 | clippy:
|
15 | 15 | if: github.event.pull_request.draft == false
|
16 |
| - timeout-minutes: 60 |
| 16 | + timeout-minutes: 10 |
17 | 17 | runs-on: self-hosted
|
18 | 18 | steps:
|
19 | 19 | - uses: actions/checkout@v4
|
20 | 20 | - name: Run clippy
|
21 | 21 | run: cargo clippy
|
| 22 | + |
22 | 23 | build:
|
23 | 24 | if: github.event.pull_request.draft == false
|
24 |
| - timeout-minutes: 60 |
| 25 | + timeout-minutes: 10 |
| 26 | + runs-on: self-hosted |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v4 |
| 29 | + |
| 30 | + - name: Cache Build Artifacts |
| 31 | + uses: actions/cache@v4 |
| 32 | + with: |
| 33 | + path: | |
| 34 | + ~/.cargo/bin/ |
| 35 | + ~/.cargo/registry/index/ |
| 36 | + ~/.cargo/registry/cache/ |
| 37 | + ~/.cargo/git/db/ |
| 38 | + target/ |
| 39 | + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 40 | + |
| 41 | + - name: Build |
| 42 | + run: cargo build |
| 43 | + |
| 44 | + test_script: |
| 45 | + if: github.event.pull_request.draft == false |
| 46 | + timeout-minutes: 30 |
| 47 | + needs: build |
25 | 48 | runs-on: self-hosted
|
26 | 49 | steps:
|
27 | 50 | - uses: actions/checkout@v4
|
| 51 | + |
| 52 | + - name: Cache Build Artifacts |
| 53 | + uses: actions/cache@v4 |
| 54 | + with: |
| 55 | + path: | |
| 56 | + ~/.cargo/bin/ |
| 57 | + ~/.cargo/registry/index/ |
| 58 | + ~/.cargo/registry/cache/ |
| 59 | + ~/.cargo/git/db/ |
| 60 | + target/ |
| 61 | + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 62 | + |
28 | 63 | - name: Build
|
29 | 64 | run: cargo build
|
| 65 | + |
30 | 66 | - name: Run tests
|
31 | 67 | run: |
|
32 | 68 | cargo test -- --skip bridge::
|
33 |
| - # cargo test -- --test-threads=4 \ |
34 |
| - # --skip bn254::pairing::test::test_quad_miller_loop_with_c_wi \ |
35 |
| - # --skip bn254::pairing::test::test_hinted_quad_miller_loop_with_c_wi \ |
36 |
| - # --skip groth16::test::test_groth16_verifier \ |
37 |
| - # --skip groth16::test::test_hinted_groth16_verifier \ |
38 |
| - # --skip groth16::offchain_checker::test::test_checkpairing_with_c_wi_groth16 \ |
39 |
| - # --skip bridge:: |
40 |
| - # cargo test -- --test bn254::pairing::test::test_quad_miller_loop_with_c_wi --exact |
41 |
| - # cargo test -- --test bn254::pairing::test::test_hinted_quad_miller_loop_with_c_wi --exact |
42 |
| - # cargo test -- --test groth16::test::test_groth16_verifier --exact |
43 |
| - # cargo test -- --test groth16::test::test_hinted_groth16_verifier --exact |
44 |
| - # cargo test -- --test groth16::offchain_checker::test::test_checkpairing_with_c_wi_groth16 --exact |
45 |
| - # bridge: |
46 |
| - # if: github.event.pull_request.draft == false |
47 |
| - # timeout-minutes: 60 |
48 |
| - # runs-on: ubuntu-latest |
49 |
| - # steps: |
50 |
| - # - uses: actions/checkout@v4 |
51 |
| - # - name: Run bridge tests |
52 |
| - # run: | |
53 |
| - # docker pull blockstream/esplora:latest |
54 |
| - # docker run -e NO_REGTEST_MINING=1 -p 50001:50001 -p 8094:80 --volume $PWD/data_bitcoin_regtest:/data --rm -i -t blockstream/esplora bash -c "/srv/explorer/run.sh bitcoin-regtest explorer" & |
55 |
| - # sleep 720 |
56 |
| - # docker exec -it $(docker ps | grep blockstream/esplora | awk '{print $1}') /bin/bash |
57 |
| - # /srv/explorer/bitcoin/bin/bitcoin-cli -conf=/data/.bitcoin.conf -datadir=/data/bitcoin createwallet default |
58 |
| - # address=`/srv/explorer/bitcoin/bin/bitcoin-cli -conf=/data/.bitcoin.conf -datadir=/data/bitcoin getnewaddress` |
59 |
| - # /srv/explorer/bitcoin/bin/bitcoin-cli -conf=/data/.bitcoin.conf -datadir=/data/bitcoin generatetoaddress 100 $address |
60 |
| - # watch -n 40 "/srv/explorer/bitcoin/bin/bitcoin-cli -conf=/data/.bitcoin.conf -datadir=/data/bitcoin generatetoaddress 1 $address" &>/dev/null & |
61 |
| - # exit |
62 |
| - # cargo test -- --test bridge:: |
| 69 | + |
| 70 | +# test_bridge: |
| 71 | +# if: github.event.pull_request.draft == false |
| 72 | +# timeout-minutes: 200 |
| 73 | +# needs: build |
| 74 | +# runs-on: self-hosted |
| 75 | +# steps: |
| 76 | +# - uses: actions/checkout@v4 |
| 77 | +# |
| 78 | +# - name: Cache Build Artifacts |
| 79 | +# uses: actions/cache@v4 |
| 80 | +# with: |
| 81 | +# path: | |
| 82 | +# ~/.cargo/bin/ |
| 83 | +# ~/.cargo/registry/index/ |
| 84 | +# ~/.cargo/registry/cache/ |
| 85 | +# ~/.cargo/git/db/ |
| 86 | +# target/ |
| 87 | +# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 88 | +# |
| 89 | +# - name: Build |
| 90 | +# run: cargo build |
| 91 | +# |
| 92 | +# - name: Run bridge tests |
| 93 | +# env: |
| 94 | +# BRIDGE_DATA_STORE_CLIENT_DATA_SUFFIX: bridge-client-data.json |
| 95 | +# BRIDGE_AWS_ACCESS_KEY_ID: ${{ secrets.BRIDGE_AWS_ACCESS_KEY_ID }} |
| 96 | +# BRIDGE_AWS_SECRET_ACCESS_KEY: ${{ secrets.BRIDGE_AWS_SECRET_ACCESS_KEY }} |
| 97 | +# BRIDGE_AWS_REGION: ap-southeast-1 |
| 98 | +# BRIDGE_AWS_BUCKET: bitvm |
| 99 | +# run: | |
| 100 | +# cd regtest |
| 101 | +# ./install.sh <<< "." |
| 102 | +# ./start.sh |
| 103 | +# cargo test -- --test bridge:: |
0 commit comments