Find a file
dependabot-preview[bot] 380e817a2d Bump @types/node from 12.7.11 to 12.11.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.7.11 to 12.11.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-16 14:22:04 +00:00
.github Use @actions-rs/core for cargo/cross execution. 2019-09-25 10:08:33 +03:00
.matchers Use @actions-rs/core for cargo/cross execution. 2019-09-25 10:08:33 +03:00
__tests__ Use @actions-rs/core for cargo/cross execution. 2019-09-25 10:08:33 +03:00
dist Use @actions-rs/core for cargo/cross execution. 2019-09-25 10:08:33 +03:00
src Use @actions-rs/core for cargo/cross execution. 2019-09-25 10:08:33 +03:00
.editorconfig Initial commit 2019-09-12 23:48:44 +03:00
.gitignore Initial commit 2019-09-12 23:48:44 +03:00
.npmrc Use @actions-rs/core for cargo/cross execution. 2019-09-25 10:08:33 +03:00
action.yml Release v1.0.0 2019-09-15 11:47:03 +03:00
CHANGELOG.md Use @actions-rs/core for cargo/cross execution. 2019-09-25 10:08:33 +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 Bump @types/node from 12.7.11 to 12.11.1 2019-10-16 14:22:04 +00:00
package.json Bump @types/node from 12.7.11 to 12.11.1 2019-10-16 14:22:04 +00:00
README.md Update README.md 2019-09-29 00:38:21 +03:00
tsconfig.json Use @actions-rs/core for cargo/cross execution. 2019-09-25 10:08:33 +03:00

Rust cargo Action

MIT licensed 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
          args: --release --all-features

See additional recipes here.

Inputs

Name Required Description Type Default
command Cargo command to run, ex. check or build string
toolchain Rust toolchain name to use string
args Arguments for the cargo command string
use-cross Use cross instead of cargo bool false

Virtual environments

Note that cargo is not available by default for some virtual environments; for example, as for 2019-09-15, macOS env is missing it.

You can use actions-rs/toolchain to install the Rust toolchain with cargo included.

Cross

In order to make cross-compilation an easy process, this Action can install cross tool on demand if use-cross input is enabled; cross executable will be invoked then instead of cargo automatically.

All consequent calls of this Action in the same job will use the same cross installed.

on: [push]

name: ARMv7 build

jobs:
  linux_arm7:
    name: Linux ARMv7
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          target: armv7-unknown-linux-gnueabihf
          override: true
      - uses: actions-rs/cargo@v1
        with:
          use-cross: true
          command: build
          args: --target armv7-unknown-linux-gnueabihf