Go to file
svartalf b08fe239f7 Using system Rust to install cross.
As the cross requires recent enough Rust and cwd might be overriden to use old one toolchain, switching cwd temporary to install cross.
2019-09-14 23:55:47 +03:00
__tests__ Smarter args parser and a few debug messages 2019-09-13 22:45:36 +03:00
dist Using system Rust to install cross. 2019-09-14 23:55:47 +03:00
src Using system Rust to install cross. 2019-09-14 23:55:47 +03:00
.editorconfig Initial commit 2019-09-12 23:48:44 +03:00
.gitignore Initial commit 2019-09-12 23:48:44 +03:00
action.yml Initial commit 2019-09-12 23:48:44 +03:00
jest.config.js Initial commit 2019-09-12 23:48:44 +03:00
LICENSE Initial commit 2019-09-12 23:48:44 +03:00
package-lock.json Smarter args parser and a few debug messages 2019-09-13 22:45:36 +03:00
package.json Smarter args parser and a few debug messages 2019-09-13 22:45:36 +03:00
README.md Gitter badge 2019-09-14 20:42:21 +03:00
tsconfig.json Initial commit 2019-09-12 23:48:44 +03:00

Rust cargo Action

Gitter

This GitHub Action runs specified cargo command on a Rust language project.

Example workflow

on: [push]

name: CI

jobs:
  build_and_test:
    name: Rust project
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: actions-rs/cargo@v1
        with:
          command: build
          toolchain: nightly
          arguments: --release --all-features
      - uses: actions-rs/cargo@v1
        with:
          command: test
          toolchain: nightly
          arguments: --all-targets

Inputs

  • command (required) - Cargo command to run (ex. check or build)
  • toolchain - Rust toolchain to use (without the + sign, ex. nightly)
  • args - Arguments for the cargo command
  • use-cross - Use cross instead of cargo (default: false)

Why?

Why is it needed when you can just do the -run: cargo build step?

Because it can call cross instead of cargo if needed. If cross is not installed, it will be installed automatically on a first call.

In a future this Action might be available to install other cargo subcommands on demand too.