feat(ci): parameterize fedora version across pipeline
Add fedora_version to build, package, and publish matrices so the pipeline can target multiple Fedora releases in parallel. Force the dist tag via --define to ensure RPMs are stamped correctly regardless of build host. Update poll-upstream to check all fedora/flavour combinations before triggering a build. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,26 +23,32 @@ jobs:
|
||||
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
|
||||
echo "Upstream latest: ${tag}"
|
||||
|
||||
- name: Get published version from our repo
|
||||
- name: Check if all packages are published
|
||||
id: published
|
||||
run: |
|
||||
# Query our own dnf repo. If the version is there, we've already built it.
|
||||
# Strip leading 'v' because RPM versions don't use it.
|
||||
version="${UPSTREAM_TAG#v}"
|
||||
http_response_code=$(curl \
|
||||
--silent \
|
||||
--write-out "%{http_code}" \
|
||||
--output /dev/null \
|
||||
--head \
|
||||
--url "https://rpm.lair.cafe/fedora/43/x86_64/mistralrs-server-cuda13-${version}-1.fc43.x86_64.rpm")
|
||||
if [ "${http_response_code}" = "200" ]; then
|
||||
echo "already_built=true" >> "$GITHUB_OUTPUT"
|
||||
elif [ "${http_response_code}" = "404" ]; then
|
||||
echo "already_built=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "Unexpected HTTP response code: ${http_response_code}"
|
||||
exit 1
|
||||
fi
|
||||
needs_build=false
|
||||
for target in "43:cuda13"; do
|
||||
fedora_version="${target%%:*}"
|
||||
flavour="${target##*:}"
|
||||
url="https://rpm.lair.cafe/fedora/${fedora_version}/x86_64/mistralrs-server-${flavour}-${version}-1.fc${fedora_version}.x86_64.rpm"
|
||||
http_code=$(curl \
|
||||
--silent \
|
||||
--write-out "%{http_code}" \
|
||||
--output /dev/null \
|
||||
--head \
|
||||
--url "${url}")
|
||||
if [ "${http_code}" = "200" ]; then
|
||||
echo "found: ${url}"
|
||||
elif [ "${http_code}" = "404" ]; then
|
||||
echo "missing: ${url}"
|
||||
needs_build=true
|
||||
else
|
||||
echo "unexpected HTTP ${http_code} for ${url}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo "already_built=$( [ "${needs_build}" = "true" ] && echo false || echo true )" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
UPSTREAM_TAG: ${{ steps.upstream.outputs.tag }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user