break up native binary and zipapp build

main
Marshall Hallenbeck 2023-09-30 15:13:27 -04:00
parent 310d178b3b
commit 8d64b22663
4 changed files with 78 additions and 46 deletions

View File

@ -0,0 +1,38 @@
name: NetExec Build ZippApps
on:
workflow_dispatch:
jobs:
build:
name: Building NetExec Python ZipApp on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: NetExec set up python on ${{ matrix.os }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build Python ZipApp with Shiv
run: |
pip install shiv
python build_collector.py
- name: Upload nxc ZipApp
uses: actions/upload-artifact@v3
with:
name: nxc-zipapp-${{ matrix.os }}-${{ matrix.python-version }}
path: bin/nxc
- name: Upload nxcdb ZipApp
uses: actions/upload-artifact@v3
with:
name: nxcdb-zipapp-${{ matrix.os }}-${{ matrix.python-version }}
path: bin/nxcdb
- name: Upload ZipApps
uses: actions/upload-artifact@v3
with:
name: nxc-${{ matrix.os }}-${{ matrix.python-version }}
path: bin/nxc

39
.github/workflows/netexec-build.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: NetExec Build Binaries
on:
workflow_dispatch:
jobs:
build:
name: Building NetExec Binary on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
#os: [ubuntu-latest, macOS-latest, windows-latest]
#python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: NetExec set up python on ${{ matrix.os }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build Native Binary
#if: runner.os == 'windows'
run: |
pip install pyinstaller
pip install .
pyinstaller netexec.spec
- name: Upload Windows Binary
if: runner.os == 'windows'
uses: actions/upload-artifact@v3
with:
name: nxc.exe
path: dist/nxc.exe
- name: Upload Nix/OSx Binary
if: runner.os != 'windows'
uses: actions/upload-artifact@v3
with:
name: nxc-${{ matrix.os }}-${{ matrix.python-version }}
path: bin/nxc

View File

@ -1,45 +0,0 @@
name: NetExec Build Binaries
on:
workflow_dispatch:
jobs:
build:
name: NetExec Tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: NetExec set up python on ${{ matrix.os }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build binaries with Shiv
run: |
pip install shiv
python build_collector.py
- name: Build Windows binary
if: runner.os == 'windows'
run: |
pip install pyinstaller
pip install .
pyinstaller netexec.spec
- name: Upload nxc binary
uses: actions/upload-artifact@master
with:
name: nxc-${{ matrix.os }}-${{ matrix.python-version }}
path: bin/nxc
- name: Upload nxcdb binary
uses: actions/upload-artifact@master
with:
name: nxcdb-${{ matrix.os }}-${{ matrix.python-version }}
path: bin/nxcdb
- name: Upload netexec binary (Windows)
if: runner.os == 'windows'
uses: actions/upload-artifact@master
with:
name: netexec-${{ matrix.os }}
path: dist/netexec.exe

View File

@ -85,7 +85,7 @@ exe = EXE(
a.zipfiles,
a.datas,
[],
name='netexec',
name='nxc',
debug=False,
bootloader_ignore_signals=False,
strip=False,