summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2024-01-16 01:24:49 +0000
committerNorbert Preining <preining@logic.at>2024-01-16 01:24:49 +0000
commit7a964eff02993fde87c4ced50a92235f23816628 (patch)
tree103563028605dd0519709f6c837c06de55d6082d
parent799280dd82e2322932ea6087fa98533547bcf085 (diff)
[gh actions] unified build using qemu
git-svn-id: svn://tug.org/texlive/trunk@69448 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/.github/workflows/main.yml125
1 files changed, 39 insertions, 86 deletions
diff --git a/Build/source/.github/workflows/main.yml b/Build/source/.github/workflows/main.yml
index f4647c87520..326a97ee313 100644
--- a/Build/source/.github/workflows/main.yml
+++ b/Build/source/.github/workflows/main.yml
@@ -34,115 +34,68 @@ on: [push]
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
-
- container:
- image: ${{ matrix.image }}
+ 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
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@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@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@v1
- if: startsWith(github.ref, 'refs/tags/')
- 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@v4
- - uses: uraimo/run-on-arch-action@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
- ;;
+ path: 'repo'
+ - name: Setup QEMU
+ uses: docker/setup-qemu-action@v2
+ with:
+ platforms: ${{ matrix.qemu_arch }}
+ - name: build
+ uses: addnab/docker-run-action@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@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@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 }}
+