048aff6c98
Add a role to install Rust via the rustup tool. It defaults to installing globally, which avoids having to worry too much about setting paths for follow-on jobs. Packaged Rust and the upstream rustup install tool can live together, and there's various documentation about it. Thus I've made this such that we can expand it with packaged Rust support if there is a need, but I have not implemented that yet. Change-Id: I32f9b285904a7036f9a80ada8a49fa9cf31b5163
22 lines
355 B
YAML
22 lines
355 B
YAML
- hosts: all
|
|
tasks:
|
|
|
|
- include_role:
|
|
name: ensure-rust
|
|
|
|
- name: Test cargo run
|
|
shell: |
|
|
cargo new foo
|
|
|
|
- name: Copy hello world
|
|
copy:
|
|
src: hello.rs
|
|
dest: hello.rs
|
|
mode: 0644
|
|
|
|
- name: Compile hello world
|
|
command: rustc hello.rs
|
|
|
|
- name: Run hello world
|
|
command: ./hello
|