bsd trial #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/main.yml for texlive-source CI building | |
# | |
# Norbert Preining | |
# Public Domain | |
# | |
# This file controls CI testing via Github Actions of the | |
# git-svn checkout of the TeX Live source directory | |
# which is pushed to Github | |
# 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 | |
# | |
# To make and retrieve new binaries: | |
# * go to https://github.com/TeX-Live/texlive-source/commits/master | |
# and check that all commits you want are there (max waiting time 30min). | |
# * go to https://github.com/TeX-Live/texlive-source/releases | |
# and "Draft new release" (does git tag). | |
# * wait 30min or so. | |
# * go to https://github.com/TeX-Live/texlive-source/releases/latest/ | |
# and there should be binaries for the new "release". | |
# * use tl-update-bindir. | |
# | |
# The actual code for building and running is in the Github Action | |
# TeX-Live/tl-build-docker-action | |
# | |
# TODO | |
# * it would be nice if we could adjust the docker action usage | |
# to override the dockerfile but this seems not to be possible at the moment | |
on: [push] | |
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, x86_64-linuxmusl, aarch64-linux, armhf-linux ] | |
release_build: | |
- ${{ startsWith(github.ref, 'refs/tags/') }} | |
include: | |
- tl_name: i386-linux | |
image: i386/ubuntu:xenial | |
platform: 386 | |
ci_build: true | |
use_qemu: false | |
- tl_name: x86_64-linux | |
image: centos:7 | |
platform: amd64 | |
ci_build: true | |
use_qemu: false | |
- tl_name: x86_64-linuxmusl | |
image: alpine:3.5 | |
platform: amd64 | |
ci_build: true | |
use_qemu: false | |
- tl_name: aarch64-linux | |
image: arm64v8/debian:buster | |
platform: aarch64 | |
ci_build: false | |
use_qemu: true | |
qemu_arch: aarch64 | |
- tl_name: armhf-linux | |
image: arm32v7/debian:buster | |
platform: arm/v7 | |
ci_build: false | |
use_qemu: true | |
qemu_arch: arm | |
steps: | |
- name: checkout-main | |
uses: actions/checkout@v4 | |
with: | |
path: 'repo' | |
- name: Setup QEMU | |
if: matrix.use_qemu | |
uses: docker/setup-qemu-action@v2 | |
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 | |
case "${{ matrix.image }}" in | |
i386/ubuntu:*) echo .github/scripts/install-deps.ubuntu.sh ;; | |
centos:*) echo .github/scripts/install-deps.centos.sh ;; | |
alpine:*) echo .github/scripts/install-deps.alpine.sh ;; | |
esac | |
.github/scripts/build-tl.sh ${{ matrix.tl_name }} | |
- name: find file step | |
if: ${{ matrix.ci_build || matrix.release_build }} | |
run: ls -l $GITHUB_WORKSPACE/repo/texlive-bin-${{ matrix.tl_name }}.tar.gz | |
- name: save artifact | |
if: ${{ matrix.ci_build || matrix.release_build }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: texlive-bin-${{ matrix.tl_name }}.tar.gz | |
path: ${{ github.workspace }}/repo/texlive-bin-${{ matrix.tl_name }}.tar.gz | |
compression-level: 0 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: matrix.release_build | |
with: | |
files: $GITHUB_WORKSPACE/repo/texlive-bin-${{ matrix.tl_name }}.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
bsd_build_job: | |
runs-on: ubuntu-latest | |
name: Build on ${{ matrix.arch }}-${{ matrix.bsd }} | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [ i386, amd64 ] | |
bsd: [ freebsd, netbsd ] | |
ci_build: [ true ] | |
release_build: | |
- ${{ startsWith(github.ref, 'refs/tags/') }} | |
steps: | |
- name: checkout-main | |
uses: actions/checkout@v4 | |
with: | |
path: 'repo' | |
- name: build | |
uses: vmactions/freebsd-vm@v1 | |
if: matrix.bsd == 'freebsd' | |
with: | |
usesh: true | |
run: | | |
cd /work/repo | |
github/scripts/install-deps.bsd.sh | |
.github/scripts/build-tl.sh ${{ matrix.arch }}-${{ matrix.bsd }} | |
- name: build | |
uses: vmactions/netbsd-vm@v1 | |
if: matrix.bsd == 'netbsd' | |
with: | |
usesh: true | |
run: | | |
cd /work/repo | |
github/scripts/install-deps.bsd.sh | |
.github/scripts/build-tl.sh ${{ matrix.arch }}-${{ matrix.bsd }} | |
- name: find file step | |
if: ${{ matrix.ci_build || matrix.release_build }} | |
run: ls -l $GITHUB_WORKSPACE/repo/texlive-bin-${{ matrix.arch }}-${{ matrix.bsd }}.tar.gz | |
- name: save artifact | |
if: ${{ matrix.ci_build || matrix.release_build }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: texlive-bin-${{ matrix.arch }}-${{ matrix.bsd }}.tar.gz | |
path: ${{ github.workspace }}/repo/texlive-bin-${{ matrix.arch }}-${{ matrix.bsd }}.tar.gz | |
compression-level: 0 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: matrix.release_build | |
with: | |
files: $GITHUB_WORKSPACE/repo/texlive-bin-${{ matrix.arch }}-${{ matrix.bsd }}.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |