Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1fa3c17
Build: Update Gutenberg => Core integration
youknowriad Dec 16, 2025
a8dc192
Fix checkout script
youknowriad Dec 16, 2025
ce99e8c
Simplify checkout script
youknowriad Dec 16, 2025
1de6928
Automation: Updating built files with changes.
Dec 16, 2025
83e4525
Fix build
youknowriad Dec 16, 2025
13832c0
Disable auto-commit
youknowriad Dec 16, 2025
f9aae7e
Fix JSHint
youknowriad Dec 16, 2025
4fd202c
Consolidate block-json building
youknowriad Dec 16, 2025
cbca0e2
Fix windows build
youknowriad Dec 16, 2025
7654a5a
Fix unit tests
youknowriad Dec 16, 2025
cd57438
Disable auto-commit workflow temporarily
youknowriad Dec 16, 2025
dc6ba78
update snapshot modules unit tests
youknowriad Dec 16, 2025
f734da1
Update src built files
youknowriad Dec 16, 2025
7d294c2
Fix MathML
youknowriad Dec 16, 2025
85681d8
Revert "Disable auto-commit workflow temporarily"
youknowriad Dec 16, 2025
2e34e56
Revert "Disable auto-commit"
youknowriad Dec 16, 2025
75ff641
Use content hashes for versions
youknowriad Dec 16, 2025
bd1eae2
Shallow clone
youknowriad Dec 16, 2025
d2d8179
Stable build
youknowriad Dec 16, 2025
742bf3b
Automation: Updating built files with changes.
Dec 16, 2025
4a97017
Increase memory for the build process
youknowriad Dec 16, 2025
429fbc9
Remove gutenberg built process workflow: Now Gutenberg is always buil…
youknowriad Dec 17, 2025
78e9db2
Normalize paths betweens Operating systems
youknowriad Dec 17, 2025
8bedcb8
More stable version hashes
youknowriad Dec 17, 2025
6d828b6
Avoid linting removed files
youknowriad Dec 17, 2025
eff7b55
gitignore all of Gutenberg generated code
youknowriad Dec 17, 2025
c207b12
Simplify modules registration
youknowriad Dec 17, 2025
fe07bf3
Simplify build
youknowriad Dec 17, 2025
034169d
Fix block CSS building
youknowriad Dec 18, 2025
8b113a3
Format build files
youknowriad Dec 18, 2025
ce9e365
More copy simplifications
youknowriad Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/reusable-phpunit-tests-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ jobs:
- name: Install npm dependencies
run: npm ci

- name: Build WordPress
run: npm run build:dev

- name: General debug information
run: |
npm --version
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reusable-test-core-build-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ on:

env:
PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
NODE_OPTIONS: --max-old-space-size=4096
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typescript building on MacOS consumes more memory than the default allocated memory to node processes. I recall we had to do something similar elsewhere. (Without it the build fails on MacOS on CI)


# Disable permissions for all available scopes by default.
# Any needed permissions should be configured at the job level.
Expand Down
100 changes: 0 additions & 100 deletions .github/workflows/reusable-test-gutenberg-build-process.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ jobs:
- name: Install npm dependencies
run: npm ci

- name: Build WordPress
run: npm run build:dev

- name: General debug information
run: |
npm --version
Expand Down
44 changes: 1 addition & 43 deletions .github/workflows/test-build-processes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ on:
# Confirm any changes to relevant workflow files.
- '.github/workflows/test-build-processes.yml'
- '.github/workflows/reusable-test-core-build-process.yml'
- '.github/workflows/reusable-test-gutenberg-build-process.yml'
workflow_dispatch:

# Cancels all previous workflow runs for pull requests that have not completed.
Expand Down Expand Up @@ -98,54 +97,13 @@ jobs:
os: ${{ matrix.os }}
directory: ${{ matrix.directory }}

# Tests the Gutenberg plugin build process within a wordpress-develop checkout.
test-gutenberg-build-process:
name: Gutenberg running from ${{ matrix.directory }}
uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
permissions:
contents: read
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-24.04' ]
directory: [ 'src', 'build' ]
with:
os: ${{ matrix.os }}
directory: ${{ matrix.directory }}

# Tests the Gutenberg plugin build process on additional operating systems.
#
# This is separate from the job above in order to use stricter conditions when determining when to test additional
# operating systems. This avoids unintentionally consuming excessive minutes. Windows-based jobs consume minutes at a
# 2x rate, and MacOS-based jobs at a 10x rate.
# See https://docs.github.com/en/billing/concepts/product-billing/github-actions#per-minute-rates.
#
# The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is
# currently no way to determine the OS being used on a given job.
# See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
test-gutenberg-build-process-additional-os:
name: Gutenberg running from ${{ matrix.directory }}
uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
permissions:
contents: read
if: ${{ github.repository == 'WordPress/wordpress-develop' }}
strategy:
fail-fast: false
matrix:
os: [ 'macos-15', 'windows-2025' ]
directory: [ 'src', 'build' ]
with:
os: ${{ matrix.os }}
directory: ${{ matrix.directory }}

