|
15 | 15 | - js-test-token
|
16 | 16 | - js-test-token-swap
|
17 | 17 | - js-test-token-lending
|
| 18 | + - fuzz |
18 | 19 | steps:
|
19 | 20 | - run: echo "Done"
|
20 | 21 |
|
@@ -200,3 +201,60 @@ jobs:
|
200 | 201 | name: programs
|
201 | 202 | path: target/bpfel-unknown-unknown/release
|
202 | 203 | - run: ./ci/js-test-token-lending.sh
|
| 204 | + |
| 205 | + fuzz: |
| 206 | + runs-on: ubuntu-latest |
| 207 | + strategy: |
| 208 | + matrix: |
| 209 | + fuzz_target: [token-swap-instructions] |
| 210 | + steps: |
| 211 | + - uses: actions/checkout@v2 |
| 212 | + |
| 213 | + - name: Set env vars |
| 214 | + run: | |
| 215 | + source ci/rust-version.sh |
| 216 | + echo "RUST_STABLE=$rust_stable" >> $GITHUB_ENV |
| 217 | + source ci/solana-version.sh |
| 218 | + echo "SOLANA_VERSION=$solana_version" >> $GITHUB_ENV |
| 219 | +
|
| 220 | + - uses: actions-rs/toolchain@v1 |
| 221 | + with: |
| 222 | + toolchain: ${{ env.RUST_STABLE }} |
| 223 | + override: true |
| 224 | + profile: minimal |
| 225 | + |
| 226 | + - uses: actions/cache@v2 |
| 227 | + with: |
| 228 | + path: | |
| 229 | + ~/.cargo/registry |
| 230 | + ~/.cargo/git |
| 231 | + target |
| 232 | + key: cargo-fuzz-${{ hashFiles('**/Cargo.lock') }} |
| 233 | + restore-keys: | |
| 234 | + cargo-fuzz- |
| 235 | +
|
| 236 | + - uses: actions/cache@v2 |
| 237 | + with: |
| 238 | + path: | |
| 239 | + ~/.cargo/bin/cargo-hfuzz |
| 240 | + ~/.cargo/bin/cargo-honggfuzz |
| 241 | + key: cargo-fuzz-bins-${{ runner.os }} |
| 242 | + restore-keys: | |
| 243 | + cargo-fuzz-bins-${{ runner.os }}- |
| 244 | +
|
| 245 | + - uses: actions/cache@v2 |
| 246 | + with: |
| 247 | + path: | |
| 248 | + ~/.cache |
| 249 | + key: solana-${{ env.SOLANA_VERSION }} |
| 250 | + restore-keys: | |
| 251 | + solana- |
| 252 | +
|
| 253 | + - name: Install dependencies |
| 254 | + run: | |
| 255 | + ./ci/install-build-deps.sh |
| 256 | + ./ci/install-program-deps.sh |
| 257 | + echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH |
| 258 | +
|
| 259 | + - name: Run fuzz target |
| 260 | + run: ./ci/fuzz.sh ${{ matrix.fuzz_target }} 30 # 30 seconds, just to check everything is ok |
0 commit comments