texlive[69429] Build/source/.github: [gh actions] rework without

commits+preining at tug.org commits+preining at tug.org
Mon Jan 15 07:26:01 CET 2024


Revision: 69429
          https://tug.org/svn/texlive?view=revision&revision=69429
Author:   preining
Date:     2024-01-15 07:26:01 +0100 (Mon, 15 Jan 2024)
Log Message:
-----------
[gh actions] rework without external action, simplify

Modified Paths:
--------------
    trunk/Build/source/.github/workflows/main.yml

Added Paths:
-----------
    trunk/Build/source/.github/scripts/
    trunk/Build/source/.github/scripts/build-tl.sh
    trunk/Build/source/.github/scripts/install-deps.alpine.sh
    trunk/Build/source/.github/scripts/install-deps.centos.sh
    trunk/Build/source/.github/scripts/install-deps.ubuntu.sh

Added: trunk/Build/source/.github/scripts/build-tl.sh
===================================================================
--- trunk/Build/source/.github/scripts/build-tl.sh	                        (rev 0)
+++ trunk/Build/source/.github/scripts/build-tl.sh	2024-01-15 06:26:01 UTC (rev 69429)
@@ -0,0 +1,60 @@
+#!/bin/sh -l
+
+arch="$1"
+echo "Building TL for arch = $arch"
+
+destdir="$2"
+
+# for CentOS we need to activate gcc-9
+if [ -f /opt/rh/devtoolset-9/enable ]
+then
+  # we cannot call scl enable devtoolset-9 here since we need
+  # the settings in the running shell
+  . /opt/rh/devtoolset-9/enable
+fi
+
+
+find . -name \*.info -exec touch '{}' \;
+touch ./texk/detex/detex-src/detex.c
+touch ./texk/detex/detex-src/detex.h
+touch ./texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.c
+touch ./texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.h
+touch ./texk/gregorio/gregorio-src/src/vowel/vowel-rules.h
+touch ./texk/web2c/omegafonts/pl-lexer.c
+touch ./texk/web2c/omegafonts/pl-parser.c
+touch ./texk/web2c/omegafonts/pl-parser.h
+touch ./texk/web2c/otps/otp-lexer.c
+touch ./texk/web2c/otps/otp-parser.c
+touch ./texk/web2c/otps/otp-parser.h
+touch ./texk/web2c/web2c/web2c-lexer.c
+touch ./texk/web2c/web2c/web2c-parser.c
+touch ./texk/web2c/web2c/web2c-parser.h
+touch ./utils/asymptote/camp.tab.cc
+touch ./utils/asymptote/camp.tab.h
+touch ./utils/lacheck/lacheck.c
+touch ./utils/xindy/xindy-src/tex2xindy/tex2xindy.c
+
+# default settings
+TL_MAKE_FLAGS="-j 2"
+BUILDARGS=""
+
+# special cases
+case "$arch" in
+  armhf-linux)
+    TL_MAKE_FLAGS="-j 1"
+    ;;
+  aarch64-linux)
+    BUILDARGS="--enable-arm-neon=on"
+    ;;
+esac
+export TL_MAKE_FLAGS
+
+./Build -C $BUILDARGS
+
+mv inst/bin/* $arch
+tar czvf texlive-bin-$arch.tar.gz $arch
+if [ -n "$destdir" ] ; then
+  mv texlive-bin-$arch.tar.gz "$destdir"
+  ls "$destdir"
+fi
+


Property changes on: trunk/Build/source/.github/scripts/build-tl.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/.github/scripts/install-deps.alpine.sh
===================================================================
--- trunk/Build/source/.github/scripts/install-deps.alpine.sh	                        (rev 0)
+++ trunk/Build/source/.github/scripts/install-deps.alpine.sh	2024-01-15 06:26:01 UTC (rev 69429)
@@ -0,0 +1,3 @@
+#!/bin/sh
+apk update
+apk add --no-progress bash gcc g++ make perl fontconfig-dev libx11-dev libxmu-dev libxaw-dev


Property changes on: trunk/Build/source/.github/scripts/install-deps.alpine.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/.github/scripts/install-deps.centos.sh
===================================================================
--- trunk/Build/source/.github/scripts/install-deps.centos.sh	                        (rev 0)
+++ trunk/Build/source/.github/scripts/install-deps.centos.sh	2024-01-15 06:26:01 UTC (rev 69429)
@@ -0,0 +1,4 @@
+#!/bin/sh
+yum update -y
+yum install -y centos-release-scl
+yum install -y devtoolset-9 fontconfig-devel libX11-devel libXmu-devel libXaw-devel


Property changes on: trunk/Build/source/.github/scripts/install-deps.centos.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/.github/scripts/install-deps.ubuntu.sh
===================================================================
--- trunk/Build/source/.github/scripts/install-deps.ubuntu.sh	                        (rev 0)
+++ trunk/Build/source/.github/scripts/install-deps.ubuntu.sh	2024-01-15 06:26:01 UTC (rev 69429)
@@ -0,0 +1,6 @@
+#!/bin/bash
+export DEBIAN_FRONTEND=noninteractive
+export LANG=C.UTF-8
+export LC_ALL=C.UTF-8
+apt-get update -q -y
+apt-get install -y --no-install-recommends bash gcc g++ make perl libfontconfig-dev libx11-dev libxmu-dev libxaw7-dev build-essential


Property changes on: trunk/Build/source/.github/scripts/install-deps.ubuntu.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: trunk/Build/source/.github/workflows/main.yml
===================================================================
--- trunk/Build/source/.github/workflows/main.yml	2024-01-15 05:27:07 UTC (rev 69428)
+++ trunk/Build/source/.github/workflows/main.yml	2024-01-15 06:26:01 UTC (rev 69429)
@@ -40,29 +40,33 @@
       matrix:
         include:
           - arch: i386-linux
+            image: i386/ubuntu:xenial
           - arch: x86_64-linux
+            image: centos:7
           - arch: x86_64-linuxmusl
+            image: alpine:3.5
 
+    container:
+      image: ${{ matrix.image }}
+
     steps:
       - name: checkout-main
         uses: actions/checkout at v4
-      - name: checkout-build-action
-        uses: actions/checkout at v4
-        with:
-          repository: TeX-Live/tl-build-docker-action
-          ref: v4
-          path: actions/TeX-Live/tl-build-docker-action
-      - name: Update Dockerfile
-        run: cp actions/TeX-Live/tl-build-docker-action/Dockerfile.${{ matrix.arch }} actions/TeX-Live/tl-build-docker-action/Dockerfile
-      - name: Run docker image
-        uses: ./actions/TeX-Live/tl-build-docker-action
-        with:
-          arch: ${{ matrix.arch }}
+      - name: install-deps
+        shell: bash
+        run: |
+          case "${{ matrix.image }}" in
+            i386/ubuntu:*) .github/scripts/install-deps.ubuntu.sh ;;
+            centos:*) .github/scripts/install-deps.centos.sh ;;
+            alpine:*) .github/scripts/install-deps.alpine.sh ;;
+          esac
+      - name: run build
+        shell: bash
+        run: .github/scripts/build-tl.sh ${{ matrix.arch }}
       - name: find file step
         run: ls -l
       - name: save artifact
         uses: actions/upload-artifact at v4
-        if: startsWith(github.ref, 'refs/tags/')
         with:
           name: texlive-bin-{{ matrix.arch }}.tar.gz
           path: texlive-bin-{{ matrix.arch }}.tar.gz
@@ -84,17 +88,13 @@
         include:
           - arch: aarch64
             distro: buster
+            tl_name: aarch64-linux
           - arch: armv7
             distro: buster
+            tl_name: armhf-linux
     steps:
       - name: checkout-main
         uses: actions/checkout at v4
-      - name: checkout-build-action
-        uses: actions/checkout at v4
-        with:
-          repository: TeX-Live/tl-build-docker-action
-          ref: v4
-          path: actions/TeX-Live/tl-build-docker-action
       - uses: uraimo/run-on-arch-action at v2
         name: Build artifact
         id: build
@@ -112,54 +112,16 @@
           shell: /bin/bash
           install: |
             case "${{ matrix.distro }}" in
-              buster)
-                apt-get update -q -y
-                apt-get install -y --no-install-recommends bash gcc g++ make perl libfontconfig-dev libx11-dev libxmu-dev libxaw7-dev build-essential
-                ;;
+              buster) .github/scripts/install-deps.ubuntu.sh ;;
             esac
-          run: |
-            echo "Build on ${arch} / ${distro}"
-            find . -name \*.info -exec touch '{}' \;
-            touch ./texk/detex/detex-src/detex.c
-            touch ./texk/detex/detex-src/detex.h
-            touch ./texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.c
-            touch ./texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.h
-            touch ./texk/gregorio/gregorio-src/src/vowel/vowel-rules.h
-            touch ./texk/web2c/omegafonts/pl-lexer.c
-            touch ./texk/web2c/omegafonts/pl-parser.c
-            touch ./texk/web2c/omegafonts/pl-parser.h
-            touch ./texk/web2c/otps/otp-lexer.c
-            touch ./texk/web2c/otps/otp-parser.c
-            touch ./texk/web2c/otps/otp-parser.h
-            touch ./texk/web2c/web2c/web2c-lexer.c
-            touch ./texk/web2c/web2c/web2c-parser.c
-            touch ./texk/web2c/web2c/web2c-parser.h
-            touch ./utils/asymptote/camp.tab.cc
-            touch ./utils/asymptote/camp.tab.h
-            touch ./utils/lacheck/lacheck.c
-            touch ./utils/xindy/xindy-src/tex2xindy/tex2xindy.c
-
-            if [ $arch = armhf-linux ] ; then
-              TL_MAKE_FLAGS="-j 1"
-            else
-              TL_MAKE_FLAGS="-j 2"
-            fi
-            if [ $arch = aarch64 ] ; then
-              BUILDARGS="--enable-arm-neon=on"
-            else
-              BUILDARGS=""
-            fi
-            export TL_MAKE_FLAGS
-            ./Build -C $BUILDARGS
-            mv inst/bin/* $arch
-            tar czvf /artifacts/texlive-bin-${arch}-linux.tar.gz $arch
+          run: .github/scripts/build-tl.sh ${{ matrix.tl_name }} /artifacts
       - name: find file step
         run: ls -l ${PWD}/artifacts
       - name: save artifact
         uses: actions/upload-artifact at v4
         with:
-          name: texlive-bin-{{ matrix.arch }}-linux.tar.gz
-          path: ${PWD}/artifacts/texlive-bin-{{ matrix.arch }}.tar.gz
+          name: texlive-bin-{{ matrix.tl_name }}.tar.gz
+          path: ${PWD}/artifacts/texlive-bin-{{ matrix.tl_name }}.tar.gz
           compression-level: 0
           retention-days: 5
       - name: Release
@@ -166,6 +128,6 @@
         uses: softprops/action-gh-release at v1
         if: startsWith(github.ref, 'refs/tags/')
         with:
-          files: ${PWD}/artifacts/texlive-bin-{{ matrix.arch }}.tar.gz
+          files: ${PWD}/artifacts/texlive-bin-{{ matrix.tl_name }}.tar.gz
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}



More information about the tex-live-commits mailing list.