Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ jobs:
run: rustup show
- name: Load cortex target for no_std build.
run: |
rustup install nightly-2021-09-22
rustup component add --toolchain nightly-2021-09-22 rust-src
rustup target add thumbv7m-none-eabi --toolchain nightly-2021-09-22
rustup target add thumbv8m.main-none-eabihf --toolchain nightly-2021-09-22
rustup target add x86_64-unknown-linux-gnu --toolchain nightly-2021-09-22
rustup install nightly-2021-12-22
rustup component add --toolchain nightly-2021-12-22 rust-src
rustup target add thumbv7m-none-eabi --toolchain nightly-2021-12-22
rustup target add thumbv8m.main-none-eabihf --toolchain nightly-2021-12-22
rustup target add x86_64-unknown-linux-gnu --toolchain nightly-2021-12-22
- name: Get cargo-make version
id: cargo-make-version
run: |
Expand Down Expand Up @@ -233,10 +233,10 @@ jobs:
- uses: actions/checkout@v2
- name: Load nightly Rust toolchain for WASM.
run: |
rustup install nightly-2021-09-22
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-09-22
rustup target add wasm32-unknown-emscripten --toolchain nightly-2021-09-22
rustup component add rust-src --toolchain nightly-2021-09-22
rustup install nightly-2021-12-22
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-12-22
rustup target add wasm32-unknown-emscripten --toolchain nightly-2021-12-22
rustup component add rust-src --toolchain nightly-2021-12-22
- name: Install WASM tools
run: |
sudo npm install -g wasm-opt --unsafe-perm
Expand Down Expand Up @@ -618,12 +618,12 @@ jobs:
# then this line is no longer needed.
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-09-22
toolchain: nightly-2021-12-22
override: true

- name: Run the example with dhat-rs to collect memory information
run: |
cargo run --package icu_benchmark_memory -- --os ${{ matrix.os }} ${{ matrix.examples }} --toolchain nightly-2021-09-22
cargo run --package icu_benchmark_memory -- --os ${{ matrix.os }} ${{ matrix.examples }} --toolchain nightly-2021-12-22

# Benchmarking & dashboards job > (unmerged PR only) Convert benchmark output into
# dashboard HTML in a commit of a branch of the local repo.
Expand Down Expand Up @@ -758,7 +758,7 @@ jobs:
run: |
rustup component add rust-src
rustup toolchain list
rustup toolchain install nightly-2021-09-22
rustup toolchain install nightly-2021-12-22
sudo npm install -g wasm-opt --unsafe-perm
sudo npm install -g wabt

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-09-22
toolchain: nightly-2021-12-22
override: true

