Skip to content

antarcticrainforest building the pyinstaller binary 🧉 #20

antarcticrainforest building the pyinstaller binary 🧉

antarcticrainforest building the pyinstaller binary 🧉 #20

Workflow file for this run

name: Build the binary
run-name: ${{ github.actor }} building the pyinstaller binary 🧉
permissions:
pull-requests: write
contents: write
packages: write
on:
push:
jobs:
build-osx:
name: Build packages (non Linux)
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
target: osx-x64
asset_mime: application/octet-stream
- os: windows-latest
target: windows-x64
asset_mime: application/vnd.microsoft.portable-executable
steps:
- uses: actions/checkout@v4
- name: Set up Python "3.X" on ${{ matrix.os }}
uses: actions/setup-python@v4
with:
python-version: "3.X"
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pyinstaller ansible .
- name: Build with cmd pyinstaller for ${{ matrix.target }}
run: >
pyinstaller pyinstaller/pyinstaller-deploy-freva.py -c
--name deploy-freva --onefile --clean -i docs/_static/freva_owl.ico
--add-data 'assets/share/freva/deployment:freva_deployment/assets'
--add-data 'src/freva_deployment/versions.json:freva_deployment'
- name: Upload cmd Asset
uses: actions/upload-artifact@v3
with:
path: dist/deploy-freva
name: deploy-freva-${{ matrix.target }}
build:
name: Build packages (Linux)
runs-on: ubuntu-latest
strategy:
matrix:
include:
- ARCH: linux/amd64
TARGET: linux-x64
- ARCH: linux/arm64
TARGET: linux-arm64
- ARCH: linux/arm/v7
TARGET: linux-armvl7
- ARCH: linux/arm/v6
TARGET: linux-armvl6
- ARCH: linux/ppc64le
TARGET: linux-ppc64
- ARCH: linux/s390x
TARGET: linux-s390x
- ARCH: i386
TARGET: linux-i386
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Create Buildx builder
run: docker buildx create --use --name mybuilder
- name: Inspect Buildx builder
run: docker buildx inspect --bootstrap
- name: Build Docker image
uses: docker/build-push-action@v4
with:
file: Dockerfile
platforms: ${{ matrix.ARCH }}
push: false
load: true
tags: pyinstaller-env:${{ matrix.TARGET }}
- name: Run PyInstaller in Docker
run: |
docker run --rm -v $PWD:/src -w /src pyinstaller-env:${{ matrix.TARGET }} \
pyinstaller pyinstaller/pyinstaller-deploy-freva.py -c \
--name deploy-freva --onefile --clean -i docs/_static/freva_owl.ico \
--add-data 'assets/share/freva/deployment:freva_deployment/assets' \
--add-data 'src/freva_deployment/versions.json:freva_deployment'
- name: Upload cmd Asset
uses: actions/upload-artifact@v3
with:
path: dist/
name: deploy-freva-${{ matrix.TARGET }}