Skip to content

Test builds

Test builds #50

Workflow file for this run

name: Nuitka build
on:
push:
# branches: [ "main" ]
# Uncomment these when ready
# tags:
# - 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
# branches: [ "main"]
# Uncomment these when ready
# tags:
# - 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
permissions:
contents: write
jobs:
build:
strategy:
matrix:
os: [ macos-12, ubuntu-20.04, ubuntu-22.04, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3 # Check-out repository
- uses: actions/setup-python@v4 # Setup Python
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Pip install requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build python script into a stand-alone binary (not Windows)
if: matrix.os != 'windows-latest'
uses: Nuitka/Nuitka-Action@main
with:
working-directory: src
nuitka-version: main
script-name: bgtrainer/bgtrainer.py
include-data-dir: bgtrainer/data=bgtrainer/data
onefile: true
output-file: bgtrainer_${{ matrix.os }}.bin
- name: Build python script into a directory (Windows only)
if: matrix.os == 'windows-latest'
uses: Nuitka/Nuitka-Action@main
with:
working-directory: src
nuitka-version: main
script-name: bgtrainer/bgtrainer.py
include-data-dir: bgtrainer/data=bgtrainer/data
onefile: false
- name: Zip directory (Windows only)
if: matrix.os == 'windows-latest'
uses: thedoctor0/[email protected]
with:
directory: 'src/build/bgtrainer.dist'
type: 'zip'
path: '.'
filename: '../bgtrainer_${{ matrix.os }}'
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }} build
path: |
src/build/bgtrainer_${{ matrix.os }}*
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
src/build/bgtrainer_${{ matrix.os }}*