-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.03 KB
/
build.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
43
44
45
46
47
48
49
50
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Print versions
run: |
git version
cargo version
- name: Rust dependency cache
uses: Swatinem/rust-cache@v1
- name: Build
run: cargo build
- name: Run tests
run: cargo test
# You'd hope there would be a better way.
- name: Archive executable (Windows)
uses: actions/upload-artifact@v2
if: matrix.os == 'windows-latest'
with:
name: executable ${{ matrix.os }}
path: target/debug/autosquash.exe
- name: Archive executable (Other)
uses: actions/upload-artifact@v2
if: matrix.os != 'windows-latest'
with:
name: executable ${{ matrix.os }}
path: target/debug/autosquash