From 4bad6b0b9b2354b867daa165048f5678b40e5f02 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Mon, 16 Jan 2023 13:30:37 -0500 Subject: [PATCH] hard-code build exceptions --- .github/workflows/build.yml | 8 +------- projects/deno.land/package.yml | 1 - scripts/check-core-sizes.ts | 10 ++++------ 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dfe73b38..c0d0155c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,12 +22,6 @@ jobs: path: pantry repository: teaxyz/pantry.core - - name: co extra - uses: actions/checkout@v3 - with: - path: extra - repository: teaxyz/pantry.extra - - uses: teaxyz/setup@v0 with: # necessary because we currently require a `.git` directory @@ -36,7 +30,7 @@ jobs: - run: ./scripts/check-core-sizes.ts ${{ inputs.projects }} working-directory: pantry env: - TEA_PANTRY_PATH: ${{ env.TEA_PANTRY_PATH }}:${{ github.workspace }}/extra + TEA_PANTRY_PATH: ${{ env.TEA_PANTRY_PATH }} build: runs-on: ${{ matrix.platform.os }} diff --git a/projects/deno.land/package.yml b/projects/deno.land/package.yml index e628e140..0562ab3f 100644 --- a/projects/deno.land/package.yml +++ b/projects/deno.land/package.yml @@ -18,7 +18,6 @@ runtime: DENO_NO_UPDATE_CHECK: "true" build: - cores: 4 script: | # https://github.com/denoland/deno/issues/15596 -- reported fixed in 1.25.3 if test {{ version.major }} -eq 1 -a {{ version.minor }} -eq 25 -a {{ version.patch }} -lt 3; then diff --git a/scripts/check-core-sizes.ts b/scripts/check-core-sizes.ts index a5c580b4..2eb22ecd 100755 --- a/scripts/check-core-sizes.ts +++ b/scripts/check-core-sizes.ts @@ -10,20 +10,18 @@ args: - --import-map={{ srcroot }}/import-map.json ---*/ -import { usePantry } from "hooks" import * as ARGV from "./utils/args.ts" -const pantry = usePantry() +const exceptions: { [pkg: string]: number } = { + "deno.land": 4 +} const pkgs = await ARGV.toArray(ARGV.pkgs()) let coreSize = 2 for (const pkg of pkgs) { - const yml = await pantry.getYAML(pkg).parse() - if (yml?.build?.cores) { - coreSize = Math.max(yml.build.cores, coreSize) - } + coreSize = Math.max(exceptions[pkg.project] || 2, coreSize) } const output = `GHA_LINUX_BUILD_SIZE=${imageName(coreSize)}\n`