|
| 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