119 lines
3.3 KiB
YAML
119 lines
3.3 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: Install basic dependencies
|
|
run: |
|
|
pacman -Syu --noconfirm
|
|
pacman -S --noconfirm git
|
|
|
|
- name: Clone repo
|
|
run: |
|
|
git clone https://gitea.akshun-lab.uk/akshun/setup-script.git .
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pacman -S --noconfirm python python-pip binutils
|
|
|
|
- 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: Push to gitea
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
|
-H "Content-Type: application/octet-stream" \
|
|
--data-binary @dist/setup \
|
|
"https://gitea.akshun-lab.uk/api/v1/repos/akshun/setup-script/releases"
|
|
|
|
build-on-debian:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: debian:stable
|
|
steps:
|
|
|
|
- name: Install basic dependencies
|
|
run: |
|
|
apt update && apt upgrade -y
|
|
apt install -y git
|
|
|
|
- name: Clone repo
|
|
run: |
|
|
git clone https://gitea.akshun-lab.uk/akshun/setup-script.git .
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
apt install -y python3 python3-pip binutils
|
|
|
|
- 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: Push to gitea
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
|
-H "Content-Type: application/octet-stream" \
|
|
--data-binary @dist/setup \
|
|
"https://gitea.akshun-lab.uk/api/v1/repos/akshun/setup-script/releases"
|
|
|
|
build-on-fedora:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: fedora:latest
|
|
steps:
|
|
|
|
- name: Install basic dependencies
|
|
run: |
|
|
dnf up -y
|
|
dnf install -y git
|
|
|
|
- name: Clone repo
|
|
run: |
|
|
git clone https://gitea.akshun-lab.uk/akshun/setup-script.git .
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
dnf install -y python python-pip binutils
|
|
|
|
- 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: Push to gitea
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
|
-H "Content-Type: application/octet-stream" \
|
|
--data-binary @dist/setup \
|
|
"https://gitea.akshun-lab.uk/api/v1/repos/akshun/setup-script/releases"
|