-
Notifications
You must be signed in to change notification settings - Fork 32
114 lines (105 loc) · 3.59 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
105
106
107
108
109
110
111
112
113
114
name: Build-(Core & Tauri)
on:
push:
branches: [ "master" ]
pull_request:
# cancel ongoing jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build_core:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
- os: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-directories: "${{ github.workspace }}/core_lib/target"
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
if: contains(matrix.os, 'macos') == false
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev
- run: |
cd ./core_lib
cargo test
cargo build
build_tauri:
runs-on: ${{ matrix.os }}
needs: build_core
strategy:
matrix:
include:
- os: ubuntu-20.04
name: legacy
target_path: app/legacy
dependencies: |
sudo apt-get install -y libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev
cache_directory: app/legacy/src-tauri/target
- os: ubuntu-24.04
name: main
target_path: app/main
dependencies: |
sudo apt-get install -y libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev
cache_directory: app/main/src-tauri/target
- os: macos-latest
name: main
target_path: app/main
cache_directory: app/main/src-tauri/target
- os: macos-13
name: main
target_path: app/main
cache_directory: app/main/src-tauri/target
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-directories: "${{ github.workspace }}/${{ matrix.cache_directory }}"
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Linux dependencies for U
if: contains(matrix.os, 'macos') == false
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Install Linux dependencies
if: contains(matrix.os, 'macos') == false
run: ${{ matrix.dependencies }}
- name: GLIBC version
if: contains(matrix.os, 'macos') == false
run: |
GLIBC_VER=$(ldd --version | head -n1 | awk '{print $NF}')
echo "GLIBC version: ${GLIBC_VER}"
- name: Build Vite + Tauri
run: |
rm -rf ${{ github.workspace }}/${{ matrix.target_path }}/src-tauri/target/debug/bundle/
cd ./${{ matrix.target_path }}
pnpm install
pnpm build:debug
cd ${{ github.workspace }}
./rename_build.sh ${{ github.workspace }}/${{ matrix.target_path }}/src-tauri/target/debug/bundle/ ${{ matrix.name }}
- name: Upload result
uses: actions/upload-artifact@v4
with:
name: artifact-debug-rquickshare-${{ matrix.os }}
path: |
${{ github.workspace }}/${{ matrix.target_path }}/src-tauri/target/debug/bundle/*/r-quick-share-${{ matrix.name }}*