mirror of
https://github.com/actions-rs/cargo.git
synced 2024-11-13 04:56:32 +02:00
Mirror of https://github.com/actions-rs/cargo
57e1c3d389
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 24.2.0 to 24.3.0. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v24.2.0...v24.3.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> |
||
---|---|---|
.github | ||
.matchers | ||
__tests__ | ||
dist | ||
src | ||
.editorconfig | ||
.gitignore | ||
.npmrc | ||
action.yml | ||
CHANGELOG.md | ||
jest.config.js | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json |
Rust cargo
Action
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
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