Skip to content

Fix PyInstaller command for Windows #74

Fix PyInstaller command for Windows

Fix PyInstaller command for Windows #74

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Set up Environment
run: |
python -m pip install --upgrade pip --default-timeout=100
pip3 install -r ./requirements.txt --default-timeout=100
- name: Unit Tests
run: |
python3 -m unittest discover ./tests/
- name: Static Checks
run: |
pip3 install flake8 mypy --default-timeout=100
mypy --config-file ./ci/mypy.cfg ./
flake8 --config ./ci/flake8.cfg
echo If this fails run: python3 -m black . --config ./ci/black.toml
python3 -m black . --config ./ci/black.toml --check
python3 -m pip_audit -r requirements.txt
compile-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Set up Environment
run: |
python -m pip install --upgrade pip --default-timeout=100
pip3 install -r ./requirements.txt --default-timeout=100
- name: Build & Run Binary
run: |
pip3 install pyinstaller
chmod +x ./release/generate_linux_binary.sh
./release/generate_linux_binary.sh
chmod +x ./dist/cloudgrep
./dist/cloudgrep -h # check it doesn't return non 0 exit status, i.e. crash
- uses: actions/upload-artifact@v3
with:
name: dist-linux
path: ./dist/*
compile-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Setup Environment
run: |
pip install -r ./requirements.txt
pip install setuptools_rust
pip install pyinstaller
- name: Run cloudgrep Python
run: |
cd release
./generate_windows_binary.bat
./dist/cloudgrep.exe -h
- uses: actions/upload-artifact@v3
with:
name: dist-windows
path: ./release/dist/*
compile-macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Setup Environment
run: |
pip3 install -r ./requirements.txt
- name: Run cloudgrep Python
run: |
pip3 install pyinstaller
chmod +x ./release/generate_linux_binary.sh
./release/generate_linux_binary.sh
chmod +x ./dist/cloudgrep
./dist/cloudgrep -h # check it doesn't return non 0 exit status, i.e. crash
- uses: actions/upload-artifact@v3
with:
name: dist-osx
path: ./dist/*