diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 924bc9f..6fb7f6f 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -41,7 +41,55 @@ env: VGI_RPC_JAVA_REF: 920dc42cb7d7e652d582de7fbb5b0b7ee3836a34 jobs: + build-worker: + name: Build worker once + runs-on: ubuntu-latest + steps: + - name: Checkout vgi-java + uses: actions/checkout@v4 + + - name: Checkout pinned vgi-rpc-java + uses: actions/checkout@v4 + with: + repository: Query-farm/vgi-rpc-java + ref: ${{ env.VGI_RPC_JAVA_REF }} + path: vgi-rpc-java + + - name: Set up JDK 25 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '25' + + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: gradle-${{ runner.os }}- + + - name: Build example worker + run: ./gradlew --no-daemon :vgi-example-worker:installDist + env: + VGI_RPC_JAVA_DIR: ${{ github.workspace }}/vgi-rpc-java + + # Archive before upload because upload-artifact does not preserve the + # executable bit on the generated launcher script. + - name: Package worker + run: tar -czf vgi-java-worker.tar.gz vgi-example-worker/build/install/vgi-example-worker + + - name: Upload worker + uses: actions/upload-artifact@v4 + with: + name: vgi-java-worker-${{ github.sha }} + path: vgi-java-worker.tar.gz + if-no-files-found: error + retention-days: 1 + integration: + needs: build-worker runs-on: ubuntu-latest strategy: fail-fast: false @@ -66,35 +114,19 @@ jobs: ref: ${{ env.VGI_REF }} path: vgi-upstream - # Build the vgirpc RPC layer from source (composite include) so the worker - # picks up the HTTP features the integration suite needs (gzip negotiation, - # sticky cookies) ahead of the next published vgirpc release. - - name: Checkout pinned vgi-rpc-java - uses: actions/checkout@v4 - with: - repository: Query-farm/vgi-rpc-java - ref: ${{ env.VGI_RPC_JAVA_REF }} - path: vgi-rpc-java - - name: Set up JDK 25 uses: actions/setup-java@v4 with: distribution: temurin java-version: '25' - - name: Cache Gradle - uses: actions/cache@v4 + - name: Download worker + uses: actions/download-artifact@v4 with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: gradle-${{ runner.os }}- + name: vgi-java-worker-${{ github.sha }} - - name: Build example worker - run: ./gradlew --no-daemon :vgi-example-worker:installDist - env: - VGI_RPC_JAVA_DIR: ${{ github.workspace }}/vgi-rpc-java + - name: Extract worker + run: tar -xzf vgi-java-worker.tar.gz - name: Resolve latest haybarn release run: | diff --git a/ci/README.md b/ci/README.md index a907c58..d6acebc 100644 --- a/ci/README.md +++ b/ci/README.md @@ -13,10 +13,12 @@ Rather than building the vgi DuckDB extension from source, CI drives a runner, published in Haybarn's releases) and installs the **signed** vgi extension from the Haybarn community channel: -1. **Build the worker** — `./gradlew :vgi-example-worker:installDist`. -2. **Checkout the test suite** — `Query-farm/vgi` at a pinned commit; its +1. **Build the worker once** — a producer job runs + `./gradlew :vgi-example-worker:installDist`, archives the generated + distribution, and every transport lane downloads that same artifact. +2. **Checkout the test suite** — `Query-farm/vgi` at `main`; its `test/sql/integration/*.test` files are the suite. -3. **Download the runner** — `haybarn_unittest-linux-amd64.zip` from the pinned +3. **Download the runner** — `haybarn_unittest-linux-amd64.zip` from the latest Haybarn release. 4. **Preprocess** — the standalone runner links none of the extensions the tests gate on, so [`preprocess-require.awk`](preprocess-require.awk) rewrites