commit 7ce17bbd63e306299380939715e806fbf2e7592a Author: aggarwalakshun Date: Thu Dec 26 03:08:49 2024 +0530 add build pipeline diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..52b99af --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,62 @@ +stages: + - build + +build-on-arch: + stage: build + image: archlinux:latest + script: + - | + pacman -Syu --noconfirm + pacman -S --noconfirm git + if ! git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA; then + echo "No changes detected. Skipping build." + exit 0 + fi + pacman -S --noconfirm python python-pip binutils + mv /lib/python3*/EXTERNALLY-MANAGED . + pip install --upgrade pip + pip install pyinstaller inquirerpy distro + pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py + artifacts: + paths: + - dist/setup + name: "arch-setup" + +build-on-debian: + stage: build + image: debian:stable + script: + - | + apt update && apt upgrade -y + apt install -y git + if ! git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA; then + echo "No changes detected. Skipping build." + exit 0 + fi + apt install -y python3 python3-pip + mv /lib/python*/EXTERNALLY-MANAGED . + pip install pyinstaller inquirerpy distro binutils + pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py + artifacts: + paths: + - dist/setup + name: "debian-setup" + +build-on-fedora: + stage: build + image: fedora:latest + script: + - | + dnf up -y && dnf install -y git + if ! git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA; then + echo "No changes detected. Skipping build." + exit 0 + fi + dnf install -y python python-pip binutils + pip install inquirerpy distro pyinstaller + pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py + artifacts: + paths: + - dist/setup + name: "fedora-setup" +