Skip to content

Commit f4b2081

Browse files
committed
Try to fix CI.
It's been quite a few years, and the CI is no longer working here. We need to do lots of little fixes to make things build again. Since then... * centos' mirrorlist has gone away entirely. * Prince 15.4.1 is now the latest 15.x version. * GitHub no longer supports running on Ubuntu 20.04. * 24.04 is now available for testing, we've dropped 18.04. * Linux Mint 22 is now available (dropping 18) * Debian 12 tested (10 no longer supported).
1 parent 50fa99e commit f4b2081

File tree

4 files changed

+68
-41
lines changed

4 files changed

+68
-41
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717

1818
jobs:
1919
test-examples:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-24.04
2121
container: ubuntu:20.04
2222
steps:
2323
- uses: actions/checkout@v3
@@ -31,22 +31,23 @@ jobs:
3131
export PRINCEXML_I_HAVE_A_LICENSE=1
3232
crosscompile/build-examples.sh
3333
34-
- uses: actions/upload-artifact@v3
34+
- uses: actions/upload-artifact@v4
3535
with:
3636
name: Test-Output
3737
path: test-output
3838

3939
# Tests for different platforms
4040
test-platforms:
41-
runs-on: ubuntu-20.04
41+
runs-on: ubuntu-24.04
4242
strategy:
43+
fail-fast: false
4344
matrix:
44-
os: ["ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.04", "centos:7", "centos:8", "debian:10", "linuxmintd/mint18-amd64", "linuxmintd/mint20-amd64"]
45+
os: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "centos:8", "debian:12", "linuxmintd/mint20-amd64", "linuxmintd/mint22-amd64"]
4546
#os: ["ubuntu:18.04"]
4647
container: ${{ matrix.os }}
4748
needs: test-examples # always run after the baseline tests
4849
steps:
49-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@v4
5051

