Skip to content

Commit 45c8287

Browse files
committed
Test unofficial tarball when new tags are pushed
This so we can always test that the final tarball as currently pushed at domjudge.org passes some basic tests. We had this as manual job on GitLab in a slightly different form but making sure this is done explicit is a good thing IMO. The next step would be to do this for every push to main so before a new tag is pushed we know that all simple steps which we don't use ourselves do work.
1 parent d4f8c86 commit 45c8287

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: 'Build example tarball'
2+
3+
on:
4+
push:
5+
tags:
6+
- '[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
create-unofficial-tarball:
10+
if: github.repository == 'domjudge/domjudge'
11+
name: Build example tarball (Unofficial)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Download release script
17+
run: wget https://raw.githubusercontent.com/DOMjudge/domjudge-scripts/main/make_release.sh
18+
19+
- name: Bring apt in a good state
20+
run: sudo apt update
21+
22+
- name: Install development needed packages
23+
run: |
24+
sudo apt install -y autoconf automake bats \
25+
python3-sphinx python3-sphinx-rtd-theme rst2pdf fontconfig python3-yaml \
26+
latexmk texlive-latex-recommended texlive-latex-extra tex-gyre
27+
28+
- name: Create release tarball
29+
run: |
30+
sh ./make_release.sh ${{ github.ref_name }}
31+
32+
- name: Install our new version dependencies
33+
run: |
34+
sudo apt install -y acl zip unzip mariadb-server apache2 php php-fpm php-gd php-cli php-intl php-mbstring \
35+
php-mysql php-curl php-json php-xml php-zip composer ntp \
36+
make pkg-config sudo debootstrap libcgroup-dev php-cli php-curl php-json php-xml \
37+
php-zip lsof procps
38+
39+
- name: Unpack the tarball again
40+
run: |
41+
for directory in build all docs domserver judgehost; do
42+
mkdir /tmp/${directory}
43+
tar zxvf domjudge-${{ github.ref_name }}.tar.gz --directory /tmp/${directory}
44+
done
45+
46+
- name: Configure and install in default setting
47+
run: |
48+
for directory in build all docs domserver judgehost; do
49+
cd /tmp/${directory}/domjudge-${{ github.ref_name }}
50+
./configure
51+
make ${directory}
52+
if [ "$directory" != "docs" ] && [ "$directory" != "judgehost" ]; then
53+
sudo make install-domserver
54+
fi
55+
if [ "$directory" != "docs" ] && [ "$directory" != "domserver" ]; then
56+
sudo make install-judgehost
57+
fi
58+
if [ "$directory" = "docs" ] || [ "$directory" = "all" ]; then
59+
sudo make install-docs
60+
fi
61+
make clean
62+
make distclean
63+
done
64+
65+
- name: "See the new_release_howto.txt (L28/domjudge-scripts) for the next step."
66+
run: true
67+
68+
- uses: actions/upload-artifact@v4
69+
with:
70+
name: unofficial-tarball-${{ github.ref_name }}
71+
path: domjudge-${{ github.ref_name }}.tar.gz
72+
retention-days: 2
73+

0 commit comments

Comments
 (0)