slack-notifications:
name: Slack Notifications
uses: ./.github/workflows/slack-notifications.yml
permissions:
actions: read
contents: read
needs: [ test-core-build-process, test-core-build-process-additional-os, test-gutenberg-build-process, test-gutenberg-build-process-additional-os ]
needs: [ test-core-build-process, test-core-build-process-additional-os ]
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
with:
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
Expand Down
14 changes: 9 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ wp-tests-config.php
/node_modules
/npm-debug.log
/build
/gutenberg
/tests/phpunit/build
/wp-cli.local.yml
/jsdoc
Expand All @@ -30,15 +31,18 @@ wp-tests-config.php
/src/wp-admin/css/colors/*/*.css
/src/wp-admin/js
/src/wp-includes/assets/*
!/src/wp-includes/assets/script-loader-packages.min.php
!/src/wp-includes/assets/script-modules-packages.min.php
/src/wp-includes/js
/src/wp-includes/css/dist
/src/wp-includes/css/*.min.css
/src/wp-includes/css/*-rtl.css
/src/wp-includes/blocks/**/*.css
/src/wp-includes/blocks/**/*.js
/src/wp-includes/blocks/**/*.js.map
/src/wp-includes/blocks/*
!/src/wp-includes/blocks/index.php
/src/wp-includes/build
/src/wp-includes/class-wp-block-parser.php
/src/wp-includes/class-wp-block-parser-block.php
/src/wp-includes/class-wp-block-parser-frame.php
/src/wp-includes/theme.json
/src/wp-includes/theme-i18n.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need to manually add this to svnignore too

/packagehash.txt
/artifacts
/setup.log
Expand Down
84 changes: 65 additions & 19 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
/* globals Set */
var webpackConfig = require( './webpack.config' );
var installChanged = require( 'install-changed' );
var json2php = require( 'json2php' );

module.exports = function(grunt) {
var path = require('path'),
Expand Down Expand Up @@ -1279,6 +1278,14 @@ module.exports = function(grunt) {
BUILD_DIR + 'wp-includes/js/dist/commands.js',
],
dest: BUILD_DIR + 'wp-includes/js/dist/'
},
{
expand: true,
flatten: true,
src: [
BUILD_DIR + 'wp-includes/js/dist/vendor/**/*.js'
],
dest: BUILD_DIR + 'wp-includes/js/dist/vendor/'
}
]
}
Expand Down Expand Up @@ -1414,6 +1421,59 @@ module.exports = function(grunt) {
grunt.task.run( 'wp-packages:refresh-deps' );
} );

// Gutenberg integration tasks.
grunt.registerTask( 'gutenberg-checkout', 'Checks out the Gutenberg repository.', function() {
const done = this.async();
grunt.util.spawn( {
cmd: 'node',
args: [ 'tools/gutenberg/checkout-gutenberg.js' ],
opts: { stdio: 'inherit' }
}, function( error ) {
done( ! error );
} );
} );

grunt.registerTask( 'gutenberg-build', 'Builds the Gutenberg repository.', function() {
const done = this.async();
grunt.util.spawn( {
cmd: 'node',
args: [ 'tools/gutenberg/build-gutenberg.js' ],
opts: { stdio: 'inherit' }
}, function( error ) {
done( ! error );
} );
} );

grunt.registerTask( 'gutenberg-copy', 'Copies Gutenberg build output to WordPress Core.', function() {
const done = this.async();
const buildDir = grunt.option( 'dev' ) ? 'src' : 'build';
grunt.util.spawn( {
cmd: 'node',
args: [ 'tools/gutenberg/copy-gutenberg-build.js', `--build-dir=${ buildDir }` ],
opts: { stdio: 'inherit' }
}, function( error ) {
done( ! error );
} );
} );

grunt.registerTask( 'gutenberg-integrate', 'Complete Gutenberg integration workflow.', [
'gutenberg-checkout',
'gutenberg-build',
'gutenberg-copy'
] );

grunt.registerTask( 'copy-vendor-scripts', 'Copies vendor scripts from node_modules to wp-includes/js/dist/vendor/.', function() {
const done = this.async();
const buildDir = grunt.option( 'dev' ) ? 'src' : 'build';
grunt.util.spawn( {
cmd: 'node',
args: [ 'tools/vendors/copy-vendors.js', `--build-dir=${ buildDir }` ],
opts: { stdio: 'inherit' }
}, function( error ) {
done( ! error );
} );
} );

grunt.renameTask( 'watch', '_watch' );

grunt.registerTask( 'watch', function() {
Expand Down Expand Up @@ -1569,23 +1629,6 @@ module.exports = function(grunt) {
}
} );

grunt.registerTask( 'copy:block-json', 'Copies block.json file contents to block-json.php.', function() {
var blocks = {};
grunt.file.recurse( SOURCE_DIR + 'wp-includes/blocks', function( abspath, rootdir, subdir, filename ) {
if ( /^block\.json$/.test( filename ) ) {
blocks[ subdir ] = grunt.file.readJSON( abspath );
}
} );
grunt.file.write(
SOURCE_DIR + 'wp-includes/blocks/blocks-json.php',
'<?php return ' + json2php.make( {
linebreak: '\n',
indent: ' ',
shortArraySyntax: false
} )( blocks ) + ';'
);
} );

grunt.registerTask( 'copy:js', [
'copy:npm-packages',
'copy:vendor-js',
Expand Down Expand Up @@ -1723,7 +1766,6 @@ module.exports = function(grunt) {
grunt.registerTask( 'build:files', [
'clean:files',
'copy:files',
'copy:block-json',
'copy:version',
] );

Expand Down Expand Up @@ -1853,6 +1895,8 @@ module.exports = function(grunt) {
grunt.task.run( [
'build:js',
'build:css',
'gutenberg-integrate',
'copy-vendor-scripts',
'build:certificates'
] );
} else {
Expand All @@ -1861,6 +1905,8 @@ module.exports = function(grunt) {
'build:files',
'build:js',
'build:css',
'gutenberg-integrate',
'copy-vendor-scripts',
'replace:source-maps',
'verify:build'
] );
Expand Down
Loading
Loading