Skip to content

Commit 61b9b27

Browse files
authored
feat: update formatjs cli to 1.1.5 (#65)
Summary: - Update built-in formatjs_cli to 1.1.5. - Add Linux ARM64 binary support and platform-aware CLI alias selection. - Add a ubuntu-24.04-arm GitHub Actions smoke job for the ARM64 CLI. Tests: - bazel test //... - bazel build @formatjs_cli_toolchains_linux_aarch64//:cli //formatjs_cli:cli - bazel cquery 'somepath(//formatjs_cli:cli, @formatjs_cli_toolchains_linux_aarch64//:cli)' with a temporary Linux ARM64 platform during local verification
1 parent 3901076 commit 61b9b27

9 files changed

Lines changed: 145 additions & 49 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,32 @@ jobs:
4141
${{ matrix.folder }}/bazel-testlogs/**/test.xml
4242
if-no-files-found: warn
4343
retention-days: 7
44+
45+
linux-arm64-smoke:
46+
runs-on: ubuntu-24.04-arm
47+
steps:
48+
- uses: actions/checkout@v6
49+
- uses: bazel-contrib/setup-bazel@0.19.0
50+
with:
51+
bazelisk-cache: true
52+
disk-cache: ${{ github.workflow }}-linux-arm64
53+
repository-cache: true
54+
55+
- name: Verify Linux ARM64 CLI alias
56+
run: |
57+
bazel cquery 'somepath(//formatjs_cli:cli, @formatjs_cli_toolchains_linux_aarch64//:cli)'
58+
59+
- name: Smoke test Linux ARM64 CLI
60+
run: |
61+
bazel test //tests/arguments:test_fixtures_0_test
62+
63+
- name: Upload test logs
64+
if: failure()
65+
uses: actions/upload-artifact@v7
66+
with:
67+
name: test-logs-ubuntu-24.04-arm
68+
path: |
69+
bazel-testlogs/**/test.log
70+
bazel-testlogs/**/test.xml
71+
if-no-files-found: warn
72+
retention-days: 7

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ bazel_dep(name = "rules_shell", version = "0.3.0", dev_dependency = True)
4444

4545
# FormatJS CLI toolchain
4646
formatjs_cli = use_extension("//formatjs_cli:extensions.bzl", "formatjs_cli")
47-
formatjs_cli.toolchain(version = "1.1.4")
47+
formatjs_cli.toolchain(version = "1.1.5")
4848
use_repo(
4949
formatjs_cli,
5050
"formatjs_cli_toolchains",

MODULE.bazel.lock

Lines changed: 12 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/aggregate/MODULE.bazel.lock

Lines changed: 17 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/custom_version/MODULE.bazel.lock

Lines changed: 19 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/simple/MODULE.bazel.lock

Lines changed: 17 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

formatjs_cli/BUILD.bazel

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,41 @@ toolchain_type(
44
visibility = ["//visibility:public"],
55
)
66

7+
config_setting(
8+
name = "darwin_arm64",
9+
constraint_values = [
10+
"@platforms//os:osx",
11+
"@platforms//cpu:arm64",
12+
],
13+
)
14+
15+
config_setting(
16+
name = "linux_aarch64",
17+
constraint_values = [
18+
"@platforms//os:linux",
19+
"@platforms//cpu:aarch64",
20+
],
21+
)
22+
23+
config_setting(
24+
name = "linux_x64",
25+
constraint_values = [
26+
"@platforms//os:linux",
27+
"@platforms//cpu:x86_64",
28+
],
29+
)
30+
731
# Alias that resolves to the correct toolchain CLI based on platform
832
# This is used by verify.bzl which can't use toolchains directly
933
alias(
1034
name = "cli",
11-
actual = select({
12-
"@platforms//os:osx": "@formatjs_cli_toolchains_darwin_arm64//:cli",
13-
"@platforms//os:linux": "@formatjs_cli_toolchains_linux_x64//:cli",
14-
}),
35+
actual = select(
36+
{
37+
":darwin_arm64": "@formatjs_cli_toolchains_darwin_arm64//:cli",
38+
":linux_aarch64": "@formatjs_cli_toolchains_linux_aarch64//:cli",
39+
":linux_x64": "@formatjs_cli_toolchains_linux_x64//:cli",
40+
},
41+
no_match_error = "No FormatJS CLI binary is available for this target platform.",
42+
),
1543
visibility = ["//visibility:public"],
1644
)

0 commit comments

Comments
 (0)