116 lines
3.0 KiB
YAML
116 lines
3.0 KiB
YAML
name: Build on Multiple Distributions
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-on-arch:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: archlinux:latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pacman -Syu --noconfirm
|
|
pacman -S --noconfirm git python python-pip binutils
|
|
|
|
- name: Check for changes
|
|
run: |
|
|
if ! git diff --name-only $GITEA_BEFORE_SHA $GITEA_SHA; then
|
|
echo "No changes detected. Skipping build."
|
|
exit 0
|
|
fi
|
|
|
|
- name: Prepare Python environment
|
|
run: |
|
|
mv /lib/python3*/EXTERNALLY-MANAGED .
|
|
pip install --upgrade pip
|
|
pip install pyinstaller inquirerpy distro
|
|
|
|
- name: Build with PyInstaller
|
|
run: |
|
|
pyinstaller --onefile --add-data "/bash/:bash/" --add-data "/prompts/:prompts/" --add-data "/config/:config/" setup.py
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: arch-setup
|
|
path: dist/setup
|
|
|
|
build-on-debian:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: debian:stable
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
apt update && apt upgrade -y
|
|
apt install -y git python3 python3-pip binutils
|
|
|
|
- name: Check for changes
|
|
run: |
|
|
if ! git diff --name-only $GITEA_BEFORE_SHA $GITEA_SHA; then
|
|
echo "No changes detected. Skipping build."
|
|
exit 0
|
|
fi
|
|
|
|
- name: Prepare Python environment
|
|
run: |
|
|
mv /lib/python*/EXTERNALLY-MANAGED .
|
|
pip install pyinstaller inquirerpy distro
|
|
|
|
- name: Build with PyInstaller
|
|
run: |
|
|
pyinstaller --onefile --add-data "/bash/:bash/" --add-data "/prompts/:prompts/" --add-data "/config/:config/" setup.py
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: debian-setup
|
|
path: dist/setup
|
|
|
|
build-on-fedora:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: fedora:latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
dnf up -y && dnf install -y git python python-pip binutils
|
|
|
|
- name: Check for changes
|
|
run: |
|
|
if ! git diff --name-only $GITEA_BEFORE_SHA $GITEA_SHA; then
|
|
echo "No changes detected. Skipping build."
|
|
exit 0
|
|
fi
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
pip install inquirerpy distro pyinstaller
|
|
|
|
- name: Build with PyInstaller
|
|
run: |
|
|
pyinstaller --onefile --add-data "/bash/:bash/" --add-data "/prompts/:prompts/" --add-data "/config/:config/" setup.py
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: fedora-setup
|
|
path: dist/setup
|
|
|