blob: defb5e37b025ac0f699050c5d93b192f79075100 [file] [edit]
# This file is part of ICU4X. For terms of use, please see the file
# called LICENSE at the top level of the ICU4X source tree
# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
extend = [
{ path = "./tools/make/data.toml"}, #
{ path = "./tools/make/valgrind.toml"}, #
{ path = "./tools/make/tidy.toml"}, #
{ path = "./tools/make/wasm.toml"}, #
{ path = "./tools/make/tests.toml"}, #
{ path = "./tools/make/ffi.toml"}, #
]
[config]
default_to_workspace = false
[env]
# The toolchain that CI is being run in. Allows tests to change under beta/nightly.
CI_TOOLCHAIN = { value = "pinned-stable", condition = { env_not_set = ["CI_TOOLCHAIN"]}}
# The pinned nightly toolchain for jobs that require a nightly compiler.
PINNED_CI_NIGHTLY = { value = "nightly-2026-06-01", condition = { env_not_set = ["PINNED_CI_NIGHTLY"] } }
LLVM_COMPATIBLE_NIGHTLY = { value = "nightly-2025-07-01", condition = { env_not_set = ["LLVM_COMPATIBLE_NIGHTLY"] } }
[tasks.quick]
description = "Run quick version of all lints and builds (useful before pushing to GitHub)"
category = "ICU4X Development"
env = { "ICU4X_DATA_DIR" = "../stubdata" }
run_task.name = [
"ci-job-fmt",
"ci-job-clippy",
"check-no-features",
"ci-job-doc",
]
[tasks.tidy]
description = "Run fmt and other tidy checks"
category = "ICU4X Development"
dependencies = [
"ci-job-fmt",
"ci-job-tidy",
]
[tasks.check]
description = "Check ICU4X build with no features (covered in CI via cargo make check-all-features)"
category = "ICU4X Development"
env = { ICU4X_DATA_DIR = "../stubdata" }
command = "cargo"
args = ["check", "--all-targets", "--all-features"]
[tasks.check-no-features]
description = "Check ICU4X build with no features (covered in CI via cargo make check-all-features)"
category = "ICU4X Development"
env = { ICU4X_DATA_DIR = "../stubdata" }
command = "cargo"
args = ["check", "--no-default-features"]
[tasks.ci-job-check]
description = "Run all tests for the CI 'check' job"
category = "ICU4X Development"
env = { ICU4X_DATA_DIR = "../stubdata" }
script_runner = "@duckscript"
script = '''
exec --fail-on-error cargo check --all-targets --all-features --workspace --exclude diplomat-gen --exclude codegen --exclude bakeddata --exclude depcheck --exclude diplomat-coverage --exclude icu_benchmark_memory --exclude icu_benchmark_binsize
'''
[tasks.ci-job-test]
description = "Run all tests for the CI 'test' job"
category = "CI"
dependencies = [
"test-all-features",
]
[tasks.ci-job-test-gigo]
description = "Run specific tests with debug assertions disabled"
category = "CI"
dependencies = [
"test-dev-without-assertions",
]
[tasks.ci-job-test-cargo]
description = "Run all checks for the CI 'test-cargo' job"
category = "CI"
dependencies = [
"test-cargo",
]
[tasks.ci-job-testdata]
description = "Run all tests for the CI 'testdata' job"
category = "CI"
dependencies = [
"testdata-check",
]
[tasks.ci-job-test-docs]
description = "Run all tests for the CI 'test-docs' job"
category = "CI"
dependencies = [
"test-docs",
]
[tasks.ci-job-full-datagen]
description = "Run full data generation on latest CLDR and ICU"
category = "CI"
dependencies = [
"bakeddata-check",
]
[tasks.ci-job-test-c]
description = "Run all tests for the CI 'test-c' job"
category = "CI"
dependencies = [
"test-c",
"test-c-tiny",
"test-cpp",
]
[tasks.ci-job-test-js]
description = "Run all tests for the CI 'test-js' job"
category = "CI"
dependencies = [
"test-npm",
"test-tinywasm",
]
[tasks.ci-job-test-dart]
description = "Run all tests for the CI 'test-dart' job"
category = "CI"
dependencies = [
"test-dart",
]
[tasks.ci-job-test-kotlin]
description = "Run all tests for the CI 'test-kotlin' job"
category = "CI"
dependencies = [
"test-kotlin",
]
[tasks.ci-job-nostd]
description = "Run all tests for the CI 'test-nostd' job"
env = { ICU4X_DATA_DIR = "../stubdata" }
category = "CI"
dependencies = [
"check-nostd",
"check-noalloc",
"check-freertos-wearos",
]
[tasks.ci-job-diplomat]
description = "Run all tests for the CI 'diplomat' job"
category = "CI"
dependencies = [
"verify-diplomat-gen",
"verify-diplomat-coverage",
]
[tasks.ci-job-features-1]
description = "Run all tests for the CI 'features-1' job"
category = "CI"
env = { ICU4X_DATA_DIR = "../stubdata" }
script_runner = "@duckscript"
script = '''
exec --fail-on-error cargo make check-all-features-chunked 1
'''
[tasks.ci-job-features-2]
description = "Run all tests for the CI 'features-2' job"
category = "CI"
env = { ICU4X_DATA_DIR = "../stubdata" }
script_runner = "@duckscript"
script = '''
exec --fail-on-error cargo make check-all-features-chunked 2
'''
[tasks.ci-job-features-3]
description = "Run all tests for the CI 'features-3' job"
category = "CI"
env = { ICU4X_DATA_DIR = "../stubdata" }
script_runner = "@duckscript"
script = '''
exec --fail-on-error cargo make check-all-features-chunked 3
'''
[tasks.ci-job-features-4]
description = "Run all tests for the CI 'features-4' job"
category = "CI"
env = { ICU4X_DATA_DIR = "../stubdata" }
script_runner = "@duckscript"
script = '''
exec --fail-on-error cargo make check-all-features-chunked 4
'''
[tasks.ci-job-features]
description = "Run all tests for the CI 'features' job"
category = "CI"
dependencies = [
"ci-job-features-1",
"ci-job-features-2",
"ci-job-features-3",
]
[tasks.ci-job-fmt]
description = "Run all tests for the CI 'fmt' job"
category = "CI"
dependencies = [
"fmt-check",
]
[tasks.ci-job-tidy]
description = "Run all tests for the CI 'tidy' job"
category = "CI"
dependencies = [
"license-header-check",
"generated-readme-check",
"license-file-check",
"depcheck",
"codegen-check",
]
[tasks.ci-job-clippy]
description = "Run all tests for the CI 'clippy' job"
category = "CI"
env = { ICU4X_DATA_DIR = "../stubdata" }
dependencies = [
"clippy-all",
]
[tasks.ci-job-doc]
description = "Runs rustdoc generation for the CI 'doc' job"
category = "CI"
env = { RUSTDOCFLAGS = "-Dwarnings", ICU4X_DATA_DIR = "../stubdata" }
command = "cargo"
args = ["doc", "--workspace", "--release", "--all-features", "--no-deps", "--lib"]
[tasks.ci-all]
# Note that updating this list will not update what is run on CI,
# it simply exists as a shortcut to run everything locally
description = "Locally run all CI jobs"
category = "ICU4X Development"
dependencies = [
# make quick
"ci-job-fmt",
"ci-job-clippy",
"check-no-features",
"depcheck",
"ci-job-doc",
# not so quick
"ci-job-diplomat",
"ci-job-tidy",
"ci-job-nostd",
"ci-job-check",
"check-tutorials-local",
# Get a coffee
"ci-job-test",
"ci-job-test-docs",
"ci-job-test-cargo",
"ci-job-testdata",
"ci-job-features",
"ci-job-full-datagen",
# Needs tools other than Cargo to be installed
"ci-job-test-c",
"ci-job-test-js",
"ci-job-test-dart",
# benchmarking and coverage jobs not included
]
# For the nightly and beta CI, we set
# - a rustup override
# - CI_TOOLCHAIN: gets set to either "pinned-stable", "beta", or "nightly"
# - PINNED_CI_NIGHTLY: Set to "nightly" if we want to use the latest nightly
#
# When updating the toolchain, please audit all cases of CI_TOOLCHAIN and remove cfgs where necessary.
[tasks.set-ci-toolchain]
description = "Set all toolchain vars for CI"
category = "CI"
script_runner = "@duckscript"
script = '''
exit_on_error true
env_file = get_env GITHUB_ENV
if not ${env_file}
echo "GITHUB_ENV not set!"
exit 1
end
event_name = get_env GITHUB_EVENT_NAME
if not ${event_name}
echo "GITHUB_EVENT_NAME not set!"
exit 1
end
ci_toolchain = set "pinned-stable"
echo "set-ci-toolchain: GITHUB_EVENT_NAME is ${event_name}"
# We need to parse the channel information for dispatch/schedule events
is_workflow = eq "${event_name}" "workflow_dispatch"
is_schedule = eq "${event_name}" "schedule"
if ${is_workflow} or ${is_schedule}
event_path = get_env GITHUB_EVENT_PATH
event_file = readfile ${event_path}
event_json = json_parse ${event_file}
# For dispatch events
if ${is_workflow}
echo "set-ci-toolchain: manually selected channel is ${event_json.inputs.channel}"
if not eq "${event_json.inputs.channel}" "pinned-stable"
needs_override = set true
ci_toolchain = set "${event_json.inputs.channel}"
end
else
echo "set-ci-toolchain: cronjob is scheduled at ${event_json.schedule}"
# Schedule events always override
needs_override = set true
# For schedule events, the cronjob on minute 1 is the beta job
if eq "${event_json.schedule}" "1 14 * * *"
ci_toolchain = set "beta"
else
ci_toolchain = set "nightly"
end
end
end
if not eq ${ci_toolchain} "pinned-stable"
echo "Setting up CI environment for forced-${ci_toolchain} Rust build"
appendfile ${env_file} "CI_TOOLCHAIN=${ci_toolchain}\n"
exec rustup override set ${ci_toolchain}
if starts_with "${ci_toolchain}" "nightly"
# This affects tasks that can only be built on nightly
appendfile ${env_file} "PINNED_CI_NIGHTLY=${ci_toolchain}\n"
appendfile ${env_file} "RUSTFLAGS=--cfg=icu4x_nightly_tests\n"
end
else
echo "forced-toolchain environment not required"
end
'''