-
Notifications
You must be signed in to change notification settings - Fork 3
86 lines (83 loc) · 2.78 KB
/
make_logos.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
name: Main
on:
push:
branches:
- "main"
pull_request:
jobs:
render:
runs-on: ubuntu-20.04
steps:
- name: Install inkscape
run: sudo add-apt-repository ppa:inkscape.dev/stable && sudo apt update && sudo apt-get install inkscape
- run: inkscape --version
- run: pip install svgutils
- name: Checkout
uses: actions/checkout@v4
- name: Run export
run: ./export.sh --universities --companies --studies --contest-package --background --transparent --output-directory out 64 256
- uses: actions/upload-artifact@v4
with:
name: logos
path: out
test:
needs: render
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: logos
path: out
# Thanks to Verwoerd
# https://github.com/Programming-Contest-Foundation/logo/blob/main/.github/workflows/main.yml
- name: Test in DJ
run: |
cd ${{ github.workspace }}
./.github/workflows/generate-metadata.sh
sudo apt update; sudo apt install cutycapt xvfb httpie -y
docker compose -f .github/workflows/domjudge/docker-compose.yml up -d mariadb
sleep 30s
docker compose -f .github/workflows/domjudge/docker-compose.yml up -d domjudge
sleep 1m
docker exec -w /tmp/icpc-logos domjudge-domjudge-1 /bin/bash -c "yes | import-contest"
xvfb-run --server-args="-screen 0, 1024x768x24" cutycapt --url=http://localhost:12345 --out=scoreboard.png
- uses: actions/upload-artifact@v4
with:
name: DJ_scoreboard
path: scoreboard.png
release:
needs: render
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: logos
path: out
- name: Zip logos
run: cd ${{ github.workspace }}/out; for i in */; do zip -r "${i%/}.zip" "$i"; done; cd ${{ github.workspace }}
- name: Zip contest package
run: |
cd ${{ github.workspace }}/out
rm contest-package.zip
cd contest-package
zip -r ../contest-package.zip *
cd ${{ github.workspace }}
- uses: actions/upload-artifact@v4
if: github.ref != 'refs/heads/main'
with:
name: zips
path: out/*.zip
- uses: "marvinpinto/action-automatic-releases@latest"
if: github.ref == 'refs/heads/main'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
files: |
${{ github.workspace }}/out/*.zip
${{ github.workspace }}/out/organizations.json