mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 10:25:05 +03:00
hard-code build exceptions
This commit is contained in:
parent
cdd576cef7
commit
4bad6b0b9b
3 changed files with 5 additions and 14 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -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 }}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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`
|
||||
|
|
Loading…
Reference in a new issue