Skip to content

Commit b21934a

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 b21934a

File tree

4 files changed

+48
-40
lines changed

4 files changed

+48
-40
lines changed

.github/workflows/ci.yml

Lines changed: 22 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,22 @@ 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:
4343
matrix:
44-
os: ["ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.04", "centos:7", "centos:8", "debian:10", "linuxmintd/mint18-amd64", "linuxmintd/mint20-amd64"]
44+
os: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "centos:8", "debian:12", "linuxmintd/mint20-amd64", "linuxmintd/mint22-amd64"]
4545
#os: ["ubuntu:18.04"]
4646
container: ${{ matrix.os }}
4747
needs: test-examples # always run after the baseline tests
4848
steps:
49-
- uses: actions/checkout@v3
49+
- uses: actions/checkout@v4
5050

5151
- name: Prerequisites for CentOS 8
5252
if: matrix.os == 'centos:8'
@@ -55,23 +55,30 @@ jobs:
5555
for i in /etc/yum.repos.d/* ; do sed -i 's/mirrorlist/#mirrorlist/' $i ; done
5656
for i in /etc/yum.repos.d/* ; do sed -i 's!#baseurl=http://mirror.!baseurl=http://vault.!' $i ; done
5757
58+
- name: Prerequisites for CentOS 7
59+
if: matrix.os == 'centos:7'
60+
run: |
61+
sed -i 's/mirror\.centos\.org/vault.centos.org/g' /etc/yum.repos.d/CentOS-*.repo
62+
sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/CentOS-*.repo
63+
sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/CentOS-*.repo
64+
5865
- name: Build examples
5966
run: |
6067
crosscompile/build-examples.sh
6168
6269
test-riscos:
6370
# The type of runner that the job will run on
64-
runs-on: ubuntu-20.04
71+
runs-on: ubuntu-24.04
6572
needs: test-examples # always run after the baseline tests
6673

6774
# Steps represent a sequence of tasks that will be executed as part of the job
6875
steps:
6976
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
70-
- uses: actions/checkout@v3
77+
- uses: actions/checkout@v4
7178

7279
- name: Install required packages
7380
run: |
74-
sudo apt-get install -y python2 virtualenv
81+
sudo apt-get install -y python3 virtualenv
7582
7683
- name: Test through build.riscos.online
7784
run: |
@@ -93,10 +100,10 @@ jobs:
93100
# If it didn't report an error, the test was successful.
94101
95102
export-posix:
96-
runs-on: ubuntu-20.04
103+
runs-on: ubuntu-24.04
97104
needs: ["test-riscos", "test-platforms"]
98105
steps:
99-
- uses: actions/checkout@v3
106+
- uses: actions/checkout@v4
100107
with:
101108
fetch-depth: 0
102109

@@ -112,14 +119,14 @@ jobs:
112119
make cross_install ROTOOL_DIR=../artifacts
113120
../artifacts/riscos-prminxml --version
114121
115-
- uses: actions/upload-artifact@v3
122+
- uses: actions/upload-artifact@v4
116123
with:
117124
name: Tool-POSIX
118125
path: artifacts
119126

120127
export-riscos:
121128
# The type of runner that the job will run on
122-
runs-on: ubuntu-20.04
129+
runs-on: ubuntu-24.04
123130
needs: ["test-riscos", "test-platforms"]
124131

125132
outputs:
@@ -129,13 +136,13 @@ jobs:
129136
# Steps represent a sequence of tasks that will be executed as part of the job
130137
steps:
131138
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
132-
- uses: actions/checkout@v3
139+
- uses: actions/checkout@v4
133140
with:
134141
fetch-depth: 0
135142

136143
- name: Install required packages
137144
run: |
138-
sudo apt-get install -y python2 virtualenv
145+
sudo apt-get install -y python3 virtualenv
139146
140147
- name: Give the output a versioned name
141148
id: version
@@ -168,7 +175,7 @@ jobs:
168175

169176
steps:
170177
- name: Download built binary (RISC OS)
171-
uses: actions/download-artifact@v1
178+
uses: actions/download-artifact@v4
172179
with:
173180
name: Tool-RISCOS
174181

.gitlab-ci.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,35 +39,39 @@ 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
4243
- crosscompile/build-examples.sh
4344
tags:
4445
- linux
4546

4647

4748
# A collection of tests for different platforms
48-
p:ubuntu-18.04:
49-
image: ubuntu:18.04
49+
p:ubuntu-20.04:
50+
image: ubuntu:20.04
5051
stage: platforms
5152
needs: ['test-examples']
5253
script:
54+
- apt-get update
5355
- crosscompile/build-examples.sh
5456
tags:
5557
- linux
5658

57-
p:ubuntu-20.04:
58-
image: ubuntu:20.04
59+
p:ubuntu-22.04:
60+
image: ubuntu:22.04
5961
stage: platforms
6062
needs: ['test-examples']
6163
script:
64+
- apt-get update
6265
- crosscompile/build-examples.sh
6366
tags:
6467
- linux
6568

66-
p:ubuntu-22.04:
67-
image: ubuntu:22.04
69+
p:ubuntu-24.04:
70+
image: ubuntu:24.04
6871
stage: platforms
6972
needs: ['test-examples']
7073
script:
74+
- apt-get update
7175
- crosscompile/build-examples.sh
7276
tags:
7377
- linux
@@ -77,6 +81,9 @@ p:centos-7:
7781
stage: platforms
7882
needs: ['test-examples']
7983
script:
84+
- sed -i 's/mirror\.centos\.org/vault.centos.org/g' /etc/yum.repos.d/CentOS-*.repo
85+
- sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/CentOS-*.repo
86+
- sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/CentOS-*.repo
8087
- crosscompile/build-examples.sh
8188
tags:
8289
- linux
@@ -94,20 +101,12 @@ p:centos-8:
94101
tags:
95102
- linux
96103

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
104+
p:debian-12:
105+
image: debian:12
108106
stage: platforms
109107
needs: ['test-examples']
110108
script:
109+
- apt-get update
111110
- crosscompile/build-examples.sh
112111
tags:
113112
- linux
@@ -121,8 +120,8 @@ p:mint-20:
121120
tags:
122121
- linux
123122

124-
p:mint-21:
125-
image: linuxmintd/mint20-amd64
123+
p:mint-22:
124+
image: linuxmintd/mint22-amd64
126125
stage: platforms
127126
needs: ['test-examples']
128127
script:

crosscompile/build-examples.sh

Lines changed: 7 additions & 5 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
@@ -245,7 +247,7 @@ if ! type -p prince >/dev/null 2>&1 && [[ "$PRINCEXML_I_HAVE_A_LICENSE" = 1 ]] ;
245247
install_package libfontconfig1
246248

247249
# Version 15 requires some other libraries as well
248-
if [[ "${PRINCE_VERSION%.*}" -ge "15" ]] ; then
250+
if [[ "${PRINCE_BASE_VERSION%.*}" -ge "15" ]] ; then
249251
if [[ "${DISTRO}" != 'centos' || "$DISTRO_RELEASE" != 7 ]] ; then
250252
install_package libwebpdemux2
251253
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)