-
Notifications
You must be signed in to change notification settings - Fork 25
86 lines (78 loc) · 2.23 KB
/
main.yaml
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
name: CI Actions for SPMT
on: [push, pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Initialize Python
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install Dependencies
run: |
pip install wheel==0.38.4
pip install -r requirements.txt
pip install importlib-metadata==4.13.0
pip install flake8==3.8.4
pip install mypy==0.781
pip install vulture==2.3
- name: Lint
run: |
lint/lint-python.sh
lint/lint-python-mutable-default-parameters.sh
lint/lint-python-utf8-encoding.sh
build:
name: Build-${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
needs: lint
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
config:
- name: Linux
os: ubuntu-20.04
cachepath: ~/.cache/pip
packages: libusb-1.0-0-dev libudev-dev
- name: macOS
os: macos-11
cachepath: ~/Library/Caches/pip
- name: Windows
os: windows-2019
cachepath: ~\AppData\Local\pip\Cache
steps:
- name: Get Source
uses: actions/checkout@v4
- name: Setup Python 3.7
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Setup pip cache
uses: actions/cache@v4
with:
path: ${{ matrix.config.cachepath }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
if [[ ${{ matrix.config.os }} = ubuntu* ]]; then
sudo apt-get update
sudo apt-get install --no-install-recommends --no-upgrade -qq ${{ matrix.config.packages }}
fi
pip install wheel==0.38.4
pip install -r requirements.txt
pip install pyinstaller
- name: Build
run: |
pyinstaller SecurePivxMasternodeTool.spec