diff --git a/.github/workflows/cannon.yml b/.github/workflows/cannon.yml index bd6414c9d76cf..c32d1c6f3ea95 100644 --- a/.github/workflows/cannon.yml +++ b/.github/workflows/cannon.yml @@ -20,8 +20,8 @@ jobs: # Install just command - name: Install just run: | - curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to $HOME/.local/bin - echo "$HOME/.local/bin" >> $GITHUB_PATH + curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to "$HOME/.local/bin" + echo "$HOME/.local/bin" >> "$GITHUB_PATH" # Install Node.js with proper working directory for cache - name: Setup Node.js @@ -59,12 +59,17 @@ jobs: packages/contracts-bedrock/artifacts packages/contracts-bedrock/forge-artifacts packages/contracts-bedrock/cache + cannon-prestate: needs: [contracts-build] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Create contract artifact directories + run: | + mkdir -p packages/contracts-bedrock/{artifacts,forge-artifacts,cache} + - name: Download contract artifacts uses: actions/download-artifact@v4 with: @@ -77,6 +82,9 @@ jobs: - name: Build op-program run: make op-program + - name: Create prestate directories + run: mkdir -p op-program/bin + - name: Cache cannon prestate id: cache-prestate uses: actions/cache@v4 @@ -112,6 +120,10 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Create contract artifact directories + run: | + mkdir -p packages/contracts-bedrock/{artifacts,forge-artifacts,cache} + - name: Download contract artifacts uses: actions/download-artifact@v4 with: @@ -156,3 +168,31 @@ jobs: path: | tmp/test-results tmp/testlogs + + op-e2e-cannon-tests: + needs: [contracts-build, cannon-prestate] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Create directories + run: | + mkdir -p packages/contracts-bedrock/{artifacts,forge-artifacts,cache} + mkdir -p op-program/bin + + - name: Download contract artifacts + uses: actions/download-artifact@v4 + with: + name: contract-artifacts + path: packages/contracts-bedrock + + - name: Download prestate artifacts + uses: actions/download-artifact@v4 + with: + name: prestate-artifacts + path: op-program/bin + + - name: Run cannon tests + working-directory: op-e2e + run: | + make test-cannon