|
| 1 | +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +--- |
| 5 | +- name: Install cargo-nextest |
| 6 | + hosts: all |
| 7 | + become: true |
| 8 | + gather_facts: false |
| 9 | + vars: |
| 10 | + nextest_version: 0.9.143 |
| 11 | + nextest_arches: |
| 12 | + x86_64: |
| 13 | + triple: x86_64-unknown-linux-musl |
| 14 | + sha256: 6d891c18105ec2d33f6e441a4f92b7ccab47ba263e22055c8bb66884243f3389 |
| 15 | + aarch64: |
| 16 | + triple: aarch64-unknown-linux-musl |
| 17 | + sha256: 0560ce0ce017f368c54b5db86588370fc03b470985490fa81200e62a657dda05 |
| 18 | + tasks: |
| 19 | + - name: Wait for SSH |
| 20 | + ansible.builtin.wait_for_connection: |
| 21 | + |
| 22 | + - name: Gather guest architecture |
| 23 | + ansible.builtin.setup: |
| 24 | + filter: |
| 25 | + - ansible_architecture |
| 26 | + |
| 27 | + - name: Select cargo-nextest release for guest architecture |
| 28 | + ansible.builtin.set_fact: |
| 29 | + nextest_release: "{{ nextest_arches[ansible_facts.architecture] | default({}) }}" |
| 30 | + |
| 31 | + - name: Validate guest architecture |
| 32 | + ansible.builtin.assert: |
| 33 | + that: nextest_release | length > 0 |
| 34 | + fail_msg: "cargo-nextest is unsupported on {{ ansible_facts.architecture }}" |
| 35 | + |
| 36 | + - name: Download cargo-nextest |
| 37 | + ansible.builtin.get_url: |
| 38 | + url: "https://github.com/nextest-rs/nextest/releases/download/cargo-nextest-{{ nextest_version }}/cargo-nextest-{{ nextest_version }}-{{ nextest_release.triple }}.tar.gz" |
| 39 | + dest: /tmp/cargo-nextest.tar.gz |
| 40 | + checksum: "sha256:{{ nextest_release.sha256 }}" |
| 41 | + mode: "0600" |
| 42 | + |
| 43 | + - name: Install cargo-nextest |
| 44 | + ansible.builtin.unarchive: |
| 45 | + src: /tmp/cargo-nextest.tar.gz |
| 46 | + dest: /usr/local/bin |
| 47 | + remote_src: true |
| 48 | + creates: /usr/local/bin/cargo-nextest |
| 49 | + |
| 50 | + - name: Verify cargo-nextest |
| 51 | + ansible.builtin.command: cargo-nextest --version |
| 52 | + changed_when: false |
0 commit comments