forked from tdulcet/AutoPrimeNet
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (90 loc) · 3.47 KB
/
cd.yml
File metadata and controls
96 lines (90 loc) · 3.47 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: CD
on:
push:
branches:
- main
paths:
- '.github/workflows/**'
- 'wrapper.py'
- 'autoprimenet.py'
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
env:
PIP_BREAK_SYSTEM_PACKAGES: 1
jobs:
PyInstaller:
name: Windows PyInstaller
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
python-version: ["3.4", "3.8", "3.13", "3.x"]
architecture: ["x86", "x64"]
include:
- os: windows-11-arm
python-version: "3.x"
architecture: "arm64"
fail-fast: false
steps:
- uses: actions/checkout@v6
- name: Set up Python
if: ${{ matrix.python-version == '3.x' || matrix.python-version == '3.4' }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Before Install
if: ${{ matrix.python-version != '3.x' && matrix.python-version != '3.4' }}
run: |
Join-Path $env:USERPROFILE ".local\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install uv and Python
if: ${{ matrix.python-version != '3.x' && matrix.python-version != '3.4' }}
run: |
python -m pip install --upgrade pip
python -m pip install uv
python --version
uv python install cpython-${{ matrix.python-version }}-windows-${{ matrix.architecture == 'x64' && 'x86_64' || matrix.architecture == 'arm64' && 'aarch64' || matrix.architecture }}-none --default
python --version
- name: Install dependencies
if: ${{ matrix.python-version != '3.4' }}
run: |
python -m pip install --upgrade pip
python -m pip install "requests[socks]" pyinstaller
- name: Install dependencies
if: ${{ matrix.python-version == '3.4' }}
run: |
python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --upgrade pip==19.3
python -m pip install --ignore-requires-python certifi==2021.10.8 urllib3==1.26.16 idna==3.1 "requests[socks,use_chardet_on_py3]==2.26.0" pefile==2019.4.18 pywin32-ctypes==0.2.0 pyinstaller==3.5
- name: Script
run: |
python -X dev autoprimenet.py --help
python -X dev autoprimenet.py --debug-info
curl -sSfO https://www.mersenne.org/favicon.ico
python -OO -m PyInstaller -F -n autoprimenet -i favicon.ico wrapper.py
.\dist\autoprimenet --help
.\dist\autoprimenet --debug-info
- uses: actions/upload-artifact@v7
with:
name: AutoPrimeNet_Windows${{ matrix.python-version == '3.4' && '-XP' || matrix.python-version == '3.8' && '-Vista-7-8' || matrix.python-version == '3.13' && '-8.1' || '' }}_${{ matrix.architecture }}
path: |
README.md
LICENSE
dist/*
deploy:
name: Windows Deploy
needs: PyInstaller
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v8
- name: Install
run: |
sudo apt-get update -y
sudo apt-get install -y lftp
- name: Script
run: |
set -x
ls -alR AutoPrimeNet_Windows*
for DIR in AutoPrimeNet_Windows*/; do (cd "$DIR"; zip -j "../${DIR%/}.zip" -- README.md LICENSE dist/*); done
ls -alR AutoPrimeNet_Windows*
lftp -u "${{ secrets.FTP_USERNAME }},${{ secrets.FTP_PASSWORD }}" -e "set ssl:verify-certificate false; mput AutoPrimeNet_Windows*.zip; exit" download.mersenne.ca