Skip to content

Commit 7fbf5c1

Browse files
committed
Create tarball when new pushes to main
This so we can always test that the latest version before a tag can be released. We already had this in the domjudge-packaging but IMO it makes more sense to have this available on GitHub so we can point issue reporters to a potential fix for their issue.
1 parent d4f8c86 commit 7fbf5c1

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: 'Build example tarball'
2+
3+
on:
4+
push:
5+
branches: main
6+
7+
jobs:
8+
create-unofficial-tarball:
9+
if: github.repository == 'domjudge/domjudge'
10+
name: Build example tarball (Unofficial)
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Download our release script
16+
run: wget https://raw.githubusercontent.com/DOMjudge/domjudge-scripts/main/make_release.sh
17+
18+
- name: Release a fake version
19+
id: version
20+
run: |
21+
DOMJUDGE_VERSION="$(cat README* | head -n 10 | grep ' version ' | sed 's/.*version //')"
22+
NEW_VERSION=${DOMJUDGE_VERSION//DEV}
23+
cp README.md{,.stashed}; cp ChangeLog{,.stashed}
24+
for file in README.md ChangeLog; do
25+
sed -i "s/${DOMJUDGE_VERSION}/${NEW_VERSION}/g" $file
26+
done
27+
echo "DOMJUDGE_VERSION=${DOMJUDGE_VERSION}" >> "$GITHUB_OUTPUT"
28+
sh ./make_release.sh $DOMJUDGE_VERSION
29+
mv domjudge-{$NEW_VERSION,$DOMJUDGE_VERSION}.tar.gz
30+
31+
- name: Install our new version dependencies
32+
run: |
33+
apt update
34+
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: tar zxvf domjudge-${{ version.outputs.DOMJUDGE_VERSION }}.tar.gz
41+
42+
- name: Configure and install in default setting
43+
run: |
44+
./configure
45+
make build
46+
make clean
47+
make all
48+
make clean
49+
make docs
50+
make clean
51+
52+
- name: "See the new_release_howto.txt (L28/domjudge-scripts) for the next step."
53+
run: true
54+
55+
- uses: actions/upload-artifact@v4
56+
with:
57+
name: unofficial-tarball-${{ version.outputs.DOMJUDGE_VERSION }}
58+
path: domjudge-${{ version.outputs.DOMJUDGE_VERSION }}.tar.gz
59+

0 commit comments

Comments
 (0)