Skip to content

Commit 11daec4

Browse files
authored
CI: Create rust.yml
1 parent 245aee8 commit 11daec4

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/rust.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
BUILD_TARGET: [release] # refers to a cargo profile
20+
outputs:
21+
release_built: ${{ steps.set-output.outputs.release_built }}
22+
steps:
23+
- uses: actions/checkout@v5
24+
- name: Build binaries in "${{ matrix.BUILD_TARGET }}" mode
25+
run: cargo build --profile ${{ matrix.BUILD_TARGET }}
26+
- name: Run tests in "${{ matrix.BUILD_TARGET }}" mode
27+
run: cargo test --profile ${{ matrix.BUILD_TARGET }}
28+
- name: Cache
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
~/.cargo/registry
33+
~/.cargo/git
34+
target
35+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

0 commit comments

Comments
 (0)