5152
- name: Prerequisites for CentOS 8
5253
if: matrix.os == 'centos:8'
@@ -55,23 +56,31 @@ jobs:
5556
for i in /etc/yum.repos.d/* ; do sed -i 's/mirrorlist/#mirrorlist/' $i ; done
5657
for i in /etc/yum.repos.d/* ; do sed -i 's!#baseurl=http://mirror.!baseurl=http://vault.!' $i ; done
5758
59+
- name: Prerequisites for CentOS 7
60+
if: matrix.os == 'centos:7'
61+
run: |
62+
sed -i 's/mirror\.centos\.org/vault.centos.org/g' /etc/yum.repos.d/CentOS-*.repo
63+
sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/CentOS-*.repo
64+
sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/CentOS-*.repo
65+
5866
- name: Build examples
5967
run: |
68+
export PRINCEXML_I_HAVE_A_LICENSE=1
6069
crosscompile/build-examples.sh
6170
6271
test-riscos:
6372
# The type of runner that the job will run on
64-
runs-on: ubuntu-20.04
73+
runs-on: ubuntu-24.04
6574
needs: test-examples # always run after the baseline tests
6675

6776
# Steps represent a sequence of tasks that will be executed as part of the job
6877
steps:
6978
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
70-
- uses: actions/checkout@v3
79+
- uses: actions/checkout@v4
7180

7281
- name: Install required packages
7382
run: |
74-
sudo apt-get install -y python2 virtualenv
83+
sudo apt-get install -y python3 virtualenv
7584
7685
- name: Test through build.riscos.online
7786
run: |
@@ -93,10 +102,10 @@ jobs:
93102
# If it didn't report an error, the test was successful.
94103
95104
export-posix:
96-
runs-on: ubuntu-20.04
105+
runs-on: ubuntu-24.04
97106
needs: ["test-riscos", "test-platforms"]
98107
steps:
99-
- uses: actions/checkout@v3
108+
- uses: actions/checkout@v4
100109
with:
101110
fetch-depth: 0
102111

@@ -112,14 +121,14 @@ jobs:
112121
make cross_install ROTOOL_DIR=../artifacts
113122
../artifacts/riscos-prminxml --version
114123
115-
- uses: actions/upload-artifact@v3
124+
- uses: actions/upload-artifact@v4
116125
with:
117126
name: Tool-POSIX
118127
path: artifacts
119128

120129
export-riscos:
121130
# The type of runner that the job will run on
122-
runs-on: ubuntu-20.04
131+
runs-on: ubuntu-24.04
123132
needs: ["test-riscos", "test-platforms"]
124133

125134
outputs:
@@ -129,13 +138,13 @@ jobs:
129138
# Steps represent a sequence of tasks that will be executed as part of the job
130139
steps:
131140
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
132-
- uses: actions/checkout@v3
141+
- uses: actions/checkout@v4
133142
with:
134143
fetch-depth: 0
135144

136145
- name: Install required packages
137146
run: |
138-
sudo apt-get install -y python2 virtualenv
147+
sudo apt-get install -y python3 virtualenv
139148
140149
- name: Give the output a versioned name
141150
id: version
@@ -168,7 +177,7 @@ jobs:
168177

169178
steps:
170179
- name: Download built binary (RISC OS)
171-
uses: actions/download-artifact@v1
180+
uses: actions/download-artifact@v4
172181
with:
173182
name: Tool-RISCOS
174183

.gitlab-ci.yml

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,35 +39,43 @@ test-examples:
3939
stage: test
4040
script:
4141
# Build the examples first, as if it fails we'll then not upload the results.
42+
- apt-get update
43+
- export PRINCEXML_I_HAVE_A_LICENSE=1
4244
- crosscompile/build-examples.sh
4345
tags:
4446
- linux
4547

4648

4749
# A collection of tests for different platforms
48-
p:ubuntu-18.04:
49-
image: ubuntu:18.04
50+
p:ubuntu-20.04:
51+
image: ubuntu:20.04
5052
stage: platforms
5153
needs: ['test-examples']
5254
script:
55+
- apt-get update
56+
- export PRINCEXML_I_HAVE_A_LICENSE=1
5357
- crosscompile/build-examples.sh
5458
tags:
5559
- linux
5660

57-
p:ubuntu-20.04:
58-
image: ubuntu:20.04
61+
p:ubuntu-22.04:
62+
image: ubuntu:22.04
5963
stage: platforms
6064
needs: ['test-examples']
6165
script:
66+
- apt-get update
67+
- export PRINCEXML_I_HAVE_A_LICENSE=1
6268
- crosscompile/build-examples.sh
6369
tags:
6470
- linux
6571

66-
p:ubuntu-22.04:
67-
image: ubuntu:22.04
72+
p:ubuntu-24.04:
73+
image: ubuntu:24.04
6874
stage: platforms
6975
needs: ['test-examples']
7076
script:
77+
- apt-get update
78+
- export PRINCEXML_I_HAVE_A_LICENSE=1
7179
- crosscompile/build-examples.sh
7280
tags:
7381
- linux
@@ -77,6 +85,10 @@ p:centos-7:
7785
stage: platforms
7886
needs: ['test-examples']
7987
script:
88+
- sed -i 's/mirror\.centos\.org/vault.centos.org/g' /etc/yum.repos.d/CentOS-*.repo
89+
- sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/CentOS-*.repo
90+
- sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/CentOS-*.repo
91+
- export PRINCEXML_I_HAVE_A_LICENSE=1
8092
- crosscompile/build-examples.sh
8193
tags:
8294
- linux
@@ -90,24 +102,18 @@ p:centos-8:
90102
- for i in /etc/yum.repos.d/* ; do sed -i 's/mirrorlist/#mirrorlist/' $i ; done
91103
- for i in /etc/yum.repos.d/* ; do sed -i 's!#baseurl=http://mirror.!baseurl=http://vault.!' $i ; done
92104
- echo "Now building"
105+
- export PRINCEXML_I_HAVE_A_LICENSE=1
93106
- crosscompile/build-examples.sh
94107
tags:
95108
- linux
96109

97-
p:debian-10:
98-
image: debian:10
99-
stage: platforms
100-
needs: ['test-examples']
101-
script:
102-
- crosscompile/build-examples.sh
103-
tags:
104-
- linux
105-
106-
p:mint-18:
107-
image: linuxmintd/mint18-amd64
110+
p:debian-12:
111+
image: debian:12
108112
stage: platforms
109113
needs: ['test-examples']
110114
script:
115+
- apt-get update
116+
- export PRINCEXML_I_HAVE_A_LICENSE=1
111117
- crosscompile/build-examples.sh
112118
tags:
113119
- linux
@@ -117,15 +123,17 @@ p:mint-20:
117123
stage: platforms
118124
needs: ['test-examples']
119125
script:
126+
- export PRINCEXML_I_HAVE_A_LICENSE=1
120127
- crosscompile/build-examples.sh
121128
tags:
122129
- linux
123130

124-
p:mint-21:
125-
image: linuxmintd/mint20-amd64
131+
p:mint-22:
132+
image: linuxmintd/mint22-amd64
126133
stage: platforms
127134
needs: ['test-examples']
128135
script:
136+
- export PRINCEXML_I_HAVE_A_LICENSE=1
129137
- crosscompile/build-examples.sh
130138
tags:
131139
- linux

crosscompile/build-examples.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,18 @@
2020
# Supported operating systems:
2121
#
2222
# macOS
23-
# Ubuntu Linux (18.04, 20.04, 22.04)
23+
# Ubuntu Linux (20.04, 22.04, 24.04)
2424
# Centos (7 and 8)
25-
# Debian (10)
26-
# Linux Mint (18, 20, 21)
25+
# Centos 7 not tested on GitHub (Node no longer supported there)
26+
# Debian (12)
27+
# Linux Mint (20, 22)
2728
#
2829

2930
set -e
3031
set -o pipefail
3132

32-
PRINCE_VERSION=15.1
33+
PRINCE_VERSION=15.4.1
34+
PRINCE_BASE_VERSION=15.4
3335
SYSTEM="$(uname -s)"
3436

3537
if [[ "$SYSTEM" = 'Darwin' ]] ; then
@@ -237,22 +239,30 @@ if ! type -p prince >/dev/null 2>&1 && [[ "$PRINCEXML_I_HAVE_A_LICENSE" = 1 ]] ;
237239

238240
if [[ "$SYSTEM" = 'Linux' ]] ; then
239241
# We also seem to need some libraries to be installed (there's no binary so this will just install)
240-
install_package libtiff5
242+
if [[ "${DISTRO}" = 'ubuntu' && "$DISTRO_RELEASE" =~ 24 ]] || \
243+
[[ "${DISTRO}" = 'debian' && "$DISTRO_RELEASE" =~ 12 ]] ; then
244+
install_package libtiff6
245+
else
246+
install_package libtiff5
247+
fi
241248
install_package libgif7
242249
install_package libpng16-16
243250
install_package liblcms2-2
244251
install_package libcurl4
245252
install_package libfontconfig1
246253

247254
# Version 15 requires some other libraries as well
248-
if [[ "${PRINCE_VERSION%.*}" -ge "15" ]] ; then
255+
if [[ "${PRINCE_BASE_VERSION%.*}" -ge "15" ]] ; then
249256
if [[ "${DISTRO}" != 'centos' || "$DISTRO_RELEASE" != 7 ]] ; then
250257
install_package libwebpdemux2
251258
fi
252259
if [[ "${DISTRO}" = 'ubuntu' ]] ; then
253260
if [[ "$DISTRO_RELEASE" =~ 22 ]] ; then
254261
install_package libavif13
255262
fi
263+
if [[ "$DISTRO_RELEASE" =~ 24 ]] ; then
264+
install_package libavif16
265+
fi
256266
fi
257267
fi
258268
fi

crosscompile/setup-venv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ venv_key_actual="$([ -f "$venvdir/key" ] && cat "$venvdir/key" || true)"
1717
if [[ "${venv_key_actual}" != "${venv_key_expect}" ]] ; then
1818
echo rm -rf "${venvdir}"
1919

20-
virtualenv -p python2 "${venvdir}"
20+
virtualenv -p python3 "${venvdir}"
2121
source "${venvdir}/bin/activate"
2222
pip install 'rozipinfo>=1.0.43'
2323
echo "$venv_key_expect" > "$venvdir/key"

0 commit comments

Comments
 (0)