From 9526838a35d484f97496cb0639167998b087ceca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=93=E6=98=A5=E9=A3=8E?= <77157236+night-cruise@users.noreply.github.com> Date: Sat, 18 Nov 2023 14:03:39 +0800 Subject: [PATCH] feat: add rust workflow (#952) --- .github/workflows/rust.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 00000000..fada2865 --- /dev/null +++ b/.github/workflows/rust.yml @@ -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