-
Notifications
You must be signed in to change notification settings - Fork 13
132 lines (132 loc) · 4.72 KB
/
package.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Package
on: workflow_dispatch
jobs:
Windows:
permissions:
contents: write
runs-on: windows-2022
environment: package
steps:
- name: Checkout
with:
submodules: true
uses: actions/checkout@v4
- name: Init MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '6.5.3'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
- name: Fetch prebuilt
run: ./build.win.ps1 prebuilt fetch
- name: Build lanthing-pc
run: |
$LT_DUMP_URL = "${{ vars.LT_DUMP_URL }}"
./build.win.ps1 build Release
- name: Generate Zip
run: |
echo ${{ github.sha }} > Release.txt
$OP = "${{ github.workspace }}/install/RelWithDebInfo/bin"
$PDB = "${{ github.workspace }}/install/RelWithDebInfo/pdb"
Compress-Archive -Path Release.txt,LICENSE,third-party-licenses.txt,$OP/platforms,$OP/styles,$OP/abseil_dll.dll,$OP/avcodec-59.dll,$OP/avutil-57.dll,$OP/swresample-4.dll,$OP/g3log.dll,$OP/lanthing.exe,$OP/libprotobuf-lite.dll,$OP/Qt6Core.dll,$OP/Qt6Gui.dll,$OP/Qt6Widgets.dll,$OP/rtc.dll,$OP/sqlite3.dll,$OP/openh264-2.4.0-win64.dll,$OP/vcruntime140.dll,$OP/vcruntime140_1.dll,$OP/msvcp140.dll,$OP/msvcp140_1.dll,$OP/msvcp140_2.dll -DestinationPath lanthing.win.${{ github.ref_name }}.zip
Compress-Archive -Path Release.txt,$PDB -DestinationPath debug.pdb.${{ github.ref_name }}.zip
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
lanthing.win.${{ github.ref_name }}.zip
debug.pdb.${{ github.ref_name }}.zip
Linux:
permissions:
contents: write
runs-on: ubuntu-20.04
environment: package
steps:
- name: Checkout
with:
submodules: true
uses: actions/checkout@v4
- name: Install deps
run: |
sudo apt-get clean
sudo apt-get update
sudo apt-get -y install gcc-10 g++-10 pkg-config libglib2.0-dev libx11-dev libdrm-dev libva-dev libva-drm2 libgl-dev libgles-dev libgles1 libgles2 libegl-dev libmfx-dev libvdpau-dev libxcb1-dev libxcb-cursor0 libx11-xcb1
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '6.5.3'
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
- name: Fetch prebuilt
run: bash build.linux.sh prebuilt fetch
- name: Build lanthing-pc
run: |
alias gcc='gcc-10'
alias g++='g++-10'
export CC=`which gcc-10`
export CXX=`which g++-10`
export LT_DUMP_URL="${{ vars.LT_DUMP_URL }}"
bash build.linux.sh build Release
- name: Set version
run: |
VERSION=${{ github.ref_name }}
VERSION=${VERSION/v/beta}
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Set VERSION to $VERSION"
- name: Make AppImage
run: |
bash build.linux.sh package Release
cp lanthing-${{ env.VERSION }}-x86_64.AppImage lanthing.linux-${{ env.VERSION }}-x86_64.AppImage
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: |
lanthing.linux-${{ env.VERSION }}-x86_64.AppImage
macOS:
permissions:
contents: write
runs-on: macos-14
environment: package
steps:
- name: Checkout
with:
submodules: true
uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '6.5.3'
host: 'mac'
target: 'desktop'
arch: 'clang_64'
- name: Install create-dmg
run: brew install create-dmg
- name: Fetch prebuilt
run: bash build.mac.sh prebuilt fetch
- name: Build lanthing-pc
run: |
bash build.mac.sh build Release
- name: Set version
run: |
VERSION=${{ github.ref_name }}
VERSION=${VERSION/v/beta}
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Set VERSION to $VERSION"
- name: Make dmg
run: |
bash build.mac.sh package Release
cp lanthing.dmg lanthing.mac-${{ env.VERSION }}-unsigned-arm64.dmg
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: |
lanthing.mac-${{ env.VERSION }}-unsigned-arm64.dmg