Repository navigation
186 lines (158 loc) · 4.9 KB
/
Copy pathupdate.yml
File metadata and controls
186 lines (158 loc) · 4.9 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
name: Update Orca
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v6
- name: Get the latest Orca release
id: release
shell: bash
run: |
set -euo pipefail
version=$(
curl -fsSL https://download.gnome.org/sources/orca/cache.json |
jq -r '
.[2].orca[]
| select(test("^[0-9]+\\.[0-9]+(\\.[0-9]+)?$"))
' |
sort -V |
tail -1
)
if [ -z "$version" ]; then
echo "Could not determine latest Orca release"
exit 1
fi
series="${version%.*}"
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "series=$series" >> "$GITHUB_OUTPUT"
echo "url=https://download.gnome.org/sources/orca/${series}/orca-${version}.tar.xz" >> "$GITHUB_OUTPUT"
- name: Skip if already current
id: current
shell: bash
run: |
set -euo pipefail
if [ -f version.txt ]; then
current="$(cat version.txt)"
else
current=""
fi
if [ "$current" = "${{ steps.release.outputs.version }}" ]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
fi
- name: Install build dependencies
if: steps.current.outputs.skip != 'true'
run: |
sudo apt-get update
sudo apt-get install -y \
at-spi2-core \
cargo \
dbus \
dbus-x11 \
dconf-cli \
gettext \
git \
itstool \
libatk1.0-0 \
libei-dev \
libglib2.0-bin \
libglib2.0-dev \
gobject-introspection \
libgirepository-2.0-dev \
libgtk-3-dev \
libtool \
libxi-dev \
libxtst-dev \
libxkbcommon-dev \
libxml2-dev \
libx11-dev \
libyelp-dev \
meson \
ninja-build \
orca \
pulseaudio \
python-gi-dev \
python3 \
python3-brlapi \
python3-dasbus \
python3-gi \
python3-louis \
python3-lxml \
python3-pip \
python3-psutil \
python3-speechd \
speech-dispatcher \
speech-dispatcher-espeak-ng \
xvfb \
yelp-tools
- name: Download Orca
if: steps.current.outputs.skip != 'true'
run: |
curl -fsSL \
"${{ steps.release.outputs.url }}" \
-o orca.tar.xz
- name: Build and install Orca
if: steps.current.outputs.skip != 'true'
shell: bash
run: |
set -euo pipefail
rm -rf orca _build source
mkdir source
tar \
--extract \
--file orca.tar.xz \
--strip-components=1 \
--directory source
meson setup \
_build \
source \
--prefix="$GITHUB_WORKSPACE/orca"
meson compile -C _build
meson install -C _build
- name: Make the build relocatable
if: steps.current.outputs.skip != 'true'
shell: bash
run: |
set -euo pipefail
python3 ./makeRelocatable.py "$GITHUB_WORKSPACE/orca"
- name: Create guidepup.ini settings file
if: steps.current.outputs.skip != 'true'
shell: bash
run: |
set -euo pipefail
./createSettingsIni.sh
- name: Cleanup
if: steps.current.outputs.skip != 'true'
shell: bash
run: |
set -euo pipefail
rm -rf source
rm -rf orca.tar.xz
- name: Record version
if: steps.current.outputs.skip != 'true'
shell: bash
run: |
echo "${{ steps.release.outputs.version }}" > version.txt
- name: Commit and create PR
if: steps.current.outputs.skip != 'true'
uses: peter-evans/create-pull-request@v8
with:
commit-message: "feat: update Orca to ${{ steps.release.outputs.version }}"
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
branch: orca-${{ steps.release.outputs.version }}
delete-branch: true
title: Update Orca to ${{ steps.release.outputs.version }}
body: |
Automated update.
Upstream release:
https://download.gnome.org/sources/orca/${{ steps.release.outputs.series }}/orca-${{ steps.release.outputs.version }}.tar.xz
assignees: cmorten
reviewers: cmorten
draft: false