Skip to content

Commit 1b2f61a

Browse files
authored
Update PINNED_CI_NIGHTLY (not LLVM_COMPATIBLE_NIGHTLY) (#7003)
By policy these are allowed (and usually supposed to be) separate: `LLVM_COMPATIBLE_NIGHTLY` is *only* for tests constrained by LLVM version, whereas `PINNED_CI_NIGHTLY` should be a recent nightly so that nightly CI can keep passing. We should not be trying to maintain test compatibility with rustc nightlies across 6 months. We had these be the same for a while because JS CI was _additionally_ constrained by the WASM ABI changes; but that's been fixed for a while now. Making this PR from the ICU4X repo so I can run nightly CI on it. This *should* fix JS and nostd nightly CI. <!-- Thank you for your pull request to ICU4X! Reminder: try to use [Conventional Comments](https://conventionalcomments.org/) to make comments clearer. Please see https://github.com/unicode-org/icu4x/blob/main/CONTRIBUTING.md for general information on contributing to ICU4X. -->
1 parent c2728c1 commit 1b2f61a

File tree

11 files changed

+95
-78
lines changed

11 files changed

+95
-78
lines changed

Cargo.lock

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

Makefile.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ default_to_workspace = false
1818
# The toolchain that CI is being run in. Allows tests to change under beta/nightly.
1919
CI_TOOLCHAIN = { value = "pinned-stable", condition = { env_not_set = ["CI_TOOLCHAIN"]}}
2020
# The pinned nightly toolchain for jobs that require a nightly compiler.
21-
PINNED_CI_NIGHTLY = { value = "nightly-2025-02-17", condition = { env_not_set = ["PINNED_CI_NIGHTLY"] } }
21+
PINNED_CI_NIGHTLY = { value = "nightly-2025-09-27", condition = { env_not_set = ["PINNED_CI_NIGHTLY"] } }
22+
LLVM_COMPATIBLE_NIGHTLY = { value = "nightly-2025-02-17", condition = { env_not_set = ["LLVM_COMPATIBLE_NIGHTLY"] } }
2223

2324
[tasks.quick]
2425
description = "Run quick version of all lints and builds (useful before pushing to GitHub)"

documents/process/rust_versions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ When the nightly cronjob CI fails, ICU4X developers must fix it and ensure it do
4343
ICU4X pins Rust Nightlies in CI for multiple purposes:
4444

4545
- `diplomat-coverage/src/main.rs`: Running the diplomat-coverage task, which uses unstable Rustdoc JSON output, requiring synchronization between the Rust version and the `rustdoc_types` dependency.
46-
- `PINNED_CI_NIGHTLY`: Running various FFI CI jobs that need _some_ Rust nightly to use build-std or other nightly features, without becoming beholden to arbitrary
46+
- `PINNED_CI_NIGHTLY`: Running various FFI CI jobs that need a reasonably recent Rust nightly to use build-std or other nightly features, without becoming beholden to arbitrary specific version constraints.
4747
- `LLVM_COMPATIBLE_NIGHTLY`: Usage of `-Clinker-plugin-lto` in size-optimized tests where Rust and Clang need to be using compatible LLVM versions.
4848

49-
5049
ICU4X also runs its entire CI against the latest nightly once a day, reporting errors to Slack. These errors help us catch upstream breakages early, but ICU4X does not have any particular SLO against these being fixed. We guarantee we build on the latest stable as detailed in the first section of this page.
5150

5251
The first two nightlies here can be updated whenever necessary to whatever nightly works. It not necessary to keep the nightly versions the same, though it is ideal to try. The choice of these nightlies does not have much of a direct impact on users.

examples/cargo/buffer/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
export CARGO_TARGET_DIR ?= target
66

7-
PINNED_CI_NIGHTLY = "nightly-2025-02-17"
7+
PINNED_CI_NIGHTLY = "nightly-2025-09-27"
88

99
all: buffer_data.postcard bin/tutorial_buffer.wasm
1010

examples/js-tiny/Cargo.lock

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

examples/npm/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ffi/dart/lib/src/hook_helpers/build_libs.dart

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Future buildLib(
6262
final isNoStd = _isNoStdTarget(rustTarget);
6363

6464
final nightly =
65-
Platform.environment['PINNED_CI_NIGHTLY'] ?? 'nightly-2025-02-17';
65+
Platform.environment['PINNED_CI_NIGHTLY'] ?? 'nightly-2025-09-27';
6666

6767
if (buildStatic || isNoStd) {
6868
await runProcess('rustup', [
@@ -85,26 +85,30 @@ Future buildLib(
8585
final additionalFeatures = isNoStd
8686
? ['libc_alloc', 'looping_panic_handler']
8787
: ['simple_logger'];
88-
await runProcess('cargo', [
89-
if (buildStatic || isNoStd) '+$nightly',
90-
'rustc',
91-
'--manifest-path=ffi/capi/Cargo.toml',
92-
'--crate-type=${buildStatic ? 'staticlib' : 'cdylib'}',
93-
'--release',
94-
'--config=profile.release.panic="abort"',
95-
'--config=profile.release.codegen-units=1',
96-
'--no-default-features',
97-
'--features=${{...cargoFeatures, ...additionalFeatures}.join(',')}',
98-
if (isNoStd) '-Zbuild-std=core,alloc',
99-
if (buildStatic || isNoStd) ...[
100-
'-Zbuild-std=std,panic_abort',
101-
'-Zbuild-std-features=panic_immediate_abort',
88+
await runProcess(
89+
'cargo',
90+
[
91+
if (buildStatic || isNoStd) '+$nightly',
92+
'rustc',
93+
'--manifest-path=ffi/capi/Cargo.toml',
94+
'--crate-type=${buildStatic ? 'staticlib' : 'cdylib'}',
95+
'--release',
96+
'--config=profile.release.panic="abort"',
97+
'--config=profile.release.codegen-units=1',
98+
'--no-default-features',
99+
'--features=${{...cargoFeatures, ...additionalFeatures}.join(',')}',
100+
if (isNoStd) '-Zbuild-std=core,alloc',
101+
if (buildStatic || isNoStd) ...['-Zbuild-std=std,panic_abort'],
102+
'--target=$rustTarget',
103+
'--',
104+
'--emit',
105+
'link=${out.toFilePath(windows: Platform.isWindows)}',
102106
],
103-
'--target=$rustTarget',
104-
'--',
105-
'--emit',
106-
'link=${out.toFilePath(windows: Platform.isWindows)}',
107-
], workingDirectory: workingDirectory);
107+
workingDirectory: workingDirectory,
108+
environment: {
109+
if (isNoStd) 'RUSTFLAGS': '-Zunstable-options -Cpanic=immediate-abort',
110+
},
111+
);
108112
}
109113

110114
bool _isNoStdTarget(String target) =>
@@ -115,6 +119,7 @@ Future<void> runProcess(
115119
List<String> arguments, {
116120
Directory? workingDirectory,
117121
bool dryRun = false,
122+
Map<String, String>? environment,
118123
}) async {
119124
print('----------');
120125
print('Running `$executable $arguments` in $workingDirectory');

0 commit comments

Comments
 (0)