-
Notifications
You must be signed in to change notification settings - Fork 4
95 lines (79 loc) · 2.63 KB
/
build-binary-nuitka.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
87
88
89
90
91
92
93
94
95
name: build-binary-nuitka
on:
push:
branches:
- develop
- 'feature/**'
jobs:
build-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- name: checkout
uses: actions/checkout@v3
- name: install python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: replace version
run: |
from pathlib import Path
version = [l for l in Path('pyproject.toml').read_text().splitlines() if 'version' in l][0].split(' ')[-1].strip('\"')
f = Path('src/ntfsdump/models/MetaData.py')
text = f.read_text().replace("get_version(name)", f"\'{version}\'")
f.write_text(text)
shell: python
- name: Install dependencies
run: |
pip install poetry
poetry config virtualenvs.in-project true
poetry install
- name: run python
run: |
poetry run ntfsdump -h
- name: build
run: |
pip install nuitka
nuitka --standalone --onefile --follow-imports -o ntfsdump.exe --output-dir=dist --assume-yes-for-downloads src/ntfsdump/views/NtfsDumpView.py
- name: verify
run: dist/ntfsdump.exe -h
# - name: upload
# uses: softprops/action-gh-release@v1
# with:
# files: dist/ntfsdump.exe
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- name: checkout
uses: actions/checkout@v3
- name: install python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: replace version
run: |
from pathlib import Path
version = [l for l in Path('pyproject.toml').read_text().splitlines() if 'version' in l][0].split(' ')[-1].strip('\"')
f = Path('src/ntfsdump/models/MetaData.py')
text = f.read_text().replace("get_version(name)", f"\'{version}\'")
f.write_text(text)
shell: python
- name: Install dependencies
run: |
sudo apt install patchelf
pip install poetry
poetry install
- name: run python
run: |
poetry run ntfsdump -h
- name: build
run: |
pip install nuitka
nuitka --standalone --onefile --follow-imports -o ntfsdump --output-dir=dist --assume-yes-for-downloads src/ntfsdump/views/NtfsDumpView.py
- name: verify
run: dist/ntfsdump -h