-
Notifications
You must be signed in to change notification settings - Fork 4
69 lines (58 loc) · 1.78 KB
/
server-publish.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
61
62
63
64
65
66
67
68
69
name: Uploading release artifacts
on:
pull_request:
branches: [ "master" ]
jobs:
build:
if: '! github.event.pull_request.draft'
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: .
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
steps:
- name: Checkout
uses: actions/checkout@v3
- if: matrix.os == 'ubuntu-latest'
name: Build server on ubuntu
working-directory: ./src/rpcserver
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev protobuf-c-compiler
make -C ../protos/ c_protos
mkdir build
cd build
cmake .. -DTARGET=LINUX
make
- if: matrix.os == 'ubuntu-latest'
name: Upload ubuntu server artifact
uses: actions/upload-artifact@v3
with:
name: rpcserver_linux
path: ./src/rpcserver/build/rpcserver_linux
- if: matrix.os == 'macos-latest'
name: Build server on macos
working-directory: ./src/rpcserver
run: |
brew install protobuf protobuf-c
make -C ../protos/ c_protos
mkdir build
cd build
cmake .. -DTARGET=IOS
make
cmake .. -DTARGET=OSX
make
- if: matrix.os == 'macos-latest'
name: Upload iphoneos server artifact
uses: actions/upload-artifact@v3
with:
name: rpcserver_ios
path: ./src/rpcserver/build/rpcserver_ios
- if: matrix.os == 'macos-latest'
name: Upload macos server artifact
uses: actions/upload-artifact@v3
with:
name: rpcserver_macosx
path: ./src/rpcserver/build/rpcserver_macosx