-
Notifications
You must be signed in to change notification settings - Fork 30
104 lines (87 loc) · 2.55 KB
/
build.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Build
on:
workflow_dispatch:
push:
branches:
- "*"
- "*/*"
- "**"
pull_request:
branches:
- "*"
- "*/*"
- "**"
env:
PLUGIN_VERSION: 1.6.1-omp
jobs:
build-windows-release:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
clean: true
submodules: recursive
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: "3.23.2"
- name: Install latest conan
run: |
python -m pip install --upgrade pip
pip install -v "conan==1.57.0"
- name: Generate build files
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release .. -G "Visual Studio 16 2019" -A Win32
cmake --build . --config Release
- name: Upload artifacts (part 1)
uses: actions/upload-artifact@v3
with:
name: pawnraknet-${{ env.PLUGIN_VERSION }}-win32
path: build/Release/pawnraknet.dll
- name: Upload artifacts (part 2)
uses: actions/upload-artifact@v3
with:
name: pawnraknet-${{ env.PLUGIN_VERSION }}-win32
path: src/Pawn.RakNet.inc
build-linux-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
clean: true
submodules: recursive
fetch-depth: 0
- name: Install packages
run: sudo apt-get install g++-multilib
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: "3.23.2"
- name: Install latest conan
run: |
python -m pip install --upgrade pip
pip install -v "conan==1.57.0"
- name: Generate build files
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32
- name: Build
run: |
cd build
cmake --build . --config Release
- name: Create artifact
run: tar -czf pawnraknet-$PLUGIN_VERSION-linux.tar.gz -C build pawnraknet.so -C ../src Pawn.RakNet.inc
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: pawnraknet-${{ env.PLUGIN_VERSION }}-linux
path: pawnraknet-${{ env.PLUGIN_VERSION }}-linux.tar.gz