-
-
Notifications
You must be signed in to change notification settings - Fork 408
85 lines (72 loc) · 2.66 KB
/
bump-subproject-wraps.yml
File metadata and controls
85 lines (72 loc) · 2.66 KB
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
name: Bump Meson subprojects
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
bump_wraps:
name: "Bump Meson subprojects"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install meson
- name: Install the latest version of uv
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v6
with:
enable-cache: false
- name: Check for updates
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
uv run -s scripts/bump-subproject-wraps.py -m \
subprojects/curl.wrap \
subprojects/genconfig.wrap \
subprojects/glslang.wrap \
subprojects/imgui.wrap \
subprojects/implot.wrap \
subprojects/json.wrap \
subprojects/nv2a_vsh_cpu.wrap \
subprojects/sdl3.wrap \
subprojects/SPIRV-Reflect.wrap \
subprojects/tomlplusplus.wrap \
subprojects/volk.wrap \
subprojects/VulkanMemoryAllocator.wrap \
subprojects/xxhash.wrap \
> updated.json
- name: Create PRs for updates
env:
GH_TOKEN: ${{ secrets.XEMU_ROBOT_TOKEN }}
run: |
set -euo pipefail
git config user.name "xemu-robot"
git config user.email "robot@xemu.app"
jq -c '.[]' updated.json | while read -r item; do
path=$(echo "$item" | jq -r '.path')
file_basename=$(basename "$path")
name="${file_basename%%.*}"
owner=$(echo "$item" | jq -r '.owner')
repo=$(echo "$item" | jq -r '.repo')
old_rev=$(echo "$item" | jq -r '.old_rev')
new_rev=$(echo "$item" | jq -r '.new_rev')
new_tag=$(echo "$item" | jq -r '.new_tag')
echo "➤ Processing $name"
branch="sync/bump-${name//\//-}-${GITHUB_RUN_ID}"
git switch --quiet -c "$branch" origin/master
git add "$path"
git commit -m "meson: Bump ${name} to ${new_tag}"
git push -u origin "$branch"
gh pr create \
--title "meson: Bump ${name} to ${new_tag}" \
--body "Automatic bump of \`${name}\` to [${new_tag}](https://github.com/${owner}/${repo}/compare/${old_rev}..${new_rev})." \
--base master \
--label dependencies
done