texlive[69448] Build/source/.github/workflows/main.yml: [gh actions]

commits+preining at tug.org commits+preining at tug.org
Tue Jan 16 02:24:50 CET 2024


Revision: 69448
          https://tug.org/svn/texlive?view=revision&revision=69448
Author:   preining
Date:     2024-01-16 02:24:49 +0100 (Tue, 16 Jan 2024)
Log Message:
-----------
[gh actions] unified build using qemu

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

Modified: trunk/Build/source/.github/workflows/main.yml
===================================================================
--- trunk/Build/source/.github/workflows/main.yml	2024-01-16 00:43:28 UTC (rev 69447)
+++ trunk/Build/source/.github/workflows/main.yml	2024-01-16 01:24:49 UTC (rev 69448)
@@ -34,115 +34,68 @@
 jobs:
   build_job:
     runs-on: ubuntu-latest
-    name: Build on ${{ matrix.arch }}
+    name: Build on ${{ matrix.tl_name }}
 
     strategy:
       fail-fast: false
       matrix:
         include:
-          - arch: i386-linux
+          - tl_name: i386-linux
             image: i386/ubuntu:xenial
-          - arch: x86_64-linux
+            qemu_arch: 386
+            platform: 386
+          - tl_name: x86_64-linux
             image: centos:7
-          - arch: x86_64-linuxmusl
+            qemu_arch: amd64
+            platform: amd64
+          - tl_name: x86_64-linuxmusl
             image: alpine:3.5
+            qemu_arch: amd64
+            platform: amd64
+          - tl_name: aarch64-linux
+            image: arm64v8/debian:buster
+            qemu_arch: aarch64
+            platform: aarch64
+          - tl_name: armhf-linux
+            image: arm32v7/debian:buster
+            qemu_arch: arm
+            platform: arm/v7
 
-    container:
-      image: ${{ matrix.image }}
-
     steps:
       - name: checkout-main
-        # we cannot use > v1 due to node being used then, and in 
-        # non standard setup node fails, see
-        # https://github.com/actions/checkout/issues/334#issuecomment-1241306390
-        uses: actions/checkout at v1
-      - name: install-deps
-        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
+        uses: actions/checkout at v4
         with:
-          name: texlive-bin-${{ matrix.arch }}.tar.gz
-          path: texlive-bin-${{ matrix.arch }}.tar.gz
-          compression-level: 0
-      - name: Release
-        uses: softprops/action-gh-release at v1
-        if: startsWith(github.ref, 'refs/tags/')
+          path: 'repo'
+      - name: Setup QEMU
+        uses: docker/setup-qemu-action at v2
         with:
-          files: texlive-bin-${{ matrix.arch }}.tar.gz
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-  build_job_qemu:
-    runs-on: ubuntu-latest
-    name: Build on ${{ matrix.arch }}
-
-    strategy:
-      matrix:
-        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
-      - uses: uraimo/run-on-arch-action at v2
-        name: Build artifact
-        id: build
-        with:
-          arch: ${{ matrix.arch }}
-          githubToken: ${{ github.token }}
-
-          setup: |
-            mkdir -p "${PWD}/artifacts"
-          dockerRunArgs: |
-            --volume "${PWD}/artifacts:/artifacts"
-          env: |
-            arch: ${{ matrix.arch }}
-            distro: ${{ matrix.distro }}
-          shell: /bin/bash
-          install: |
-            # this does not work because during install the
-            # checkout is not available!!!
-            # https://github.com/uraimo/run-on-arch-action/issues/54
-            # case "${{ matrix.distro }}" in
-            #   buster) .github/scripts/install-deps.ubuntu.sh ;;
-            # esac
-            case "${{ matrix.distro }}" in
-              buster)
-               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
-               ;;
+          platforms: ${{ matrix.qemu_arch }}
+      - name: build
+        uses: addnab/docker-run-action at v3
+        with: 
+          image: ${{ matrix.image }}
+          options: -v ${{ github.workspace }}:/work --platform linux/${{ matrix.platform }}
+          run: |
+            cd /work/repo
+            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
-          run: .github/scripts/build-tl.sh ${{ matrix.tl_name }} /artifacts
+            .github/scripts/build-tl.sh ${{ matrix.tl_name }}
       - name: find file step
-        run: ls -l ${PWD}/artifacts
+        run: ls -l $GITHUB_WORKSPACE/repo/texlive-bin-${{ matrix.tl_name }}.tar.gz
       - name: save artifact
         uses: actions/upload-artifact at v4
         with:
           name: texlive-bin-${{ matrix.tl_name }}.tar.gz
-          path: ${PWD}/artifacts/texlive-bin-${{ matrix.tl_name }}.tar.gz
+          path: ${{ github.workspace }}/repo/texlive-bin-${{ matrix.tl_name }}.tar.gz
           compression-level: 0
-          retention-days: 5
       - name: Release
         uses: softprops/action-gh-release at v1
         if: startsWith(github.ref, 'refs/tags/')
         with:
-          files: ${PWD}/artifacts/texlive-bin-${{ matrix.tl_name }}.tar.gz
+          files: $GITHUB_WORKSPACE/repo/texlive-bin-${{ matrix.tl_name }}.tar.gz
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+



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