Compare commits
2 Commits
4160334bf1
...
f4e1008684
| Author | SHA1 | Date | |
|---|---|---|---|
|
f4e1008684
|
|||
|
0cb6a4f524
|
@@ -19,7 +19,10 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: cuda13
|
- name: cuda13
|
||||||
runner: cuda-13.0
|
fedora_version: "43"
|
||||||
|
runner:
|
||||||
|
- cuda-13.0
|
||||||
|
- fedora-workstation-43
|
||||||
cuda_home: /usr/local/cuda-13.0
|
cuda_home: /usr/local/cuda-13.0
|
||||||
cargo_features: "cuda cudnn flash-attn nccl"
|
cargo_features: "cuda cudnn flash-attn nccl"
|
||||||
compute_caps: "120"
|
compute_caps: "120"
|
||||||
@@ -66,7 +69,7 @@ jobs:
|
|||||||
- name: Upload binary artifact
|
- name: Upload binary artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: mistralrs-server-${{ matrix.name }}
|
name: mistralrs-server-${{ matrix.name }}-fc${{ matrix.fedora_version }}
|
||||||
path: artifacts/mistralrs-server-${{ matrix.name }}
|
path: artifacts/mistralrs-server-${{ matrix.name }}
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
@@ -78,13 +81,14 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: cuda13
|
- name: cuda13
|
||||||
|
fedora_version: "43"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download binary
|
- name: Download binary
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: mistralrs-server-${{ matrix.name }}
|
name: mistralrs-server-${{ matrix.name }}-fc${{ matrix.fedora_version }}
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
|
|
||||||
- name: Build RPM
|
- name: Build RPM
|
||||||
@@ -97,28 +101,37 @@ jobs:
|
|||||||
cp rpm/systemd/mistralrs@.conf.example ~/rpmbuild/SOURCES/
|
cp rpm/systemd/mistralrs@.conf.example ~/rpmbuild/SOURCES/
|
||||||
rpmbuild -bb rpm/mistralrs.spec \
|
rpmbuild -bb rpm/mistralrs.spec \
|
||||||
--define "mistralrs_version ${version}" \
|
--define "mistralrs_version ${version}" \
|
||||||
--define "mistralrs_flavour ${{ matrix.name }}"
|
--define "mistralrs_flavour ${{ matrix.name }}" \
|
||||||
|
--define "dist .fc${{ matrix.fedora_version }}"
|
||||||
env:
|
env:
|
||||||
TAG: ${{ inputs.tag }}
|
TAG: ${{ inputs.tag }}
|
||||||
|
|
||||||
- name: Upload RPM
|
- name: Upload RPM
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: rpm-${{ matrix.name }}
|
name: rpm-${{ matrix.name }}-fc${{ matrix.fedora_version }}
|
||||||
path: ~/rpmbuild/RPMS/x86_64/*.rpm
|
path: ~/rpmbuild/RPMS/x86_64/*.rpm
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
needs: package
|
needs: package
|
||||||
runs-on: fedora
|
runs-on: fedora
|
||||||
|
concurrency:
|
||||||
|
group: rpm-publish-fc${{ matrix.fedora_version }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- fedora_version: "43"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download all RPMs
|
- name: Download RPMs for fc${{ matrix.fedora_version }}
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: rpms/
|
path: rpms/
|
||||||
pattern: rpm-*
|
pattern: rpm-*-fc${{ matrix.fedora_version }}
|
||||||
|
|
||||||
- name: Flatten RPM artifacts
|
- name: Flatten RPM artifacts
|
||||||
run: |
|
run: |
|
||||||
@@ -128,11 +141,14 @@ jobs:
|
|||||||
- name: Import signing key
|
- name: Import signing key
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.RPM_SIGNING_KEY }}" | gpg --batch --import
|
echo "${{ secrets.RPM_SIGNING_KEY }}" | gpg --batch --import
|
||||||
echo "%_gpg_name ${{ secrets.RPM_SIGNING_KEY_ID }}" > ~/.rpmmacros
|
cat > ~/.rpmmacros << 'RPMMACROS'
|
||||||
echo "%__gpg_sign_cmd %{__gpg} --batch --no-armor --no-tty --pinentry-mode loopback --passphrase '' %{?_gpg_digest_algo:--digest-algo %{_gpg_digest_algo}} --no-secmem-warning -u \"%{_gpg_name}\" -sbo %{__signature_filename} --digest-algo sha256 %{__plaintext_filename}" >> ~/.rpmmacros
|
%_gpg_name ${{ secrets.RPM_SIGNING_KEY_ID }}
|
||||||
|
%__gpg_sign_cmd %{__gpg} --batch --no-armor --no-tty --pinentry-mode loopback --passphrase '' %{?_gpg_digest_algo:--digest-algo %{_gpg_digest_algo}} --no-secmem-warning -u "%{_gpg_name}" -sbo %{__signature_filename} --digest-algo sha256 %{__plaintext_filename}
|
||||||
|
RPMMACROS
|
||||||
|
|
||||||
- name: Sign and publish
|
- name: Sign and publish
|
||||||
run: ./script/publish-repo.sh rpms/
|
run: ./script/publish-repo.sh rpms/
|
||||||
env:
|
env:
|
||||||
|
FEDORA_VERSION: ${{ matrix.fedora_version }}
|
||||||
RSYNC_TARGET: ${{ secrets.RSYNC_TARGET }}
|
RSYNC_TARGET: ${{ secrets.RSYNC_TARGET }}
|
||||||
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||||
|
|||||||
@@ -23,26 +23,32 @@ jobs:
|
|||||||
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
|
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
|
||||||
echo "Upstream latest: ${tag}"
|
echo "Upstream latest: ${tag}"
|
||||||
|
|
||||||
- name: Get published version from our repo
|
- name: Check if all packages are published
|
||||||
id: published
|
id: published
|
||||||
run: |
|
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}"
|
version="${UPSTREAM_TAG#v}"
|
||||||
http_response_code=$(curl \
|
needs_build=false
|
||||||
--silent \
|
for target in "43:cuda13"; do
|
||||||
--write-out "%{http_code}" \
|
fedora_version="${target%%:*}"
|
||||||
--output /dev/null \
|
flavour="${target##*:}"
|
||||||
--head \
|
url="https://rpm.lair.cafe/fedora/${fedora_version}/x86_64/mistralrs-server-${flavour}-${version}-1.fc${fedora_version}.x86_64.rpm"
|
||||||
--url "https://rpm.lair.cafe/fedora/43/x86_64/mistralrs-server-cuda13-${version}-1.fc43.x86_64.rpm")
|
http_code=$(curl \
|
||||||
if [ "${http_response_code}" = "200" ]; then
|
--silent \
|
||||||
echo "already_built=true" >> "$GITHUB_OUTPUT"
|
--write-out "%{http_code}" \
|
||||||
elif [ "${http_response_code}" = "404" ]; then
|
--output /dev/null \
|
||||||
echo "already_built=false" >> "$GITHUB_OUTPUT"
|
--head \
|
||||||
else
|
--url "${url}")
|
||||||
echo "Unexpected HTTP response code: ${http_response_code}"
|
if [ "${http_code}" = "200" ]; then
|
||||||
exit 1
|
echo "found: ${url}"
|
||||||
fi
|
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:
|
env:
|
||||||
UPSTREAM_TAG: ${{ steps.upstream.outputs.tag }}
|
UPSTREAM_TAG: ${{ steps.upstream.outputs.tag }}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
RPM_DIR="${1:?usage: $0 <rpm-directory>}"
|
RPM_DIR="${1:?usage: $0 <rpm-directory>}"
|
||||||
REMOTE_DIR="/var/www/rpm/fedora/43/x86_64"
|
: "${FEDORA_VERSION:?}"
|
||||||
|
REMOTE_DIR="/var/www/rpm/fedora/${FEDORA_VERSION}/x86_64"
|
||||||
|
|
||||||
# sign each rpm with the imported gpg key
|
# sign each rpm with the imported gpg key
|
||||||
for rpm in "${RPM_DIR}"/*.rpm; do
|
for rpm in "${RPM_DIR}"/*.rpm; do
|
||||||
|
|||||||
Reference in New Issue
Block a user