Skip to content

Commit

Permalink
Don’t run warnings into errors when trying Nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Nov 30, 2018
1 parent e4c80d0 commit c04d1ca
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions etc/taskcluster/decision_task.py
Expand Up @@ -43,7 +43,7 @@ def main(task_for, mock=False):

build_env = {
"RUST_BACKTRACE": "1",
"RUSTFLAGS": "-Dwarnings",
"RUSTFLAGS": "-Dwarnings", # If changing this, also adjust with_rust_nightly()
"CARGO_INCREMENTAL": "0",
}
unix_build_env = {
Expand Down Expand Up @@ -100,11 +100,21 @@ def macos_unit():


def with_rust_nightly():
return linux_build_task("Linux x64: with Rust Nightly").with_script("""
echo "nightly" > rust-toolchain
./mach build --dev
./mach test-unit
""").create()
modified_build_env = dict(build_env)
flags = build_env.pop("RUSTFLAGS").split(" ")
flags.remove("-Dwarnings")
if flags: # pragma: no cover
modified_build_env["RUSTFLAGS"] = " ".join(flags)

return (
linux_build_task("Linux x64: with Rust Nightly", build_env=modified_build_env)
.with_script("""
echo "nightly" > rust-toolchain
./mach build --dev
./mach test-unit
""")
.create()
)


def android_arm32():
Expand Down Expand Up @@ -304,7 +314,7 @@ def macos_task(name):
)


def linux_build_task(name):
def linux_build_task(name, *, build_env=build_env):
return (
linux_task(name)
# https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches
Expand Down

0 comments on commit c04d1ca

Please sign in to comment.