# $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 workflow_dispatch: # 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 ] 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 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 }} - name: save artifact if: ${{ matrix.ci_build || matrix.release_build }} uses: actions/upload-artifact@v4 with: name: asy-${{ matrix.tl_name }} path: ${{ github.workspace }}/repo/asy-${{ matrix.tl_name }} 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 }} repo-token: ${{ secrets.GITHUB_TOKEN }} vm_build_job: runs-on: ubuntu-latest name: Build on ${{ matrix.arch }}-${{ matrix.os }} strategy: fail-fast: false matrix: arch: [ i386, amd64 ] os: [ freebsd ] release_build: - ${{ startsWith(github.ref, 'refs/tags/') }} include: - os: freebsd ci_build: true steps: - name: checkout-main uses: actions/checkout@v4 with: path: 'repo' - name: build freebsd uses: vmactions/freebsd-vm@v1 if: ${{ matrix.os == 'freebsd' && (matrix.ci_build || matrix.release_build) }} with: release: '13.2' usesh: true run: | cd repo sh .github/scripts/build-asy.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) }} with: usesh: true release: '11.4-gcc' run: | cd repo sh .github/scripts/build-asy.sh ${{ matrix.arch }}-${{ matrix.os }} ${{ matrix.os }} - name: find file step if: ${{ matrix.ci_build || matrix.release_build }} run: ls -l $GITHUB_WORKSPACE/repo/asy-${{ matrix.arch }}-${{ matrix.os }} - name: save artifact if: ${{ matrix.ci_build || matrix.release_build }} uses: actions/upload-artifact@v4 with: name: asy-${{ matrix.arch }}-${{ matrix.os }} path: ${{ github.workspace }}/repo/asy-${{ matrix.arch }}-${{ matrix.os }} compression-level: 0 - name: Release uses: AButler/upload-release-assets@v3.0 if: matrix.release_build with: files: ${{ github.workspace }}/repo/asy-${{ matrix.arch }}-${{ matrix.os }} repo-token: ${{ secrets.GITHUB_TOKEN }}