-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (57 loc) · 1.33 KB
/
main.yaml
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
60
61
62
name: CI
on:
pull_request:
branches:
- main
- next
- trunk
- release/*
- feature/*
- bugfix/*
- hotfix/*
- chore/*
push:
branches:
- next
- main
- trunk
- release/*
- feature/*
- bugfix/*
- hotfix/*
- chore/*
release:
types:
- released
- prereleased
jobs:
cargo_build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: macos-latest
target: x86_64-apple-darwin
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.target }}
override: true
- name: Run test
run: cargo test
- name: Build application
run: cargo build --release --target ${{ matrix.target }}
- name: Save artifact
uses: actions/upload-artifact@v3
with:
name: neuronek-cli-${{ matrix.target }}
path: |
target/${{ matrix.target }}/release/neuronek-cli
target/${{ matrix.target }}/release/neuronek-cli.exe