Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a GitHub action to compile the Linux x64 binaries #1

Open
beltran-rubo opened this issue Jun 17, 2022 · 1 comment
Open

Add a GitHub action to compile the Linux x64 binaries #1

beltran-rubo opened this issue Jun 17, 2022 · 1 comment

Comments

@beltran-rubo
Copy link
Member

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.

@therealsujitk
Copy link

therealsujitk commented Dec 26, 2023

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/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants