-
Notifications
You must be signed in to change notification settings - Fork 2
109 lines (95 loc) · 3.34 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
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@v3
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@v3 # [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 }}
# 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@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # pin v3.3.1
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
# 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 Parsec
run: python freeze_program.py ../../client
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-*