-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.14 KB
/
build.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
name: build it
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-unknown-linux-gnu, x86_64-pc-windows-gnu]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
- name: Install dependencies
run: sudo apt-get install -y mingw-w64
- name: Build project
run: cargo build --release --target ${{ matrix.target }}
- name: Upload Linux build artifact
if: matrix.target == 'x86_64-unknown-linux-gnu'
uses: actions/upload-artifact@v3
with:
name: linux-build
path: target/x86_64-unknown-linux-gnu/release/ewar-bot
- name: Upload Windows build artifact
if: matrix.target == 'x86_64-pc-windows-gnu'
uses: actions/upload-artifact@v3
with:
name: windows-build
path: target/x86_64-pc-windows-gnu/release/ewar-bot.exe