- uses: actions-rs/cargo@v1
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ Our wider testsuite is organized as `ci-job-foo` make tasks corresponding to eac
- `cargo make ci-job-test`: Runs `cargo test` on all the crates. This takes a while but is the main way of ensuring that nothing has been broken.
- `cargo make ci-job-clippy`: Runs `cargo clippy` on all the crates.
- `cargo make ci-job-ffi`: Runs all of the FFI tests; mostly important if you're changing the FFI interface. This has several additional dependencies:
+ Rust toolchain `nightly-2021-09-22`: `rustup install nightly-2021-09-22`
* `rust-src` for that toolchain: `rustup component add --toolchain nightly-2021-09-22 rust-src`
* Various targets for that toolchain: `rustup target add thumbv7m-none-eabi --toolchain nightly-2021-09-22`, `rustup target add thumbv8m.main-none-eabihf --toolchain nightly-2021-09-22`, `rustup target add x86_64-unknown-linux-gnu --toolchain nightly-2021-09-22`
+ Rust toolchain `nightly-2021-12-22`: `rustup install nightly-2021-12-22`
* `rust-src` for that toolchain: `rustup component add --toolchain nightly-2021-12-22 rust-src`
* Various targets for that toolchain: `rustup target add thumbv7m-none-eabi --toolchain nightly-2021-12-22`, `rustup target add thumbv8m.main-none-eabihf --toolchain nightly-2021-12-22`, `rustup target add x86_64-unknown-linux-gnu --toolchain nightly-2021-12-22`
+ [`Diplomat`](https://github.com/rust-diplomat/diplomat) installed at the appropriate version: `cargo make diplomat-install`
+ [`Sphinx`](https://www.sphinx-doc.org/en/master/) on Python3: `pip3 install sphinx sphinx-rtd-theme`
- `cargo make ci-job-wasm`: Runs WASM tests; mostly important if you're changing the FFI interface. This also has a couple additional dependencies:
+ Node.js version 14. This is typically not the one offered by the package manager; get it from the NodeJS website or `nvm`.
+ Rust toolchain `nightly-2021-09-22`: `rustup install nightly-2021-09-22`
* `rust-src` for that toolchain: `rustup component add --toolchain nightly-2021-09-22 rust-src`
* Various WASM targets for that toolchain: `rustup target add wasm32-unknown-unknown --toolchain nightly-2021-09-22`, `rustup target add wasm32-unknown-emscripten --toolchain nightly-2021-09-22`
+ Rust toolchain `nightly-2021-12-22`: `rustup install nightly-2021-12-22`
* `rust-src` for that toolchain: `rustup component add --toolchain nightly-2021-12-22 rust-src`
* Various WASM targets for that toolchain: `rustup target add wasm32-unknown-unknown --toolchain nightly-2021-12-22`, `rustup target add wasm32-unknown-emscripten --toolchain nightly-2021-12-22`
+ [`Twiggy`](https://github.com/rustwasm/twiggy) (at least 0.7.0: `cargo install twiggy`
+ [`emsdk`](https://github.com/emscripten-core/emsdk): Make sure to `./emsdk activate latest` it into your shell
- `cargo make ci-job-features`: This is a pretty slow test that tries to build all ICU4X crates with all feature combinations. It has an additional dependency:
Expand Down
4 changes: 2 additions & 2 deletions ffi/diplomat/c/examples/fixeddecimal_tiny/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ LLD := lld-12
cargo build

../../../../../target/x86_64-unknown-linux-gnu/debug/libicu_capi.a: $(ALL_RUST)
RUSTFLAGS="-Clinker-plugin-lto -Clinker=clang -Clink-arg=-flto -Cpanic=abort" cargo +nightly-2021-09-22 panic-abort-build --target x86_64-unknown-linux-gnu --no-default-features --features x86tiny
RUSTFLAGS="-Clinker-plugin-lto -Clinker=clang -Clink-arg=-flto -Cpanic=abort" cargo +nightly-2021-12-22 panic-abort-build --target x86_64-unknown-linux-gnu --no-default-features --features x86tiny

../../../../../target/x86_64-unknown-linux-gnu/release/libicu_capi.a: $(ALL_RUST)
RUSTFLAGS="-Clinker-plugin-lto -Clinker=clang -Clink-arg=-flto -Cpanic=abort" cargo +nightly-2021-09-22 panic-abort-build --target x86_64-unknown-linux-gnu --no-default-features --features x86tiny --features smaller_static --release
RUSTFLAGS="-Clinker-plugin-lto -Clinker=clang -Clink-arg=-flto -Cpanic=abort" cargo +nightly-2021-12-22 panic-abort-build --target x86_64-unknown-linux-gnu --no-default-features --features x86tiny --features smaller_static --release

# Naive target: no optimizations, full std
optim0.elf: ../../../../../target/debug/libicu_capi.a $(ALL_HEADERS) test.c
Expand Down
6 changes: 3 additions & 3 deletions ffi/diplomat/c/examples/fixeddecimal_tiny/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ https://github.com/rust-lang/rust/issues/60059
You also need to install the correct toolchains:

```bash
$ rustup install nightly-2021-09-22
$ rustup component add --toolchain nightly-2021-09-22 rust-src
$ rustup target add x86_64-unknown-linux-gnu --toolchain nightly-2021-09-22
$ rustup install nightly-2021-12-22
$ rustup component add --toolchain nightly-2021-12-22 rust-src
$ rustup target add x86_64-unknown-linux-gnu --toolchain nightly-2021-12-22
```
2 changes: 1 addition & 1 deletion ffi/diplomat/cpp/examples/fixeddecimal_wasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ a.out: ../../../../../target/debug/libicu_capi.a $(ALL_HEADERS) test.cpp
$(CXX) -std=c++17 test.cpp ../../../../../target/debug/libicu_capi.a -ldl -lpthread -lm -g

../../../../../target/wasm32-unknown-emscripten/release/libicu_capi.a: $(ALL_RUST)
RUSTFLAGS="-Cpanic=abort" cargo +nightly-2021-09-22 build --release -p icu_capi --target wasm32-unknown-emscripten -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort
RUSTFLAGS="-Cpanic=abort" cargo +nightly-2021-12-22 build --release -p icu_capi --target wasm32-unknown-emscripten -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort

web-version.html: ../../../../../target/wasm32-unknown-emscripten/release/libicu_capi.a $(ALL_HEADERS) test.cpp
$(EMCC) -std=c++17 test.cpp ../../../../../target/wasm32-unknown-emscripten/release/libicu_capi.a -ldl -lpthread -lm -g -o web-version.html --bind --emrun -sENVIRONMENT=web -sWASM=1 -sEXPORT_ES6=1 -sMODULARIZE=1
Expand Down
2 changes: 1 addition & 1 deletion tools/benchmark/memory/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fn process_cli_args() -> ProcessedArgs {

toolchain: matches
.value_of("TOOLCHAIN")
.unwrap_or("nightly-2021-09-22")
.unwrap_or("nightly-2021-12-22")
.to_string(),
}
}
Expand Down
4 changes: 2 additions & 2 deletions tools/scripts/ffi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ exec --fail-on-error diplomat-tool cpp ./cpp/include --docs ./cpp/docs/source
[tasks.build-wearos-ffi]
description = "Build ICU4X CAPI for Cortex"
category = "ICU4X FFI"
toolchain = "nightly-2021-09-22"
toolchain = "nightly-2021-12-22"
env = { "RUSTFLAGS" = "-Ctarget-cpu=cortex-m33 -Cpanic=abort" }
command = "cargo"
args = ["build", "--package", "icu_capi",
Expand All @@ -150,7 +150,7 @@ args = ["build", "--package", "icu_capi",
[tasks.test-nostd]
description = "Ensure ICU4X core builds on no-std"
category = "ICU4X FFI"
toolchain = "nightly-2021-09-22"
toolchain = "nightly-2021-12-22"
command = "cargo"
args = ["build", "--package", "icu", "--target", "thumbv7m-none-eabi"]

Expand Down
4 changes: 2 additions & 2 deletions tools/scripts/valgrind.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
description = "Pre-build artifacts for use with the Valgrind task"
category = "ICU4X Valgrind"
command = "cargo"
toolchain = "nightly-2021-09-22"
toolchain = "nightly-2021-12-22"
# Add features here and below if a desired example is not being built
args = [
"build", "--examples",
Expand All @@ -34,7 +34,7 @@ mkdir benchmarks
mkdir benchmarks/valgrind

# Re-run the build command only to generate the JSON output (--message-format=json)
output = exec cargo +nightly-2021-09-22 build --examples --message-format=json --features icu_benchmark_macros/rust_global_allocator --features zerovec/serde --profile bench -Z unstable-options
output = exec cargo +nightly-2021-12-22 build --examples --message-format=json --features icu_benchmark_macros/rust_global_allocator --features zerovec/serde --profile bench -Z unstable-options
if ${output.code}
trigger_error "Build failed! To debug, build examples with `--features icu_benchmark_macros/rust_global_allocator`"
end
Expand Down
8 changes: 4 additions & 4 deletions tools/scripts/wasm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
description = "Build WASM FFI into the target directory (dev mode)"
category = "ICU4X WASM"
install_crate = { rustup_component_name = "rust-src" }
toolchain = "nightly-2021-09-22"
toolchain = "nightly-2021-12-22"
command = "cargo"
args = ["wasm-build-dev", "--package", "icu_capi", "--example", "icu_capi_cdylib"]

[tasks.wasm-build-release]
description = "Build WASM FFI into the target directory (release mode)"
category = "ICU4X WASM"
install_crate = { rustup_component_name = "rust-src" }
toolchain = "nightly-2021-09-22"
toolchain = "nightly-2021-12-22"
# We don't care about panics in release mode because most incorrect inputs are handled by result types.
env = { "RUSTFLAGS" = "-C panic=abort -C opt-level=s" }
command = "cargo"
Expand All @@ -26,7 +26,7 @@ args = ["wasm-build-release", "--package", "icu_capi", "--example", "icu_capi_cd
description = "Build WASM examples into the target directory"
category = "ICU4X WASM"
install_crate = { rustup_component_name = "rust-src" }
toolchain = "nightly-2021-09-22"
toolchain = "nightly-2021-12-22"
# We don't care about panics in release mode because most incorrect inputs are handled by result types.
env = { "RUSTFLAGS" = "-C panic=abort -C opt-level=s" }
command = "cargo"
Expand Down Expand Up @@ -77,7 +77,7 @@ exit_on_error true

# Re-run the build command only to generate the JSON output (--message-format=json)
set_env RUSTFLAGS "-C panic=abort -C opt-level=s"
output = exec cargo +nightly-2021-09-22 wasm-build-release --message-format=json --examples --workspace --features zerovec/serde --exclude icu_datagen
output = exec cargo +nightly-2021-12-22 wasm-build-release --message-format=json --examples --workspace --features zerovec/serde --exclude icu_datagen
if ${output.code}
echo ${output.stderr}
trigger_error "Build failed! See output above."
Expand Down