Skip to content

Commit

Permalink
feat: build settings
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeshi committed Nov 12, 2023
1 parent 6a05421 commit 365b313
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 43 additions & 1 deletion .github/workflows/build-binary-nuitka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- develop
- 'feature/**'

jobs:
build-windows:
Expand Down Expand Up @@ -42,7 +43,7 @@ jobs:
- name: build
run: |
pip install nuitka
nuitka --standalone --onefile --follow-imports --assume-yes-for-downloads
nuitka --standalone --onefile --follow-imports -o ntfsdump.exe --output-dir=dist --assume-yes-for-downloads src/views/NtfsDumpView.py
- name: verify
run: dist/ntfsdump.exe -h
Expand All @@ -51,3 +52,44 @@ jobs:
# 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: |
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/views/NtfsDumpView.py
- name: verify
run: dist/ntfsdump -h
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,7 @@ dmypy.json
**/*.tgs
**/*.E01

NtfsDumpView.*/

/tests/ntfsdump/cache/*
!/tests/ntfsdump/cache/.gitkeep

0 comments on commit 365b313

Please sign in to comment.