diff options
-rwxr-xr-x | Build/source/.github/scripts/build-tl.sh | 156 | ||||
-rwxr-xr-x | Build/source/.github/scripts/install-deps.alpine.sh | 3 | ||||
-rwxr-xr-x | Build/source/.github/scripts/install-deps.bsd.sh | 3 | ||||
-rwxr-xr-x | Build/source/.github/scripts/install-deps.centos.sh | 4 | ||||
-rwxr-xr-x | Build/source/.github/scripts/install-deps.solaris.sh | 1 | ||||
-rwxr-xr-x | Build/source/.github/scripts/install-deps.ubuntu.sh | 6 | ||||
-rw-r--r-- | Build/source/.github/workflows/main.yml | 22 |
7 files changed, 114 insertions, 81 deletions
diff --git a/Build/source/.github/scripts/build-tl.sh b/Build/source/.github/scripts/build-tl.sh index b5f543bc7ef..b966800b216 100755 --- a/Build/source/.github/scripts/build-tl.sh +++ b/Build/source/.github/scripts/build-tl.sh @@ -2,65 +2,119 @@ set -e +if [ "x$2" = "x" ] +then + echo "Usage: `basename $0` arch buildsys [steps]" >&2 + exit 1 +fi + arch="$1" echo "Building TL for arch = $arch" +shift -destdir="$2" +buildsys=$1 +echo "Building on $buildsys" +shift -# 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 +STEPS=",$1," +shift +if [ "x$STEPS" = "x" ] + STEPS=",prepare,build," fi +destdir="$1" +shift -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" - ;; - *-solaris) - export CC="/path/to/gcc-5.5 -m64" - export CXX="/path/to/g++-5.5 -m64" - ;; -esac -export TL_MAKE_FLAGS +if [[ "$STEPS" == *,prepare,* ]] +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 + ;; + centos) + yum update -y + yum install -y centos-release-scl + yum install -y devtoolset-9 fontconfig-devel libX11-devel libXmu-devel libXaw-devel + ;; + alpine) + apk update + apk add --no-progress bash gcc g++ make perl fontconfig-dev libx11-dev libxmu-dev libxaw-dev + ;; + freebsd|netbsd) + pkg install gmake gcc pkgconf libX11 libXt libXaw fontconfig + ;; + solaris) + echo "Solaris support is WIP, please help!" >&2 + exit 1 + *) + echo "Unsupported build system: $buildsys" >&2 + exit 1 + esac -./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" + # 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 fi +if [[ "$STEPS" == *,build,* ]] +then + 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" + ;; + *-solaris) + export CC="/path/to/gcc-5.5 -m64" + export CXX="/path/to/g++-5.5 -m64" + ;; + *-freebsd) + export TL_MAKE=gmake + export CC=gcc + export CXX=g++ + export CFLAGS=-D_NETBSD_SOURCE + export CXXFLAGS='-D_NETBSD_SOURCE -std=c++11' + ;; + esac + export TL_MAKE_FLAGS + + ./Build -C $BUILDARGS + + mv inst/bin/* $arch + tar czvf texlive-bin-$arch.tar.gz $arch +fi diff --git a/Build/source/.github/scripts/install-deps.alpine.sh b/Build/source/.github/scripts/install-deps.alpine.sh deleted file mode 100755 index 6dc8d15b2a8..00000000000 --- a/Build/source/.github/scripts/install-deps.alpine.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -apk update -apk add --no-progress bash gcc g++ make perl fontconfig-dev libx11-dev libxmu-dev libxaw-dev diff --git a/Build/source/.github/scripts/install-deps.bsd.sh b/Build/source/.github/scripts/install-deps.bsd.sh deleted file mode 100755 index 28edbdc0074..00000000000 --- a/Build/source/.github/scripts/install-deps.bsd.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -#pkg install -y file -echo "TODO" diff --git a/Build/source/.github/scripts/install-deps.centos.sh b/Build/source/.github/scripts/install-deps.centos.sh deleted file mode 100755 index 10750155142..00000000000 --- a/Build/source/.github/scripts/install-deps.centos.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -yum update -y -yum install -y centos-release-scl -yum install -y devtoolset-9 fontconfig-devel libX11-devel libXmu-devel libXaw-devel diff --git a/Build/source/.github/scripts/install-deps.solaris.sh b/Build/source/.github/scripts/install-deps.solaris.sh deleted file mode 100755 index 563b2ed364b..00000000000 --- a/Build/source/.github/scripts/install-deps.solaris.sh +++ /dev/null @@ -1 +0,0 @@ -echo "TODO" diff --git a/Build/source/.github/scripts/install-deps.ubuntu.sh b/Build/source/.github/scripts/install-deps.ubuntu.sh deleted file mode 100755 index d741a2ddb91..00000000000 --- a/Build/source/.github/scripts/install-deps.ubuntu.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/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 diff --git a/Build/source/.github/workflows/main.yml b/Build/source/.github/workflows/main.yml index 049bdbc549e..4425f44a58b 100644 --- a/Build/source/.github/workflows/main.yml +++ b/Build/source/.github/workflows/main.yml @@ -57,28 +57,33 @@ jobs: platform: 386 ci_build: true use_qemu: false + buildsys: ubuntu - tl_name: x86_64-linux image: centos:7 platform: amd64 ci_build: true use_qemu: false + buildsys: centos - tl_name: x86_64-linuxmusl image: alpine:3.5 platform: amd64 ci_build: true use_qemu: false + buildsys: alpine - 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 @@ -98,13 +103,7 @@ jobs: 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 ;; - */debian:*) .github/scripts/install-deps.ubuntu.sh ;; - centos:*) .github/scripts/install-deps.centos.sh ;; - alpine:*) .github/scripts/install-deps.alpine.sh ;; - esac - .github/scripts/build-tl.sh ${{ matrix.tl_name }} + .github/scripts/build-tl.sh ${{ matrix.tl_name }} ${{ matrix.buildsys }} - name: find file step if: ${{ matrix.ci_build || matrix.release_build }} run: ls -l $GITHUB_WORKSPACE/repo/texlive-bin-${{ matrix.tl_name }}.tar.gz @@ -149,8 +148,7 @@ jobs: usesh: true run: | cd repo - sh .github/scripts/install-deps.bsd.sh - sh .github/scripts/build-tl.sh ${{ matrix.arch }}-${{ matrix.os }} + sh .github/scripts/build-tl.sh ${{ matrix.arch }}-${{ matrix.os }} ${{ matrix.os }} - name: build netbsd uses: vmactions/netbsd-vm@v1 if: ${{ matrix.os == 'netbsd' && (matrix.ci_build || matrix.release_build) }} @@ -158,8 +156,7 @@ jobs: usesh: true run: | cd repo - sh .github/scripts/install-deps.bsd.sh - sh .github/scripts/build-tl.sh ${{ matrix.arch }}-${{ matrix.os }} + sh .github/scripts/build-tl.sh ${{ matrix.arch }}-${{ matrix.os }} ${{ matrix.os }} - name: build solaris uses: vmactions/solaris-vm@v1 if: ${{ matrix.os == 'solaris' && (matrix.ci_build || matrix.release_build) }} @@ -167,8 +164,7 @@ jobs: usesh: true run: | cd repo - sh .github/scripts/install-deps.solaris.sh - sh .github/scripts/build-tl.sh ${{ matrix.arch }}-${{ matrix.os }} + sh .github/scripts/build-tl.sh ${{ matrix.arch }}-${{ matrix.os }} ${{ matrix.os }} - name: find file step if: ${{ matrix.ci_build || matrix.release_build }} run: ls -l $GITHUB_WORKSPACE/repo/texlive-bin-${{ matrix.arch }}-${{ matrix.os }}.tar.gz |