-
-
Notifications
You must be signed in to change notification settings - Fork 13
156 lines (131 loc) · 5.19 KB
/
pyinstaller.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Pyinstaller Release
on:
push:
tags:
- 'V*' #
workflow_dispatch:
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
jobs:
createrelease:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.VID_CHECKSUM_PAT }}
persist-credentials: true
- name: Install dev requirements
run: python -m pip install --upgrade -r requirements_dev.txt
- name: Calculate checksums
run: python packaging/checksum_videos.py
- name: Generate Changelog
run: python packaging/generate_changelog.py
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Calculate quick-start video checksums and generate changelog
file_pattern: 'rnalysis/gui/videos/checksums/*.txt rnalysis/data_files/latest_changelog.md'
branch: master
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Stable release ${{ github.ref_name }}
body_path: rnalysis/data_files/latest_changelog.md
draft: false
prerelease: false
- name: Output Release URL File
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- name: Save Release URL File for publish
uses: actions/upload-artifact@v4
with:
name: release_url
path: release_url.txt
build:
name: Build packages
needs: createrelease
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
TARGET: macos-M1
CMD_BUILD: >
pyinstaller RNAlysis.spec &&
cd dist/ &&
zip -r RNAlysis-4.1.0_macos_M1.zip ./RNAlysis* &&
ls -ltr
OUT_FILE_NAME: RNAlysis-4.1.0_macos_M1.zip
ASSET_MIME: application/zip
- os: windows-latest
TARGET: windows
CMD_BUILD: >
pyinstaller RNAlysis.spec &&
cd dist/ &&
7z a RNAlysis-4.1.0_windows.zip -r "RNAlysis-4.1.0/"
OUT_FILE_NAME: RNAlysis-4.1.0_windows.zip
ASSET_MIME: application/zip
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: brew update (macOS)
if: runner.os == 'MacOS'
run: brew update
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2
with:
macos-skip-brew-update: 'true'
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/llvm
key: llvm
- name: Install LLVM and Clang
if: runner.os != 'macOS'
uses: KyleMayes/install-llvm-action@v2
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: command line tools on MacOS
if: runner.os == 'macOS'
run: |
gcc -v -xc++ /dev/null -fsyntax-only
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
cache: 'pip'
- name: Install PyInstaller requirements
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade -r requirements_pyinstaller.txt
- name: Install dependencies
run: python -m pip install .[all]
- name: Build with pyinstaller for ${{ matrix.TARGET }}
run: ${{ matrix.CMD_BUILD }}
- name: Load Release URL File from release job
uses: actions/download-artifact@v4
with:
name: release_url
path: release_url
- name: Get Release File Name & Upload URL
id: get_release_info
run: |
value=$(cat release_url/release_url.txt)
echo "UPLOAD_URL=$value" >> $GITHUB_ENV
shell: bash
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./dist/${{ matrix.OUT_FILE_NAME }}