-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (82 loc) · 3.21 KB
/
pyth-build.yml
File metadata and controls
96 lines (82 loc) · 3.21 KB
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
name: Build Python Application with PyInstaller
on:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
#os: [ubuntu-latest, macos-latest, windows-latest]
#os: [ubuntu-22.04, macos-latest, macos-15, windows-latest]
#os: [ubuntu-22.04, ubuntu-24.04, macos-13, windows-latest]
#os: [macos-13, windows-latest]
#os: [ubuntu-22.04, ubuntu-24.04, windows-latest]
os: [ubuntu-24.04, windows-latest]
#os: [windows-latest]
runs-on: ${{ matrix.os }}
env:
SCRIPT_NAME: "rclone_config"
SCRIPT_NAME2: "rclone_config_dpo"
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install packages
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends --no-install-suggests -y libgtk-3-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller pyside6 boto3 pycryptodome requests requests_unixsocket
#pip install -r requirements.txt
- name: Build executable for Windows
if: runner.os == 'Windows'
run: |
mv ./${SCRIPT_NAME}.py ./${SCRIPT_NAME}.pyw
mv ./${SCRIPT_NAME2}.py ./${SCRIPT_NAME2}.pyw
pyinstaller --noconsole --onefile --add-data "./images/spinner.gif:./images" ./${SCRIPT_NAME}.pyw
pyinstaller --noconsole --onefile --add-data "./images/spinner.gif:./images" ./${SCRIPT_NAME2}.pyw
shell: bash
- name: Build executable for Linux
if: runner.os == 'Linux'
run: |
pyinstaller --noconsole --onefile --add-data "./images/spinner.gif:./images" ./${SCRIPT_NAME}.py
pyinstaller --noconsole --onefile --add-data "./images/spinner.gif:./images" ./${SCRIPT_NAME2}.py
shell: bash
- name: Build executable for MacOS
if: runner.os == 'macOS'
run: |
# --target-architecture x86_64, arm64, universal2
pyinstaller --noconsole --onefile --add-data "./images/spinner.gif:./images" ./${SCRIPT_NAME}.py
pyinstaller --noconsole --onefile --add-data "./images/spinner.gif:./images" ./${SCRIPT_NAME2}.py
shell: bash
- name: run tests
run: |
echo "${{ runner.os }}"
export RUNNER="${{ runner.os }}"
#pip install pytest
#./run_tests.sh
./run_tests_dist.sh
shell: bash
- name: Build artifact for Windows
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v6
with:
name: windows-build-${{ github.ref_name }}
path: ./dist
- name: Build artifact for Linux (${{ matrix.os }})
if: runner.os == 'Linux'
uses: actions/upload-artifact@v6
with:
name: linux-${{ matrix.os }}-build-${{ github.ref_name }}
path: ./dist
- name: Build artifact for MacOS (${{ matrix.os }})
if: runner.os == 'macOS'
uses: actions/upload-artifact@v6
with:
name: macos-${{ matrix.os }}-build-${{ github.ref_name }}
path: ./dist