Skip to content

Commit 02eb99c

Browse files
committed
ci: fix Debian publish checks
1 parent a1e9778 commit 02eb99c

3 files changed

Lines changed: 19 additions & 34 deletions

File tree

.github/workflows/cleanup-workflows.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ jobs:
129129
local id="$1"
130130
local cursor="$2"
131131
132+
# shellcheck disable=SC2016 # GraphQL variables use $, not shell expansion.
132133
gh api graphql -F workflowId="$id" -F after="$cursor" \
133134
-f query='query($workflowId: ID!, $after: String) {
134135
node(id: $workflowId) {
@@ -151,22 +152,31 @@ jobs:
151152
widths_name=30
152153
widths_count=14
153154
widths_total=12
154-
widths_table=$(( $widths_index + 3 + $widths_name + 3 + $widths_count + 3 + $widths_total ))
155+
widths_table=$((widths_index + 3 + widths_name + 3 + widths_count + 3 + widths_total))
155156
156157
# Repeats a character a given number of times.
157158
repeat_char() {
158159
local char=$1
159160
local count=$2
160-
printf "%0.s$char" $(seq 1 $count)
161+
local i
162+
163+
for ((i = 0; i < count; i++)); do
164+
printf "%s" "$char"
165+
done
161166
}
162167
163168
# Prints the given header as `==== <header> ====` to match the table layout.
164169
print_table_header() {
165170
local header="$1"
166171
local header_len=${#header}
167-
local left_pad=$(( ( $widths_table - header_len - 2) / 2 ))
168-
local right_pad=$(( $widths_table - header_len - 2 - left_pad ))
169-
printf " \n%s %s %s\n" $(repeat_char = $left_pad) "$header" $(repeat_char = $right_pad)
172+
local left_pad=$(((widths_table - header_len - 2) / 2))
173+
local right_pad=$((widths_table - header_len - 2 - left_pad))
174+
local left_fill
175+
local right_fill
176+
177+
left_fill=$(repeat_char "=" "$left_pad")
178+
right_fill=$(repeat_char "=" "$right_pad")
179+
printf " \n%s %s %s\n" "$left_fill" "$header" "$right_fill"
170180
}
171181
172182
# Prints |---+---+---+---| with appropriate widths to accomodate the table headers.
@@ -251,9 +261,9 @@ jobs:
251261
print_table_row "[$index/$n_workflows]" "$name" "$count" "$total"
252262
253263
if [ "$MODE" = "execute" ]; then
254-
for run_id in $run_ids; do
264+
while IFS= read -r run_id; do
255265
gh run delete "$run_id" >/dev/null
256-
done
266+
done <<< "$run_ids"
257267
fi
258268
259269
[ "$has_next" != "true" ] && break

.github/workflows/publish-debian-all.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -72,32 +72,6 @@ jobs:
7272
crate: miden-remote-prover
7373
arch: ${{ matrix.arch }}
7474

75-
publish-prover-proxy:
76-
name: Publish Prover Proxy ${{ matrix.arch }} Debian
77-
permissions:
78-
contents: write
79-
strategy:
80-
matrix:
81-
arch: [amd64, arm64]
82-
runs-on:
83-
labels: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
84-
steps:
85-
- name: Checkout repo
86-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
87-
with:
88-
fetch-depth: 0
89-
persist-credentials: false
90-
- name: Build and Publish Prover Proxy
91-
uses: ./.github/actions/debian
92-
with:
93-
github_token: ${{ secrets.GITHUB_TOKEN }}
94-
gitref: ${{ env.version }}
95-
crate_dir: remote-prover
96-
package: miden-prover-proxy
97-
packaging_dir: prover-proxy
98-
crate: miden-remote-prover
99-
arch: ${{ matrix.arch }}
100-
10175
publish-network-monitor:
10276
name: Publish Network Monitor ${{ matrix.arch }} Debian
10377
permissions:

crates/proto/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ fn rustfmt_generated(dir: &Path) -> miette::Result<()> {
8181
return Ok(());
8282
}
8383

84-
let status = match Command::new("rustfmt").args(&rs_files).status() {
84+
let status = match Command::new("rustfmt").args(["--edition", "2024"]).args(&rs_files).status()
85+
{
8586
Err(e) if e.kind() == ErrorKind::NotFound => {
8687
// rustfmt is not installed, skip without an error
8788
ExitStatus::default()

0 commit comments

Comments
 (0)