From e027076cf0ae9417e01c69c9b810cd8c7c0ea742 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Mon, 25 Aug 2025 21:04:36 +0200 Subject: [PATCH 1/2] Setup workflow to publish to BCR Signed-off-by: Matthieu MOREL --- .bcr/bazel/metadata.template.json | 16 +++++++++++++ .bcr/bazel/presubmit.yml | 36 ++++++++++++++++++++++++++++ .bcr/bazel/source.template.json | 5 ++++ .bcr/config.yml | 8 +++++++ .github/workflows/publish-to-bcr.yml | 23 ++++++++++++++++++ 5 files changed, 88 insertions(+) create mode 100644 .bcr/bazel/metadata.template.json create mode 100644 .bcr/bazel/presubmit.yml create mode 100644 .bcr/bazel/source.template.json create mode 100644 .bcr/config.yml create mode 100644 .github/workflows/publish-to-bcr.yml diff --git a/.bcr/bazel/metadata.template.json b/.bcr/bazel/metadata.template.json new file mode 100644 index 0000000000..1292e99545 --- /dev/null +++ b/.bcr/bazel/metadata.template.json @@ -0,0 +1,16 @@ +{ + "homepage": "https://emscripten.org", + "maintainers": [ + { + "name": "Sam Clegg", + "email": "sbc@chromium.org", + "github": "sbc100", + "github_user_id": 515813 + } + ], + "repository": [ + "github:emscripten-core/emsdk" + ], + "versions": [], + "yanked_versions": {} +} diff --git a/.bcr/bazel/presubmit.yml b/.bcr/bazel/presubmit.yml new file mode 100644 index 0000000000..0202b686b8 --- /dev/null +++ b/.bcr/bazel/presubmit.yml @@ -0,0 +1,36 @@ +matrix: + platform: + - debian11 + - ubuntu2204 + - macos + - macos_arm64 + - windows + bazel: + - 7.x +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - '@emsdk//hello-world:hello-world-wasm' + - '@emsdk//hello-world:hello-world-wasm-simd' +bcr_test_module: + module_path: test_external + matrix: + platform: + - debian11 + - ubuntu2204 + - macos + - macos_arm64 + - windows + bazel: + - 7.x + tasks: + run_test_module: + name: Run test module + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - //:hello-world-wasm + - //long_command_line:long_command_line_wasm diff --git a/.bcr/bazel/source.template.json b/.bcr/bazel/source.template.json new file mode 100644 index 0000000000..d97ec527fc --- /dev/null +++ b/.bcr/bazel/source.template.json @@ -0,0 +1,5 @@ +{ + "integrity": "", + "strip_prefix": "{REPO}-{TAG}/bazel", + "url": "https://github.com/{OWNER}/{REPO}/archive/refs/tags/{TAG}.tar.gz" +} diff --git a/.bcr/config.yml b/.bcr/config.yml new file mode 100644 index 0000000000..e22a8d233a --- /dev/null +++ b/.bcr/config.yml @@ -0,0 +1,8 @@ +# See https://github.com/bazel-contrib/publish-to-bcr#a-note-on-release-automation + +fixedReleaser: + login: sbc100 + email: sbc@chromium.org + +moduleRoots: + - bazel diff --git a/.github/workflows/publish-to-bcr.yml b/.github/workflows/publish-to-bcr.yml new file mode 100644 index 0000000000..0f4ce4de43 --- /dev/null +++ b/.github/workflows/publish-to-bcr.yml @@ -0,0 +1,23 @@ +name: Publish to BCR +on: + push: + tags: + - '*' + +jobs: + publish: + uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.0.0 + with: + tag_name: ${{ inputs.tag_name || github.ref_name }} + registry_fork: emscripten-core/bazel-central-registry + # see note on Attestation Support + attest: true + permissions: + contents: write + # Necessary if attest:true + id-token: write + # Necessary if attest:true + attestations: write + secrets: + # Necessary to push to the BCR fork, and to open a pull request against a registry + publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }} From 503256c31f3657722f745362b6784ba37c0dd9fd Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Wed, 18 Feb 2026 08:19:17 +0100 Subject: [PATCH 2/2] Align with BRC 5.0.1 version Signed-off-by: Matthieu MOREL --- .bcr/bazel/presubmit.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.bcr/bazel/presubmit.yml b/.bcr/bazel/presubmit.yml index 0202b686b8..5b7e745c24 100644 --- a/.bcr/bazel/presubmit.yml +++ b/.bcr/bazel/presubmit.yml @@ -1,12 +1,12 @@ matrix: platform: - - debian11 + - debian13 - ubuntu2204 - - macos - - macos_arm64 - windows bazel: - 7.x + - 8.x + - 9.x tasks: verify_targets: name: Verify build targets @@ -19,13 +19,13 @@ bcr_test_module: module_path: test_external matrix: platform: - - debian11 + - debian13 - ubuntu2204 - - macos - - macos_arm64 - windows bazel: - 7.x + - 8.x + - 9.x tasks: run_test_module: name: Run test module