-
-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (54 loc) · 1.42 KB
/
rust.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
51
52
53
54
55
56
57
58
59
on:
push:
tags: releases/*
branches:
- master
- develop
pull_request:
branches:
- master
- develop
name: Continuous integration
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
name: Check
steps:
- uses: actions/checkout@v3
# - name: Check Clippy
# run: cargo clippy -- -D warnings
# - name: Check Format
# run: cargo fmt --all -- --check
- name: Run tests
run: cargo test --all --verbose
build:
needs: check
name: Build
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: tablam
asset_name: tablam-linux-amd64
- os: windows-latest
artifact_name: tablam.exe
asset_name: tablam-windows-amd64.exe
- os: macos-latest
artifact_name: tablam
asset_name: tablam-macos-amd64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --release --all --verbose
- name: Upload binaries to release
if: startsWith( github.ref, 'refs/tags/releases/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
overwrite: true