diff --git a/.github/actions/setup-trident/action.yml b/.github/actions/setup-trident/action.yml new file mode 100644 index 00000000..0186f657 --- /dev/null +++ b/.github/actions/setup-trident/action.yml @@ -0,0 +1,17 @@ +name: "Setup Trident" +description: "Setup Trident" + +runs: + using: "composite" + steps: + - uses: actions/cache@v3 + name: Cache Trident + id: cache-trident + with: + path: | + ~/.cache/trident/ + ~/.local/share/trident/ + key: trident-${{ runner.os }}-v0000 + - name: Install Trident + run: cargo install --path crates/cli + shell: bash diff --git a/.github/workflows/run_fuzz_example.yml b/.github/workflows/run_fuzz_example.yml index 907f6dba..2476fd28 100644 --- a/.github/workflows/run_fuzz_example.yml +++ b/.github/workflows/run_fuzz_example.yml @@ -13,29 +13,45 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 + - name: Set Anchor Version run: echo "ANCHOR_VERSION=0.29.0" >> $GITHUB_ENV + + - uses: Swatinem/rust-cache@v2 + name: Cache Rust and it's packages + - uses: ./.github/actions/setup-rust/ + - uses: ./.github/actions/setup-solana/ + + - uses: ./.github/actions/setup-trident/ + - uses: ./.github/actions/setup-honggfuzz/ id: rust-setup - - uses: Swatinem/rust-cache@v2 - name: Cache Rust and it's packages + - name: Test Fuzz working-directory: examples/fuzz-tests/unchecked-arithmetic-0 - run: cargo run --manifest-path ../../../Cargo.toml fuzz run fuzz_0 + run: trident fuzz run fuzz_0 arbitrary-limit-inputs-5: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 + - name: Set Anchor Version run: echo "ANCHOR_VERSION=0.30.1" >> $GITHUB_ENV + + - uses: Swatinem/rust-cache@v2 + name: Cache Rust and it's packages + - uses: ./.github/actions/setup-rust/ + - uses: ./.github/actions/setup-solana/ + + - uses: ./.github/actions/setup-trident/ + - uses: ./.github/actions/setup-honggfuzz/ id: rust-setup - - uses: Swatinem/rust-cache@v2 - name: Cache Rust and it's packages + - name: Test Fuzz working-directory: examples/fuzz-tests/arbitrary-limit-inputs-5 - run: cargo run --manifest-path ../../../Cargo.toml fuzz run fuzz_0 + run: trident fuzz run fuzz_0