forked from vial-kb/vial-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (97 loc) · 3.32 KB
/
main.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
name: CI
on: [push, pull_request]
jobs:
build-linux:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6.x'
- name: Install dependencies
run: |
sudo apt-get install libusb-1.0-0-dev libudev-dev ruby ruby-dev rubygems build-essential desktop-file-utils
wget https://github.com/AppImage/pkg2appimage/archive/38603d92359a48189c35debad9005e8e902e6070.zip
unzip *.zip
sudo gem install --no-document fpm
- name: Setup venv
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Build
run: |
source venv/bin/activate
fbs freeze
find -name libgdk-3.so.0 | xargs rm
fbs installer
deactivate
./pkg2appimage-*/pkg2appimage misc/Vial.yml
mv out/Vial-*.AppImage out/Vial-x86_64.AppImage
- uses: actions/upload-artifact@v1
with:
name: vial-linux
path: out/Vial-x86_64.AppImage
build-mac:
runs-on: macos-10.15
env:
PYTHON_VERSION: 3.6.8
MACOSX_DEPLOYMENT_TARGET: 10.9
steps:
- uses: actions/checkout@v2
- name: Get Python
run: curl https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macosx${MACOSX_DEPLOYMENT_TARGET}.pkg -o "python.pkg"
- name: Verify download
run: shasum -a 256 -c <<< '4bcd53faffc98d193ef7cdccd5668de3829c702af4db45258819a84a2cab60d0 *python.pkg'
- name: Install Python
run: |
sudo installer -pkg python.pkg -target /
- name: Setup venv
run: |
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Build
run: |
source venv/bin/activate
fbs freeze
hdiutil create -volname Vial -srcfolder "target/Vial.app" -ov -format UDZO vial-mac.dmg
- uses: actions/upload-artifact@v1
with:
name: vial-mac
path: vial-mac.dmg
build-win:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6.x'
- name: Setup venv
run: |
python -m venv venv
. .\venv\Scripts\activate.ps1
pip install -r requirements.txt
- name: Install NSIS
run: |
Invoke-WebRequest "https://github.com/vial-kb/vial-deps/releases/download/v1/nsis-3.06.1-setup.exe" -UserAgent "wget" -OutFile nsis-3.06.1-setup.exe
if ((Get-FileHash nsis-3.06.1-setup.exe -Algorithm sha256).Hash -ne "f60488a676308079bfdf6845dc7114cfd4bbff47b66be4db827b89bb8d7fdc52") { Write-Error 'SHA256 mismatch' }
Start-Process -FilePath "nsis-3.06.1-setup.exe" -ArgumentList "/S", "/D=C:\Program Files (x86)\NSIS" -NoNewWindow -Wait
- name: Build
run: |
. .\venv\Scripts\activate.ps1
fbs freeze
Compress-Archive -Path "target\Vial" -DestinationPath vial-win.zip
- uses: actions/upload-artifact@v1
with:
name: vial-win
path: vial-win.zip
- name: Create installer
run: |
$env:Path += ";C:\Program Files (x86)\NSIS"
. .\venv\Scripts\activate.ps1
fbs installer
- uses: actions/upload-artifact@v1
with:
name: vial-win-installer
path: target\VialSetup.exe