From 98cd88f12c002a54d0e39ca0994e0eae07a3dcb3 Mon Sep 17 00:00:00 2001 From: Donn Date: Sat, 30 Apr 2022 17:37:25 +0200 Subject: [PATCH] Update to CentOS 7, Add AppImage CI --- .github/workflows/appimage.yml | 28 ++++++++++++++++++++++++++++ appimage/Dockerfile | 13 ++++++++----- appimage/README.md | 6 +++--- 3 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/appimage.yml diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml new file mode 100644 index 00000000..c9dc9cce --- /dev/null +++ b/.github/workflows/appimage.yml @@ -0,0 +1,28 @@ +on: + push: + tags: + - "*" + +name: CI + +jobs: + build_appimage: + name: Build AppImage + runs-on: ubuntu-20.04 + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Get the version + id: get_version + run: | + export VERSION_NUM=$(ruby -e "print '$GITHUB_REF'.split('/')[2]") + echo ::set-output name=value::${VERSION_NUM} + - name: Build project + run: | + cd appimage + make + cp Magic-x86_64.AppImage /tmp/Magic-${{ steps.get_version.outputs.value }}-x86_64.AppImage + - name: Upload Release Asset + uses: softprops/action-gh-release@v1 + with: + files: /tmp/Magic-${{ steps.get_version.outputs.value }}-x86_64.AppImage diff --git a/appimage/Dockerfile b/appimage/Dockerfile index b2cd61f8..ec683035 100644 --- a/appimage/Dockerfile +++ b/appimage/Dockerfile @@ -1,11 +1,16 @@ -FROM donnio/python3:centos6 +FROM centos/python-38-centos7:20210726-fad62e9 + +USER root + +# Build Dependencies +RUN yum install -y cairo-devel freeglut-devel gcc make tcsh # Tcl/Tk WORKDIR /tcl RUN curl -L https://prdownloads.sourceforge.net/tcl/tcl8.6.12-src.tar.gz | tar --strip-components=1 -xzC . \ && cd unix \ && ./configure --prefix=/prefix \ - && make -j$(nproc) \ + && make \ && make install WORKDIR /tk @@ -19,9 +24,6 @@ WORKDIR /prefix/bin RUN cp ./wish8.6 ./wish RUN cp ./tclsh8.6 ./tclsh -# Cairo -RUN yum install -y cairo-devel - # Magic WORKDIR /magic COPY . . @@ -30,6 +32,7 @@ RUN ./configure \ --prefix=/prefix \ --with-tcl=/prefix/lib \ --with-tk=/prefix/lib \ + --without-opengl \ && make clean \ && make database/database.h \ && make -j$(nproc) \ diff --git a/appimage/README.md b/appimage/README.md index eaa2d554..aadb6488 100644 --- a/appimage/README.md +++ b/appimage/README.md @@ -2,13 +2,13 @@ This is an AppImage that runs on all GNU/Linux platforms with: * FUSE * This excludes non-privileged Docker containers unfortunately, unless pre-extracted. -* GLIBC 2.3+ +* GLIBC 2.17+ * Cairo 1.8+ -That's most Linux distributions released in 2012 or later. +That's most Linux distributions released in 2016 or later. # Build Info -A Dockerfile on CentOS 6 (needed for older glibc) image builds Tcl, Tk and Magic. +A Dockerfile on CentOS 7 (needed for older glibc) image builds Tcl, Tk and Magic. The final build is then packaged into an AppImage using AppImageTool on the host machine.