Skip to content

Commit c5e6e1a

Browse files
authored
Merge pull request #8 from pollockjj/fix/build-wheels-dedup
fix(ci): publish from single build leg to avoid wheel content conflicts
2 parents 34db809 + 1868078 commit c5e6e1a

1 file changed

Lines changed: 3 additions & 19 deletions

File tree

.github/workflows/build-wheels.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -115,28 +115,12 @@ jobs:
115115
- name: Download artifacts
116116
uses: actions/download-artifact@v4
117117
with:
118-
pattern: dist-*
119-
merge-multiple: false
120-
path: downloaded
118+
name: dist-ubuntu-latest-py3.11
119+
path: dist
121120

122-
- name: Collect distributions
121+
- name: Verify distributions
123122
shell: bash
124123
run: |
125-
mkdir -p dist
126-
find downloaded -type f \( -name "*.whl" -o -name "*.tar.gz" \) -print0 | while IFS= read -r -d '' src; do
127-
base="$(basename "$src")"
128-
dest="dist/$base"
129-
if [ -e "$dest" ]; then
130-
# Deduplicate byte-identical files produced in multiple matrix legs.
131-
if cmp -s "$src" "$dest"; then
132-
continue
133-
fi
134-
echo "Conflicting distribution filename with different content: $base"
135-
exit 1
136-
fi
137-
cp "$src" "$dest"
138-
done
139-
140124
wheel_count="$(find dist -maxdepth 1 -type f -name '*.whl' | wc -l)"
141125
sdist_count="$(find dist -maxdepth 1 -type f -name '*.tar.gz' | wc -l)"
142126
if [ "$wheel_count" -eq 0 ] || [ "$sdist_count" -eq 0 ]; then

0 commit comments

Comments
 (0)