mirror of
https://github.com/ivabus/pantry
synced 2024-11-30 04:05:06 +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
|
path: pantry
|
||||||
repository: teaxyz/pantry.core
|
repository: teaxyz/pantry.core
|
||||||
|
|
||||||
- name: co extra
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: extra
|
|
||||||
repository: teaxyz/pantry.extra
|
|
||||||
|
|
||||||
- uses: teaxyz/setup@v0
|
- uses: teaxyz/setup@v0
|
||||||
with:
|
with:
|
||||||
# necessary because we currently require a `.git` directory
|
# necessary because we currently require a `.git` directory
|
||||||
|
@ -36,7 +30,7 @@ jobs:
|
||||||
- run: ./scripts/check-core-sizes.ts ${{ inputs.projects }}
|
- run: ./scripts/check-core-sizes.ts ${{ inputs.projects }}
|
||||||
working-directory: pantry
|
working-directory: pantry
|
||||||
env:
|
env:
|
||||||
TEA_PANTRY_PATH: ${{ env.TEA_PANTRY_PATH }}:${{ github.workspace }}/extra
|
TEA_PANTRY_PATH: ${{ env.TEA_PANTRY_PATH }}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.platform.os }}
|
runs-on: ${{ matrix.platform.os }}
|
||||||
|
|
|
@ -18,7 +18,6 @@ runtime:
|
||||||
DENO_NO_UPDATE_CHECK: "true"
|
DENO_NO_UPDATE_CHECK: "true"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
cores: 4
|
|
||||||
script: |
|
script: |
|
||||||
# https://github.com/denoland/deno/issues/15596 -- reported fixed in 1.25.3
|
# 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
|
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-map={{ srcroot }}/import-map.json
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
import { usePantry } from "hooks"
|
|
||||||
import * as ARGV from "./utils/args.ts"
|
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())
|
const pkgs = await ARGV.toArray(ARGV.pkgs())
|
||||||
|
|
||||||
let coreSize = 2
|
let coreSize = 2
|
||||||
|
|
||||||
for (const pkg of pkgs) {
|
for (const pkg of pkgs) {
|
||||||
const yml = await pantry.getYAML(pkg).parse()
|
coreSize = Math.max(exceptions[pkg.project] || 2, coreSize)
|
||||||
if (yml?.build?.cores) {
|
|
||||||
coreSize = Math.max(yml.build.cores, coreSize)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const output = `GHA_LINUX_BUILD_SIZE=${imageName(coreSize)}\n`
|
const output = `GHA_LINUX_BUILD_SIZE=${imageName(coreSize)}\n`
|
||||||
|
|
Loading…
Reference in a new issue