-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.58 KB
/
release.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
60
name: Build on Pull Request
on:
# pull_request:
# branches:
# - dev
push:
branches:
- pre_presentation
- feature/*
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
include:
- target: x86_64-unknown-linux-gnu
platform: debian
# - target: aarch64-unknown-linux-gnu
# platform: arm
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
run: rustup target add ${{ matrix.target }}
- name: Install Dependencies
shell: bash
run: |
if [ "${{ runner.os }}" = "Linux" ]; then
sudo apt-get update
sudo apt-get install -y libssl-dev protobuf-compiler
elif [ "${{ runner.os }}" = "macOS" ]; then
brew install protobuf
elif [ "${{ runner.os }}" = "Windows" ]; then
choco install protoc
else
echo "Unsupported OS"
exit 1
fi
- name: Build project
run: cargo build --release --target ${{ matrix.target }}
- name: Package binary
run: |
mkdir -p dist
cp target/${{ matrix.target }}/release/your_project_name dist/
tar -czvf ${{ matrix.platform }}-${{ matrix.target }}-pr-release.tar.gz -C dist .
shell: bash
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.platform }}-${{ matrix.target }}-pr-release
path: ./${{ matrix.platform }}-${{ matrix.target }}-pr-release.tar.gz