Skip to content

Update README.md

Update README.md #64

Workflow file for this run

name: "Test"
on:
pull_request:
workflow_dispatch:
workflow_call:
push:
branches: [main]
jobs:
test-stable:
name: "Test stable toolchain"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Enable Rust cache
uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # 2.2.1
with:
cache-on-failure: true
workspaces: "./test/hello_world -> target"
- name: Test simple
uses: ./
with:
command: build
directory: test/hello_world
- name: Test args
uses: ./
with:
command: build
args: --release
directory: test/hello_world
- name: Make sure the following build folders exist
shell: bash
run: |
[[ -d "test/hello_world/target/debug" ]] || (echo "debug is missing" && exit 1);
[[ -d "test/hello_world/target/release" ]] || (echo "release is missing" && exit 1);
test-nightly:
name: "Test nightly toolchain"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- name: Enable Rust cache
uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # 2.2.1
with:
cache-on-failure: true
workspaces: "./test/hello_world -> target"
- name: Test simple
uses: ./
with:
toolchain: nightly
command: build
directory: test/hello_world
- name: Test args
uses: ./
with:
toolchain: nightly
command: build
args: --release
directory: test/hello_world
- name: Make sure the following build folders exist
shell: bash
run: |
[[ -d "test/hello_world/target/debug" ]] || (echo "debug is missing" && exit 1);
[[ -d "test/hello_world/target/release" ]] || (echo "release is missing" && exit 1);
test-cross:
name: "Test using cross"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: aarch64-unknown-linux-gnu
- name: Enable Rust cache
uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # 2.2.1
with:
cache-on-failure: true
workspaces: "./test/hello_world -> target"
- name: Test args
uses: ./
with:
command: build
args: --target aarch64-unknown-linux-gnu
use-cross: true
cross-version: 0.2.4
directory: test/hello_world
- name: Test persisting install
uses: ./
with:
command: build
args: --release --target aarch64-unknown-linux-gnu
use-cross: true
cross-version: 0.2.4
directory: test/hello_world
- name: Make sure the following build folders exist
shell: bash
run: |
[[ -d "test/hello_world/target/aarch64-unknown-linux-gnu/debug" ]] || (echo "debug is missing" && exit 1);
[[ -d "test/hello_world/target/aarch64-unknown-linux-gnu/release" ]] || (echo "release is missing" && exit 1);
- name: Test unspecified verison
uses: ./
with:
command: build
args: --target aarch64-unknown-linux-gnu
use-cross: true
directory: test/hello_world
test-git-cross:
name: "Test using git versions of cross"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: aarch64-unknown-linux-gnu
- name: Enable Rust cache
uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # 2.2.1
with:
cache-on-failure: true
workspaces: "./test/hello_world -> target"
- name: Test main branch
uses: ./
with:
command: build
args: --target aarch64-unknown-linux-gnu
use-cross: true
cross-version: main
directory: test/hello_world
- name: Uninstall cargo cross
shell: bash
run: |
cargo uninstall cross || true
- name: Test git hash
uses: ./
with:
command: build
args: --target aarch64-unknown-linux-gnu
use-cross: true
cross-version: "git:d6511b7b166c18640f81b8f6a74d9eef380f7ded"
directory: test/hello_world