-
Notifications
You must be signed in to change notification settings - Fork 67
180 lines (171 loc) · 5.94 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# $Id$
# .github/workflows/main.yml for texlive-source 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, x86_64-linuxmusl, 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: debian
- tl_name: x86_64-linux
image: almalinux:8
platform: amd64
ci_build: true
use_qemu: false
buildsys: almalinux
- tl_name: x86_64-linuxmusl
image: alpine:3.12
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
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-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
- 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: AButler/[email protected]
if: matrix.release_build
with:
files: ${{ github.workspace }}/repo/texlive-bin-${{ matrix.tl_name }}.tar.gz
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, solaris ]
release_build:
- ${{ startsWith(github.ref, 'refs/tags/') }}
include:
- os: freebsd
ci_build: true
- os: solaris
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-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) }}
with:
usesh: true
release: '11.4-gcc'
run: |
cd repo
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
- name: save artifact
if: ${{ matrix.ci_build || matrix.release_build }}
uses: actions/upload-artifact@v4
with:
name: texlive-bin-${{ matrix.arch }}-${{ matrix.os }}.tar.gz
path: ${{ github.workspace }}/repo/texlive-bin-${{ matrix.arch }}-${{ matrix.os }}.tar.gz
compression-level: 0
- name: Release
uses: AButler/[email protected]
if: matrix.release_build
with:
files: ${{ github.workspace }}/repo/texlive-bin-${{ matrix.arch }}-${{ matrix.os }}.tar.gz
repo-token: ${{ secrets.GITHUB_TOKEN }}