mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-24 11:06:29 +08:00
feat: add rust workflow (#952)
This commit is contained in:
parent
b8591822d8
commit
9526838a35
1 changed files with 27 additions and 0 deletions
27
.github/workflows/rust.yml
vendored
Normal file
27
.github/workflows/rust.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths: ["codes/rust/**/*.rs", "codes/rust/Cargo.toml"]
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
paths: ["codes/rust/**/*.rs", "codes/rust/Cargo.toml"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: brndnmtthws/rust-action-rustup@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
run: cargo build --manifest-path=codes/rust/Cargo.toml && cargo build --manifest-path=codes/rust/Cargo.toml --release
|
Loading…
Reference in a new issue