Find a file
dependabot-preview[bot] 576f3647e2
[Security] Bump tar from 6.1.0 to 6.1.3
Bumps [tar](https://github.com/npm/node-tar) from 6.1.0 to 6.1.3. **This update includes security fixes.**
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.1.0...v6.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-08-03 19:26:32 +00:00
.github/workflows Add formatting and linting tools 2020-03-25 08:40:28 +03:00
.matchers Use @actions-rs/core for cargo/cross execution. 2019-09-25 10:08:33 +03:00
__tests__ Add formatting and linting tools 2020-03-25 08:40:28 +03:00
dist Fix new lints 2020-06-06 12:16:01 +03:00
src Fix new lints 2020-06-06 12:16:01 +03:00
.editorconfig Initial commit 2019-09-12 23:48:44 +03:00
.eslintrc.json Add formatting and linting tools 2020-03-25 08:40:28 +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 Release v1.0.3 2019-11-24 13:49:50 +03:00
jest.config.json Add formatting and linting tools 2020-03-25 08:40:28 +03:00
LICENSE Initial commit 2019-09-12 23:48:44 +03:00
package-lock.json [Security] Bump tar from 6.1.0 to 6.1.3 2021-08-03 19:26:32 +00:00
package.json Bump eslint from 7.27.0 to 7.29.0 2021-07-01 08:18:35 +00:00
README.md Describe why this Action should be used instead of run step (closes #72) 2020-05-08 15:10:44 +03:00
tsconfig.eslint.json Add formatting and linting tools 2020-03-25 08:40:28 +03:00
tsconfig.json Add formatting and linting tools 2020-03-25 08:40:28 +03:00

Rust cargo Action

Sponsoring MIT licensed Gitter Continuous integration Dependabot enabled

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

Table of Contents

Example workflow

on: [push]

name: CI

jobs:
  build_and_test:
    name: Rust project
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
      - uses: actions-rs/cargo@v1
        with:
          command: build
          args: --release --all-features

See additional recipes here.

Use cases

Note that this Action is not required usually and you can just use run step instead as in example below:

jobs:
  build_and_test:
    name: Rust project
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
      - run: cargo build --release --all-features

Why would you want to use this Action instead:

  1. Transparent cross installation and execution with use-cross: true input enabled
  2. Warnings and errors issued by cargo will be displayed in GitHub UI

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

Toolchain

By default this Action will call whatever cargo binary is available in the current virtual environment.

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

Cross-compilation

In order to make cross-compile 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 with use-cross: true input enabled 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@v2
      - 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

License

This Action is distributed under the terms of the MIT license, see LICENSE for details.

Contribute and support

Any contributions are welcomed!

If you want to report a bug or have a feature request, check the Contributing guide.

You can also support author by funding the ongoing project work, see Sponsoring.