From 806b52508a82ffa1549b736f36567dcdbd094efa Mon Sep 17 00:00:00 2001 From: HSiddiqui Date: Thu, 11 Jun 2026 11:39:56 -0400 Subject: [PATCH 1/4] API-5887: added PR build workflow to compile each SDK package upon PR opening --- .github/workflows/pr-build.yaml | 82 +++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/pr-build.yaml diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml new file mode 100644 index 00000000..dda3cd94 --- /dev/null +++ b/.github/workflows/pr-build.yaml @@ -0,0 +1,82 @@ +name: PR Build Check + +# Runs a compile/build check for all SDK languages on every pull request. +# Jobs run in parallel and do not rely on Speakeasy-derived workflows. + +on: + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + build-typescript: + name: Build TypeScript SDK + runs-on: ubuntu-22.04-medium-arm64 + defaults: + run: + working-directory: packages/typescript + steps: + - name: Checkout repository + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 + + - name: Setup Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e + with: + node-version: "22.x" + + - name: Install dependencies + run: npm install --ignore-scripts + + - name: Build + run: npm run build + + - name: Lint + run: npm run lint + + - name: Test + run: npm run test + + build-java: + name: Build Java SDK + runs-on: ubuntu-22.04-medium-arm64 + defaults: + run: + working-directory: packages/java + steps: + - name: Checkout repository + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 + + - name: Setup Java + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 + with: + distribution: "corretto" + java-version: "11" + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e + with: + gradle-version: "8.14" + + - name: Build + run: ./gradlew build --no-daemon + + build-csharp: + name: Build C# SDK + runs-on: ubuntu-22.04-medium-arm64 + defaults: + run: + working-directory: packages/csharp + steps: + - name: Checkout repository + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 + + - name: Setup .NET SDK + uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 + with: + dotnet-version: "8.x" + + - name: Build + run: dotnet build -c Release From b37ad8975fa6519e0983e67900d863c1beabdf90 Mon Sep 17 00:00:00 2001 From: HSiddiqui Date: Thu, 11 Jun 2026 11:59:37 -0400 Subject: [PATCH 2/4] API-5887: Added caching step for each SDK to reduce network downloads on subsequent builds --- .github/workflows/pr-build.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index dda3cd94..3e0d5553 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -25,7 +25,15 @@ jobs: - name: Setup Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e with: - node-version: "22.x" + node-version: "24.x" + + - name: Cache npm dependencies + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + with: + path: ~/.npm + key: ${{ runner.os }}-npm-${{ hashFiles('packages/typescript/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm- - name: Install dependencies run: npm install --ignore-scripts @@ -59,6 +67,7 @@ jobs: uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e with: gradle-version: "8.14" + cache-read-only: ${{ github.event_name == 'pull_request' }} - name: Build run: ./gradlew build --no-daemon @@ -78,5 +87,13 @@ jobs: with: dotnet-version: "8.x" + - name: Cache NuGet packages + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('packages/csharp/**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- + - name: Build run: dotnet build -c Release From 564beeb98999344aad7df902e402fbe4bbc564ef Mon Sep 17 00:00:00 2001 From: HSiddiqui Date: Thu, 11 Jun 2026 12:05:23 -0400 Subject: [PATCH 3/4] API-5887: remove test step from build-typescript --- .github/workflows/pr-build.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 3e0d5553..bc09b5ca 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -38,14 +38,11 @@ jobs: - name: Install dependencies run: npm install --ignore-scripts - - name: Build - run: npm run build - - name: Lint run: npm run lint - - name: Test - run: npm run test + - name: Build + run: npm run build build-java: name: Build Java SDK From f6fded16e42dbbb3ef1d8521c4eef4317552bd78 Mon Sep 17 00:00:00 2001 From: HSiddiqui Date: Thu, 11 Jun 2026 12:28:30 -0400 Subject: [PATCH 4/4] API-5887: upgrade action/cache version to v5.0.0 to use Nodejs24 --- .github/workflows/pr-build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index bc09b5ca..aea1796a 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -28,7 +28,7 @@ jobs: node-version: "24.x" - name: Cache npm dependencies - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae with: path: ~/.npm key: ${{ runner.os }}-npm-${{ hashFiles('packages/typescript/package-lock.json') }} @@ -85,7 +85,7 @@ jobs: dotnet-version: "8.x" - name: Cache NuGet packages - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('packages/csharp/**/*.csproj') }}