@@ -49,15 +49,66 @@ jobs:
49
49
echo "::set-output name=test-files::$test_files"
50
50
shell : bash
51
51
52
- run -tests :
52
+ print -tests :
53
53
needs :
54
54
- find-e2e-tests
55
+ runs-on : ubuntu-latest
56
+ steps :
57
+ - name : Print tests
58
+ run : |
59
+ test_files=$(echo '${{ needs.find-e2e-tests.outputs.test-files }}' | jq -r '.[]')
60
+ for test_file in $test_files; do
61
+ echo "$test_file"
62
+ done
63
+ shell : bash
64
+
65
+ cache-nodes :
66
+ runs-on : ubuntu-latest
67
+ steps :
68
+ - name : Check out repository
69
+ uses : actions/checkout@v4
70
+
71
+ - name : Clone Subtensor repo
72
+ working-directory : ${{ github.workspace }}
73
+ run : git clone https://github.com/opentensor/subtensor.git
74
+
75
+ - name : Checkout Subtensor repo to `devnet-ready` branch
76
+ working-directory : ${{ github.workspace }}/subtensor
77
+ run : git checkout devnet-ready
78
+
79
+ - name : Install dependencies
80
+ run : |
81
+ sudo apt-get update &&
82
+ sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler jq
83
+
84
+ - name : Add wasm32-unknown-unknown target
85
+ run : |
86
+ rustup target add wasm32-unknown-unknown --toolchain stable-x86_64-unknown-linux-gnu
87
+ rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
88
+
89
+ - name : Build Subtensor nodes
90
+ run : |
91
+ echo "Bilding fast block nodes"
92
+ ${{ github.workspace }}/subtensor/scripts/localnet.sh --build-only
93
+ echo "Bilding non-fast block nodes"
94
+ ${{ github.workspace }}/subtensor/scripts/localnet.sh False --build-only
95
+
96
+ - name : Save cache
97
+ uses : actions/cache@v3
98
+ with :
99
+ path : ${{ github.workspace }}/subtensor/target/
100
+ key : ${{ runner.os }}-subtensor-node
101
+
102
+ run-tests :
103
+ needs :
55
104
- check-labels
105
+ - find-e2e-tests
106
+ - cache-nodes
56
107
runs-on : ubuntu-latest
57
108
if : ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false && needs.check-labels.outputs.run-sdk-tests == 'true' }}
58
109
strategy :
59
110
fail-fast : false
60
- max-parallel : 8
111
+ max-parallel : 10
61
112
matrix :
62
113
rust-branch :
63
114
- stable
@@ -130,6 +181,13 @@ jobs:
130
181
working-directory : ${{ github.workspace }}/subtensor
131
182
run : git checkout devnet-ready
132
183
184
+ - name : Restore cache
185
+ uses : actions/cache@v3
186
+ id : cache
187
+ with :
188
+ path : ${{ github.workspace }}/subtensor/target/
189
+ key : ${{ runner.os }}-subtensor-node
190
+
133
191
- name : Run Bittensor SDK e2e test
134
192
run : |
135
193
source ${{ github.workspace }}/venv/bin/activate
0 commit comments