diff options
Diffstat (limited to 'mattertimectl')
| -rw-r--r-- | mattertimectl/build/defaults/main.yaml | 5 | ||||
| -rw-r--r-- | mattertimectl/build/meta/main.yaml | 3 | ||||
| -rw-r--r-- | mattertimectl/build/tasks/main.yaml | 25 |
3 files changed, 10 insertions, 23 deletions
diff --git a/mattertimectl/build/defaults/main.yaml b/mattertimectl/build/defaults/main.yaml index 56cabdc..277d5a2 100644 --- a/mattertimectl/build/defaults/main.yaml +++ b/mattertimectl/build/defaults/main.yaml @@ -9,8 +9,7 @@ mattertimectl_tar: "https://github.com/{{github_user}}/mattertimectl/archive/ref mattertimectl_build_dir: "{{build_work_dir}}/mattertimectl-{{mattertimectl_version}}" mattertimectl_srv_dir: "{{build_srv_dir}}" -# Keep cargo's registry cache, the rustup toolchains, and the build output -# on build_work_dir (the SSD), not the SD card. +# Keep cargo's registry cache and the build output on build_work_dir (the +# SSD), not the SD card. mattertimectl_cargo_home: "{{build_work_dir}}/.cargo" -mattertimectl_rustup_home: "{{build_work_dir}}/.rustup" mattertimectl_cargo_target_dir: "{{build_work_dir}}/.cargo-target" diff --git a/mattertimectl/build/meta/main.yaml b/mattertimectl/build/meta/main.yaml index dae4be5..2fda290 100644 --- a/mattertimectl/build/meta/main.yaml +++ b/mattertimectl/build/meta/main.yaml @@ -1,5 +1,4 @@ --- -# No role dependency: the Rust toolchain is installed inline via rustup -# (the distro rustc is too old for this crate's Rust edition). +# No role dependency: rustc/cargo are installed inline from apt. dependencies: [] diff --git a/mattertimectl/build/tasks/main.yaml b/mattertimectl/build/tasks/main.yaml index d5721d7..87ce346 100644 --- a/mattertimectl/build/tasks/main.yaml +++ b/mattertimectl/build/tasks/main.yaml @@ -14,22 +14,14 @@ path: "{{mattertimectl_srv_dir}}/mattertimectl-{{mattertimectl_version}}.tar.gz" register: build_file -# NOTE: rustup is used only because rs-matter requires a newer rustc than -# Ubuntu 24.04's apt ships (apt rustc is 1.75; rs-matter needs >= 1.87). Once -# the build host runs an Ubuntu whose apt rustc/cargo are new enough, drop -# rustup and the toolchain tasks below and just `apt install rustc cargo`. -- name: install rustup +# rs-matter needs rustc >= 1.87; 26.04's apt ships 1.93, so the distro +# toolchain suffices. 24.04 builds needed rustup instead (see git history). +- name: install rustc and cargo become: yes apt: - name: "rustup" - state: "present" - -- name: install a current stable rust toolchain - command: "rustup toolchain install stable" - environment: - CARGO_HOME: "{{mattertimectl_cargo_home}}" - RUSTUP_HOME: "{{mattertimectl_rustup_home}}" - when: not build_file.stat.exists + name: + - "rustc" + - "cargo" - name: unarchive mattertimectl source unarchive: @@ -39,15 +31,12 @@ creates: "{{mattertimectl_build_dir}}" - name: build mattertimectl release binary - # rustup run stable dispatches cargo through the toolchain regardless of - # the apt rustup package's proxy layout or the configured default. - command: "rustup run stable cargo build --release" + command: "cargo build --release" args: chdir: "{{mattertimectl_build_dir}}" creates: "{{mattertimectl_cargo_target_dir}}/release/mattertimectl" environment: CARGO_HOME: "{{mattertimectl_cargo_home}}" - RUSTUP_HOME: "{{mattertimectl_rustup_home}}" CARGO_TARGET_DIR: "{{mattertimectl_cargo_target_dir}}" when: not build_file.stat.exists |
