-
Notifications
You must be signed in to change notification settings - Fork 2
132 lines (115 loc) · 4.47 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: CI build
# Trigger the workflow when:
# - A commit on the branches `master` or `releases/*`
# - A PR that modify `packaging/*` or the workflow itself
# - A manual trigger
on:
push:
branches:
- master
- releases/*
pull_request:
paths:
- packaging/*
- .github/workflows/build.yml
workflow_dispatch:
# Global Settings
env:
PYTHON_VERSION: "3.9"
# TODO: cannot update to 1.4 yet, see https://github.com/python-poetry/poetry/issues/7611
POETRY_VERSION: 1.3.2
WINFSP_VERSION: 1.8.20304
FORCE_MATURIN_RELEASE: 1
PYTEST_ARGS: >-
--numprocesses=auto
--verbose
concurrency:
group: ci-build-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
linux:
name: 🐧 Linux
runs-on: ubuntu-20.04
steps:
- name: Install snapcraft
run: sudo snap install snapcraft --classic
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Package snap
run: bash packaging/snap/build.sh
env:
NO_CLEANUP: 1
SNAPCRAFT_ARGS: --destructive-mode
timeout-minutes: 30
- name: Upload installer as artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin v3.1.2
with:
name: ${{ runner.os }}-${{ runner.arch }}-snap
path: |
resana-secure_*.snap
windows:
name: 🏁 Windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4 # [email protected]
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # [email protected]
id: setup-python
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # pin v2.0.0
- name: Build Icon overlays COM objects
run: msbuild -maxCpuCount -property:Configuration=Release .\windows-icon-handler\windows-icon-handler.sln
shell: cmd
working-directory: client
# Using this workaround to cache `poetry` dependencies until
# https://github.com/actions/setup-python/issues/476 is resolved
# Here we restore only since we use the same dependencies has `windows-build`
- name: Restore cache from `windows-build`
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # pin v3.3.2
with:
key: windows-packaging-${{ hashFiles('client/poetry.lock', 'client/submodules/parsec-cloud/**') }}
restore-keys: windows-packaging-
path: |
packaging/windows/build/tools_venv
packaging/windows/build/pyinstaller_venv
packaging/windows/build-conformity/tools_venv
packaging/windows/build-conformity/pyinstaller_venv
# Building OpenSSL requires a perl interpreter.
# The default one does not provide windows-style filesystem
# paths so we have to switch to Strawberry.
- name: Use strawberry perl
shell: bash
run: echo OPENSSL_SRC_PERL=C:/Strawberry/perl/bin/perl >> $GITHUB_ENV
timeout-minutes: 1
- name: Freeze Resana
run: python freeze_program.py ../../client
working-directory: packaging/windows/
- name: Freeze Resana with conformity
run: python freeze_program.py ../../client --conformity
working-directory: packaging/windows/
- name: Upload installer as artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin v3.1.2
with:
name: ${{ runner.os }}-${{ runner.arch }}-installer-content
path: |
packaging/windows/build/manifest.ini
packaging/windows/build/install_files.nsh
packaging/windows/build/uninstall_files.nsh
packaging/windows/build/resana_secure-*/
packaging/windows/build/winfsp-*
- name: Upload installer with conformity as artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin v3.1.2
with:
name: ${{ runner.os }}-${{ runner.arch }}-installer-content-conformity
path: |
packaging/windows/build-conformity/manifest.ini
packaging/windows/build-conformity/install_files.nsh
packaging/windows/build-conformity/uninstall_files.nsh
packaging/windows/build-conformity/resana_secure-*/
packaging/windows/build-conformity/winfsp-*