This repository has been archived on 2025-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
chkbit/.github/workflows/pyinstaller.yml

60 lines
1.7 KiB
YAML
Raw Normal View History

2024-01-12 22:33:59 +01:00
name: pyinstaller
on: [push]
jobs:
build:
2024-01-13 17:07:34 +01:00
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
2024-01-12 22:33:59 +01:00
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: prep
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install pipenv pyinstaller==6.3.0
pipenv install
rm -rf build dist
- name: build
shell: bash
run: |
2024-01-13 17:07:34 +01:00
echo "RUNNER_OS: $RUNNER_OS"
# get path to venv site-packages (for blake3)
pipenv run python -c "import site; print(site.getsitepackages())"
SITEPKG=$(pipenv run python -c "import site; print(site.getsitepackages()[-1])")
pipenv run pyinstaller run.py --hidden-import chkbit --hidden-import chkbit_cli --onefile --name chkbit --console --paths $SITEPKG
2024-01-12 22:33:59 +01:00
cat build/chkbit/warn-chkbit.txt
2024-01-13 17:07:34 +01:00
cd dist; ls -l
if [ "$RUNNER_OS" == "Windows" ]; then
7z a -tzip chkbit.zip chkbit.exe
else
tar -czf chkbit.tar.gz chkbit
fi
- name: artifact
uses: actions/upload-artifact@v3
if: runner.os == 'Linux'
with:
name: chkbit-linux_amd64.tar.gz
path: dist/chkbit.tar.gz
2024-01-12 22:33:59 +01:00
- name: artifact
uses: actions/upload-artifact@v3
2024-01-13 17:07:34 +01:00
if: runner.os == 'macOS'
2024-01-12 22:33:59 +01:00
with:
2024-01-13 17:07:34 +01:00
name: chkbit-macos_amd64.tar.gz
path: dist/chkbit.tar.gz
- name: artifact
uses: actions/upload-artifact@v3
if: runner.os == 'Windows'
with:
name: chkbit-windows_amd64.zip
path: dist/chkbit.zip