build: update build config (#2967)

This commit is contained in:
Alex Yang 2023-07-03 14:17:13 +08:00 committed by GitHub
parent 63517e4912
commit 467eab4ddf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 9 deletions

View File

@ -30,17 +30,25 @@ jobs:
name: Nx Cloud - Main Job name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.13.0 uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.13.0
with: with:
runs-on: macos-latest
main-branch-name: master main-branch-name: master
number-of-agents: 5 number-of-agents: 5
init-commands: | init-commands: |
yarn exec nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3 yarn exec nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3
environment-variables: |
BUILD_TYPE=canary
parallel-commands: | parallel-commands: |
yarn exec nx-cloud record -- yarn exec nx format:check yarn exec nx-cloud record -- yarn exec nx format:check
parallel-commands-on-agents: | parallel-commands-on-agents: |
yarn exec nx affected --target=build --parallel=5 yarn exec nx affected --target=build --parallel=5
timeout: 60
agents: agents:
name: Nx Cloud - Agents name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.13.0 uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.13.0
with: with:
runs-on: macos-latest
number-of-agents: 5 number-of-agents: 5
environment-variables: |
BUILD_TYPE=canary
timeout: 60

View File

@ -19,7 +19,6 @@ export const blockSuiteFeatureFlags = {
*/ */
const buildPreset = { const buildPreset = {
stable: { stable: {
enableAllPageSaving: false,
enablePlugin: false, enablePlugin: false,
enableTestProperties: false, enableTestProperties: false,
enableBroadcastChannelProvider: true, enableBroadcastChannelProvider: true,
@ -36,7 +35,6 @@ const buildPreset = {
internal: {}, internal: {},
// canary will be aggressive and enable all features // canary will be aggressive and enable all features
canary: { canary: {
enableAllPageSaving: true,
enablePlugin: true, enablePlugin: true,
enableTestProperties: true, enableTestProperties: true,
enableBroadcastChannelProvider: true, enableBroadcastChannelProvider: true,
@ -58,7 +56,7 @@ buildPreset.internal = buildPreset.stable;
const currentBuild = process.env.BUILD_TYPE || 'stable'; const currentBuild = process.env.BUILD_TYPE || 'stable';
if (process.env.CI && !process.env.BUILD_TYPE) { if (process.env.CI && !process.env.BUILD_TYPE) {
throw new Error('BUILD_ENV is required in CI'); throw new Error('BUILD_TYPE is required in CI');
} }
const currentBuildPreset = buildPreset[currentBuild]; const currentBuildPreset = buildPreset[currentBuild];
@ -67,9 +65,6 @@ const environmentPreset = {
enablePlugin: process.env.ENABLE_PLUGIN enablePlugin: process.env.ENABLE_PLUGIN
? process.env.ENABLE_PLUGIN === 'true' ? process.env.ENABLE_PLUGIN === 'true'
: currentBuildPreset.enablePlugin, : currentBuildPreset.enablePlugin,
enableAllPageSaving: process.env.ENABLE_ALL_PAGE_SAVING
? process.env.ENABLE_ALL_PAGE_FILTER === 'true'
: currentBuildPreset.enableAllPageSaving,
enableTestProperties: process.env.ENABLE_TEST_PROPERTIES enableTestProperties: process.env.ENABLE_TEST_PROPERTIES
? process.env.ENABLE_TEST_PROPERTIES === 'true' ? process.env.ENABLE_TEST_PROPERTIES === 'true'
: currentBuildPreset.enableTestProperties, : currentBuildPreset.enableTestProperties,

View File

@ -40,7 +40,7 @@
"runtime": "node -v" "runtime": "node -v"
}, },
{ {
"env": "BUILD_ENV" "env": "BUILD_TYPE"
}, },
{ {
"env": "ENABLE_BOOKMARK_OPERATION" "env": "ENABLE_BOOKMARK_OPERATION"

View File

@ -52,7 +52,6 @@ declare global {
} }
export const buildFlagsSchema = z.object({ export const buildFlagsSchema = z.object({
enableAllPageSaving: z.boolean(),
enablePlugin: z.boolean(), enablePlugin: z.boolean(),
enableTestProperties: z.boolean(), enableTestProperties: z.boolean(),
enableBroadcastChannelProvider: z.boolean(), enableBroadcastChannelProvider: z.boolean(),

View File

@ -4,7 +4,8 @@
"composite": true, "composite": true,
"noEmit": false, "noEmit": false,
"outDir": "lib", "outDir": "lib",
"moduleResolution": "nodenext", "moduleResolution": "NodeNext",
"module": "NodeNext",
"resolveJsonModule": true "resolveJsonModule": true
}, },
"include": [".", "./*.json"] "include": [".", "./*.json"]