Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0179101
Build: Update Gutenberg => Core integration
youknowriad Dec 16, 2025
0918414
Fix checkout script
youknowriad Dec 16, 2025
f8a5915
Simplify checkout script
youknowriad Dec 16, 2025
97d841d
Automation: Updating built files with changes.
Dec 16, 2025
3491e94
Fix build
youknowriad Dec 16, 2025
615935d
Disable auto-commit
youknowriad Dec 16, 2025
fd22185
Fix JSHint
youknowriad Dec 16, 2025
9179bc9
Consolidate block-json building
youknowriad Dec 16, 2025
f75ee83
Fix windows build
youknowriad Dec 16, 2025
22b6c24
Fix unit tests
youknowriad Dec 16, 2025
cf9e95e
Disable auto-commit workflow temporarily
youknowriad Dec 16, 2025
24a477e
update snapshot modules unit tests
youknowriad Dec 16, 2025
ae06a3f
Update src built files
youknowriad Dec 16, 2025
68595ce
Fix MathML
youknowriad Dec 16, 2025
a8cd847
Revert "Disable auto-commit workflow temporarily"
youknowriad Dec 16, 2025
076a09b
Revert "Disable auto-commit"
youknowriad Dec 16, 2025
a2789ba
Use content hashes for versions
youknowriad Dec 16, 2025
2f1cf73
Shallow clone
youknowriad Dec 16, 2025
c6e915e
Stable build
youknowriad Dec 16, 2025
cbbec60
Automation: Updating built files with changes.
Dec 16, 2025
9c85a70
Increase memory for the build process
youknowriad Dec 16, 2025
35f1935
Remove gutenberg built process workflow: Now Gutenberg is always buil…
youknowriad Dec 17, 2025
0dd718a
Normalize paths betweens Operating systems
youknowriad Dec 17, 2025
7492638
More stable version hashes
youknowriad Dec 17, 2025
14874d7
Avoid linting removed files
youknowriad Dec 17, 2025
d7ebe98
gitignore all of Gutenberg generated code
youknowriad Dec 17, 2025
4aca339
Simplify modules registration
youknowriad Dec 17, 2025
7070531
Simplify build
youknowriad Dec 17, 2025
4a9d5e3
Fix block CSS building
youknowriad Dec 18, 2025
b96f171
Format build files
youknowriad Dec 18, 2025
0ef1698
More copy simplifications
youknowriad Dec 18, 2025
cb5ecf5
Restore unit test fetch priority after fix in trunk
youknowriad Jan 5, 2026
0b4a0ae
Fix flaky test_object_cache_thresholds test on MariaDB
youknowriad Jan 5, 2026
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