test
Some checks failed
Generate Map Previews for Switzerland25 Tournament / Full CI/CD Pipeline (push) Failing after 0s

This commit is contained in:
2025-09-16 22:34:52 +02:00
commit 270944fcc0
625 changed files with 965 additions and 0 deletions

127
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,127 @@
name: Generate Map Previews for Switzerland25 Tournament
on:
push:
paths:
- '.gitea/workflows/*'
- 'replays/**'
env:
DANSER_PATH: "/app/danser/danser-cli"
DANSER_DIR: "/app/danser"
DANSER_VIDEO_DIR: "/app/danser/videos"
DANSER_SKINS_DIR: "/app/danser/skins"
DANSER_MAPS_DIR: "/app/danser/songs"
SKINS_DIR: "${{ github.workspace }}/skins"
REPLAY_DIR: "${{ github.workspace }}/replays"
MAPS_DIR: "${{ github.workspace }}/maps"
OUTPUT_DIR: "${{ github.workspace }}/outputs"
TIMESTAMPS_JSON: "${{ github.workspace }}/.gitea/workflows/timestamps.json"
IMAGE_NAME: osc/skins-image
REGISTRY_URL: "https://${{ vars.CONTAINER_REGISTRY }}"
jobs:
generate_everything:
name: Full CI/CD Pipeline
runs-on: danser
container:
image: ${{ vars.CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
options: >-
--gpus all
--privileged
--security-opt seccomp=unconfined
--security-opt apparmor=unconfined
--cap-add=ALL
--env NVIDIA_DRIVER_CAPABILITIES=all
--env NVIDIA_VISIBLE_DEVICES=all
--user 0:0
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
tags: true
token: ${{ secrets.TOKEN }}
lfs: true
- name: Set XDG_RUNTIME_DIR
shell: bash
run: |
echo "Setting XDG_RUNTIME_DIR..."
mkdir -p /tmp/xdg_runtime_dir
chmod 0700 /tmp/xdg_runtime_dir
echo "XDG_RUNTIME_DIR=/tmp/xdg_runtime_dir" >> "$GITHUB_ENV"
echo "XDG_RUNTIME_DIR set."
- name: Move necessary files to Danser directory
shell: bash
run: |
mkdir -p "$DANSER_SKINS_DIR"
mv "$SKINS_DIR"/* "$DANSER_SKINS_DIR"
mkdir -p "$DANSER_MAPS_DIR"
find "$MAPS_DIR" -type f -name '*.osz' -exec mv -t "$DANSER_MAPS_DIR" {} +
- name: Generate Danser videos
shell: bash
run: |
JSON_FILE="$TIMESTAMPS_JSON"
mapfile -t REPLAYS < <(find "$REPLAY_DIR" -type f -name "*.osr")
[ ! -f "$JSON_FILE" ] && exit 0
for REPLAY in "${REPLAYS[@]}"; do
[ ! -f "$REPLAY" ] && continue
REPLAY_NAME=$(basename "$REPLAY" .osr)
STAGE="${REPLAY_NAME%%_*}" # take prefix before underscore
ENTRY=$(jq -c --arg name "$REPLAY_NAME" '
.[] | map(select(.name == $name)) | .[]' "$JSON_FILE")
if [ -z "$ENTRY" ]; then
continue
fi
DONE=$(echo "$ENTRY" | jq -r '.done')
if [ "$DONE" = "true" ]; then
continue
fi
START=$(echo "$ENTRY" | jq -r '.start')
END=$(echo "$ENTRY" | jq -r '.end')
OUT_VIDEO_DIR="$OUTPUT_DIR/$STAGE"
OUT_VIDEO_FILE="$OUT_VIDEO_DIR/$REPLAY_NAME.mp4"
mkdir -p "$OUT_VIDEO_DIR"
"$DANSER_DIR/danser-cli" \
-replay "$REPLAY" -record -skip -start=$START -skin="OSCT_2023" -end=$END -noupdatecheck \
-out="$REPLAY_NAME"
if [ -f "$DANSER_VIDEO_DIR/$REPLAY_NAME.mp4" ]; then
mv "$DANSER_VIDEO_DIR/$REPLAY_NAME.mp4" "$OUT_VIDEO_FILE"
tmp=$(mktemp)
jq --arg name "$REPLAY_NAME" '
(.. | objects | select(has("name")) | select(.name == $name))
|= (.done = true)' "$JSON_FILE" > "$tmp" && mv "$tmp" "$JSON_FILE"
fi
done
- name: Configure Git
shell: bash
run: |
git config user.email "arlind@sulej.ch"
git config user.name "ci-bot"
- name: Add and Commit changes
shell: bash
run: |
git config advice.addIgnoredFile false
git add .
git commit -m "[ci skip] push back from pipeline" -q || echo "No changes to commit"
- name: Push changes and create tag
shell: bash
run: git push origin main || echo "No changes to push"

View File

@@ -0,0 +1,70 @@
{
"QF": [
{ "name": "QF_FM1", "start": 0, "end": 0, "done": false },
{ "name": "QF_FM2", "start": 100, "end": 120, "done": false },
{ "name": "QF_FM3", "start": 0, "end": 0, "done": false },
{ "name": "QF_FM4", "start": 0, "end": 0, "done": false },
{ "name": "QF_FM5", "start": 0, "end": 0, "done": false },
{ "name": "QF_HD1", "start": 0, "end": 0, "done": false },
{ "name": "QF_HD2", "start": 0, "end": 0, "done": false },
{ "name": "QF_HR1", "start": 0, "end": 0, "done": false },
{ "name": "QF_HR2", "start": 0, "end": 0, "done": false },
{ "name": "QF_DT1", "start": 0, "end": 0, "done": false },
{ "name": "QF_DT2", "start": 0, "end": 0, "done": false },
{ "name": "QF_DT3", "start": 0, "end": 0, "done": false }
],
"Ro16": [
{ "name": "Ro16_FM1", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_FM2", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_FM3", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_FM4", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_FM5", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_FM6", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_HD1", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_HD2", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_HR1", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_DT1", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_DT2", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_DT3", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_EZ1", "start": 0, "end": 0, "done": false },
{ "name": "Ro16_TB1", "start": 0, "end": 0, "done": false }
],
"SF": [
{ "name": "SF_FM1", "start": 0, "end": 0, "done": false },
{ "name": "SF_FM2", "start": 0, "end": 0, "done": false },
{ "name": "SF_FM3", "start": 0, "end": 0, "done": false },
{ "name": "SF_FM4", "start": 0, "end": 0, "done": false },
{ "name": "SF_FM5", "start": 0, "end": 0, "done": false },
{ "name": "SF_FM6", "start": 0, "end": 0, "done": false },
{ "name": "SF_HD1", "start": 0, "end": 0, "done": false },
{ "name": "SF_HD2", "start": 0, "end": 0, "done": false },
{ "name": "SF_HR1", "start": 0, "end": 0, "done": false },
{ "name": "SF_HR2", "start": 0, "end": 0, "done": false },
{ "name": "SF_DT1", "start": 0, "end": 0, "done": false },
{ "name": "SF_DT2", "start": 0, "end": 0, "done": false },
{ "name": "SF_DT3", "start": 0, "end": 0, "done": false },
{ "name": "SF_DT4", "start": 0, "end": 0, "done": false },
{ "name": "SF_EZ1", "start": 0, "end": 0, "done": false },
{ "name": "SF_TB1", "start": 0, "end": 0, "done": false }
],
"GF": [
{ "name": "GF_FM1", "start": 0, "end": 0, "done": false },
{ "name": "GF_FM2", "start": 0, "end": 0, "done": false },
{ "name": "GF_FM3", "start": 0, "end": 0, "done": false },
{ "name": "GF_FM4", "start": 0, "end": 0, "done": false },
{ "name": "GF_FM5", "start": 0, "end": 0, "done": false },
{ "name": "GF_FM6", "start": 0, "end": 0, "done": false },
{ "name": "GF_FM7", "start": 0, "end": 0, "done": false },
{ "name": "GF_HD1", "start": 0, "end": 0, "done": false },
{ "name": "GF_HD2", "start": 0, "end": 0, "done": false },
{ "name": "GF_HR1", "start": 0, "end": 0, "done": false },
{ "name": "GF_HR2", "start": 0, "end": 0, "done": false },
{ "name": "GF_HR3", "start": 0, "end": 0, "done": false },
{ "name": "GF_DT1", "start": 0, "end": 0, "done": false },
{ "name": "GF_DT2", "start": 0, "end": 0, "done": false },
{ "name": "GF_DT3", "start": 0, "end": 0, "done": false },
{ "name": "GF_DT4", "start": 0, "end": 0, "done": false },
{ "name": "GF_EZ1", "start": 0, "end": 0, "done": false },
{ "name": "GF_TB1", "start": 0, "end": 0, "done": false }
]
}

0
maps/GF/.gitkeep Normal file
View File

0
maps/QF/.gitkeep Normal file
View File

BIN
maps/Ro16/Ro16_FM2.osz Normal file

Binary file not shown.

0
maps/SF/.gitkeep Normal file
View File

0
outputs/GF/.gitkeep Normal file
View File

0
outputs/QF/.gitkeep Normal file
View File

0
outputs/Ro16/.gitkeep Normal file
View File

0
outputs/SF/.gitkeep Normal file
View File

0
replays/GF/.gitkeep Normal file
View File

0
replays/QF/.gitkeep Normal file
View File

BIN
replays/Ro16/Ro16_FM2.osr Normal file

Binary file not shown.

0
replays/SF/.gitkeep Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Some files were not shown because too many files have changed in this diff Show More