-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (34 loc) · 1.05 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# This is a condensed version of [release-yml].
#
# [release-yml]: https://github.com/paskausks/rust-bin-github-workflows/blob/894a4f2debade42f8d7b5b95f493eaa33fdeb81b/.github/workflows/release.yml
on: push
name: Build and test
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
rust: [ stable ]
name: ${{ matrix.os }}, Rust ${{ matrix.rust }}
steps:
- uses: actions/checkout@v4
- name: Install Rust (rustup)
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup component add rustfmt
rustc --version
shell: bash
- name: Build (release)
run: cargo build --verbose --release
- uses: actions/upload-artifact@v3
name: Upload binary
if: matrix.os == 'windows-latest'
with:
name: ${{ runner.os }}
path: target/release/git-tree.exe
- name: Check formatting
run: cargo fmt -- --check
- name: Test
run: cargo test