-
Notifications
You must be signed in to change notification settings - Fork 5
140 lines (136 loc) · 3.72 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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Build
on:
workflow_dispatch:
inputs:
platform:
description: "Target platform"
required: true
default: "linux"
type: choice
options:
- linux
- windows
- macos
jobs:
build_linux:
name: Build linux
runs-on: ubuntu-latest
if: ${{ inputs.platform == 'linux' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev librsvg2-dev
- name: Install
working-directory: app
run: npm i
- name: Build app
working-directory: app/src-tauri
run: |
npm run build
cargo build --release --locked
- name: Build runner
working-directory: runner
run: cargo build --locked
- name: Prepare artifacts
run: |
mkdir lib
mv app/src-tauri/target/release/libvpnym.so lib/
mv runner/target/debug/vpnym_d .
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: vpnym_linux
path: |
lib/
vpnym_d
build_windows:
name: Build windows
runs-on: windows-latest
if: ${{ inputs.platform == 'windows' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install
working-directory: app
run: npm i
- name: Build app
working-directory: app/src-tauri
run: |
npm run build
cargo build --release --locked
- name: Build runner
working-directory: runner
run: cargo build --locked
- name: Prepare artifacts
run: |
ls
ls app/src-tauri
ls app/src-tauri/target
ls app/src-tauri/target/release
mkdir lib
ls
mv app/src-tauri/target/release/vpnym.dll lib/
mv app/src-tauri/target/release/WebView2Loader.dll lib/
mv runner/target/debug/vpnym_d.exe .
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: vpnym_windows
path: |
lib/
vpnym_d.exe
build_darwin:
name: Build macos
runs-on: macos-latest
if: ${{ inputs.platform == 'macos' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install
working-directory: app
run: npm i
- name: Build app
working-directory: app/src-tauri
run: |
npm run build
cargo build --release --locked
- name: Build runner
working-directory: runner
run: cargo build --locked
- name: Prepare artifacts
run: |
mkdir lib
mv app/src-tauri/target/release/libvpnym.dylib lib/
mv runner/target/debug/vpnym_d .
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: vpnym_darwin
path: |
lib/
vpnym_d