diff options
author | Norbert Preining <preining@logic.at> | 2024-03-01 04:37:17 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2024-03-01 04:37:17 +0000 |
commit | b0970e2186ab115d2d990068b17c0e85287ac6f4 (patch) | |
tree | d73fefe79ea4012dc3c2f672dd8a97e39298dcf1 /Build | |
parent | 5d1e6e2575c3b702283b5c6abc1f37ccaaf2ddf4 (diff) |
[GHA] separate workflow for asy
git-svn-id: svn://tug.org/texlive/trunk@70281 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-x | Build/source/.github/scripts/build-asy.sh | 54 | ||||
-rwxr-xr-x | Build/source/.github/scripts/build-tl.sh | 22 | ||||
-rw-r--r-- | Build/source/.github/workflows/build-asy.yml | 117 |
3 files changed, 171 insertions, 22 deletions
diff --git a/Build/source/.github/scripts/build-asy.sh b/Build/source/.github/scripts/build-asy.sh new file mode 100755 index 00000000000..30531b0ef0c --- /dev/null +++ b/Build/source/.github/scripts/build-asy.sh @@ -0,0 +1,54 @@ +#!/bin/sh -l + +set -e + +if [ "x$2" = "x" ] +then + echo "Usage: `basename $0` arch buildsys [no-prepare]" >&2 + exit 1 +fi + +arch="$1" +echo "Building TL asy for arch = $arch" +shift + +buildsys=$1 +echo "Building on $buildsys" +shift + +do_prepare=1 +if [ "$1" = "no-prepare" ] +then + do_prepare=0 +fi + +if [ $do_prepare = 1 ] +then + case $buildsys in + ubuntu|debian) + 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 + apt-get install -y --no-install-recommends build-essential pkg-config libeigen3-dev libcurl4-openssl-dev libreadline-dev libboost-filesystem-dev libtirpc-dev flex libglu1-mesa-dev freeglut3-dev libosmesa6-dev libreadline6-dev zlib1g-dev bison libglm-dev libncurses-dev + ;; + *) + echo "Unsupported build system: $buildsys" >&2 + exit 1 + ;; + esac +fi + +find . -name \*.info -exec touch '{}' \; +touch ./utils/asymptote/camp.tab.cc +touch ./utils/asymptote/camp.tab.h +touch ./utils/asymptote/GUI/pyUIClass/* + +cd utils/asymptote +./configure --prefix=/tmp/asyinst --enable-static --enable-texlive-build CXXFLAGS=-std=c++11 --disable-gsl --disable-fftw --disable-lsp +sed -i -e 's/^LIBS = /LIBS = -static-libgcc -static-libstdc++ /' Makefile +make -j2 +strip asy + +tar czvf ../../asy-$arch.tar.gz asy diff --git a/Build/source/.github/scripts/build-tl.sh b/Build/source/.github/scripts/build-tl.sh index 027edd011e0..9f460685ffd 100755 --- a/Build/source/.github/scripts/build-tl.sh +++ b/Build/source/.github/scripts/build-tl.sh @@ -121,26 +121,4 @@ export TL_MAKE_FLAGS mv inst/bin/* $arch -# -# Build asy if possible -# -case $buildsys in - ubuntu|debian) - export DEBIAN_FRONTEND=noninteractive - apt-get install -y --no-install-recommends build-essential pkg-config libeigen3-dev libcurl4-openssl-dev libreadline-dev libboost-filesystem-dev libtirpc-dev flex libglu1-mesa-dev freeglut3-dev libosmesa6-dev libreadline6-dev zlib1g-dev bison libglm-dev libncurses-dev - cd utils/asymptote - # we don't have pyuic5 installed, do not try to update these files - touch GUI/pyUIClass/* - ./configure --prefix=/tmp/asyinst --enable-static --enable-texlive-build CXXFLAGS=-std=c++11 --disable-gsl --disable-fftw --disable-lsp - sed -i -e 's/^LIBS = /LIBS = -static-libgcc -static-libstdc++ /' Makefile - make -j2 - strip asy - cp asy ../../$arch. - ;; -esac - - - - - tar czvf texlive-bin-$arch.tar.gz $arch diff --git a/Build/source/.github/workflows/build-asy.yml b/Build/source/.github/workflows/build-asy.yml new file mode 100644 index 00000000000..08e7fab04b5 --- /dev/null +++ b/Build/source/.github/workflows/build-asy.yml @@ -0,0 +1,117 @@ +# $Id$ +# .github/workflows/build-asy.yml for texlive-source asy CI building +# +# Norbert Preining +# Public Domain +# +# See https://github.com/TeX-Live/texlive-source/actions for status. +# +# This file controls CI testing via Github Actions of the +# git-svn checkout of the TeX Live source directory +# which is pushed to Github at: +# https://github.com/TeX-Live/texlive-source +# +# The cron job that does the git svn up and git push is +# running on texlive.info; see norbert cron there. Run cmd as norbert: +# /home/norbert/git-svn-repos/git-svn-syncer --new texlive-source +# +# A build is started with every commit. If a commit happens while a +# build is running, somtimes the build is cancelled and a new one +# started, and other times the new build waits until the old one is +# complete? Seems mysterious. +# +# See tlpkg/bin/tl-update-bindir for retrieving the binaries, which is +# done only when a release is tagged, not from the +# commit-triggered builds here. + +# only build on push to trunk, not branch. +on: + release: + types: + - released + - prereleased + push: + branches: + - trunk + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build_job: + runs-on: ubuntu-latest + name: Build on ${{ matrix.tl_name }} + + strategy: + fail-fast: false + matrix: + # we need to list the archs here, otherwise the matrix contains only + # one element release_build and that is overwritten by the include statements + tl_name: [ i386-linux, x86_64-linux, aarch64-linux, armhf-linux ] + release_build: + - ${{ startsWith(github.ref, 'refs/tags/') }} + include: + - tl_name: i386-linux + image: i386/debian:buster + platform: 386 + ci_build: true + use_qemu: false + buildsys: ubuntu + - tl_name: x86_64-linux + image: debian:buster + platform: amd64 + ci_build: true + use_qemu: false + buildsys: ubuntu + - tl_name: aarch64-linux + image: arm64v8/debian:buster + platform: aarch64 + ci_build: false + use_qemu: true + qemu_arch: aarch64 + buildsys: debian + - tl_name: armhf-linux + image: arm32v7/debian:buster + platform: arm/v7 + ci_build: false + use_qemu: true + qemu_arch: arm + buildsys: debian + + steps: + - name: checkout-main + uses: actions/checkout@v4 + with: + path: 'repo' + - name: Setup QEMU + if: matrix.use_qemu + uses: docker/setup-qemu-action@v3 + with: + platforms: ${{ matrix.qemu_arch }} + - name: build + uses: addnab/docker-run-action@v3 + if: ${{ matrix.ci_build || matrix.release_build }} + with: + image: ${{ matrix.image }} + options: -v ${{ github.workspace }}:/work --platform linux/${{ matrix.platform }} + run: | + cd /work/repo + .github/scripts/build-asy.sh ${{ matrix.tl_name }} ${{ matrix.buildsys }} + - name: find file step + if: ${{ matrix.ci_build || matrix.release_build }} + run: ls -l $GITHUB_WORKSPACE/repo/asy-${{ matrix.tl_name }}.tar.gz + - name: save artifact + if: ${{ matrix.ci_build || matrix.release_build }} + uses: actions/upload-artifact@v4 + with: + name: asy-${{ matrix.tl_name }}.tar.gz + path: ${{ github.workspace }}/repo/asy-${{ matrix.tl_name }}.tar.gz + compression-level: 0 + - name: Release + uses: AButler/upload-release-assets@v3.0 + if: matrix.release_build + with: + files: ${{ github.workspace }}/repo/asy-${{ matrix.tl_name }}.tar.gz + repo-token: ${{ secrets.GITHUB_TOKEN }} + |