Open beltran-rubo opened 2 years ago
I'll just leave this here, this action isn't fully tested because the tarballs from SourceForge are outdated. If in future we can automate downloading the latest tarballs, then this action can be used.
name: Linux Build
on:
pull_request:
branches:
- main
env:
PHP_VERSION: 80
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker image
run: docker build . -t xampp-build
- name: Download tarballs
run: |
curl -L > 'tarballs.tgz' "https://master.dl.sourceforge.net/project/xampp/thirdparties/tarballs-unix-202206.tgz?viasf=1"
mkdir tarballs
tar -xvzf tarballs.tgz -C tarballs
- name: Run the Docker container
run: docker run -v "$(pwd):/home/xampp-code" -v "$(pwd)/tarballs:/tmp/tarballs" --name xampp-container -it -d xampp-build bash
- name: Compile tarballs
run: docker exec xampp-container bash -c 'cd /home/xampp-code/src && tclkit createstack.tcl buildTarball xamppunixinstaller${{ env.PHP_VERSION }}stack linux-x64 && mv /bitnami/xamppunixinstaller${{ env.PHP_VERSION }}stack-linux-x64/output/*.tar.gz /tmp/tarballs'
- name: Build the installer
run: |
docker exec xampp-container bash -c 'cd /home/xampp-code/src && tclkit createstack.tcl pack xamppunixinstaller${{ env.PHP_VERSION }}stack linux-x64'
docker cp xampp-container:/opt/installbuilder/output .
- name: Upload the build output
uses: actions/upload-artifact@v4
with:
path: output/*
The XAMPP binaries for Linux x64 can be compiled on top of the Dockerfile from the repo. It would be good to verify the compilation of all binaries is correct before merging any Pull Request.