All checks were successful
poll-upstream / check (push) Successful in 1s
Gitea Actions doesn't support fromJSON in matrix strategies (expressions are evaluated before dependent jobs run). Move flavour definitions into the workflow as static matrix includes and remove flavours.yml. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
112 lines
3.1 KiB
YAML
112 lines
3.1 KiB
YAML
name: build-release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: "mistral.rs upstream tag"
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: cuda13
|
|
runner: cuda-13.0
|
|
cuda_home: /usr/local/cuda-13.0
|
|
cargo_features: "cuda cudnn flash-attn nccl"
|
|
compute_caps: "120"
|
|
runs-on: ${{ matrix.runner }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Clone mistral.rs at tag
|
|
run: |
|
|
git clone --depth 1 --branch "${{ inputs.tag }}" \
|
|
https://github.com/EricLBuehler/mistral.rs.git src/
|
|
|
|
- name: Build
|
|
run: ./script/build-binary.sh
|
|
env:
|
|
FLAVOUR_NAME: ${{ matrix.name }}
|
|
CUDA_HOME: ${{ matrix.cuda_home }}
|
|
CARGO_FEATURES: ${{ matrix.cargo_features }}
|
|
CUDA_COMPUTE_CAP: ${{ matrix.compute_caps }}
|
|
SRC_DIR: src
|
|
|
|
- name: Upload binary artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: mistralrs-server-${{ matrix.name }}
|
|
path: artifacts/mistralrs-server-${{ matrix.name }}
|
|
retention-days: 1
|
|
|
|
package:
|
|
needs: build
|
|
runs-on: fedora
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: cuda13
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download binary
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: mistralrs-server-${{ matrix.name }}
|
|
path: artifacts/
|
|
|
|
- name: Build RPM
|
|
run: |
|
|
version="${TAG#v}"
|
|
rpmdev-setuptree
|
|
cp artifacts/mistralrs-server-${{ matrix.name }} ~/rpmbuild/SOURCES/
|
|
cp rpm/systemd/mistralrs@.service ~/rpmbuild/SOURCES/
|
|
cp rpm/systemd/mistralrs@.conf.example ~/rpmbuild/SOURCES/
|
|
rpmbuild -bb rpm/mistralrs.spec \
|
|
--define "mistralrs_version ${version}" \
|
|
--define "mistralrs_flavour ${{ matrix.name }}"
|
|
env:
|
|
TAG: ${{ inputs.tag }}
|
|
|
|
- name: Upload RPM
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: rpm-${{ matrix.name }}
|
|
path: ~/rpmbuild/RPMS/x86_64/*.rpm
|
|
retention-days: 7
|
|
|
|
publish:
|
|
needs: package
|
|
runs-on: fedora
|
|
# concurrency ensures only one publish runs at a time — repo metadata
|
|
# corruption is a nightmare if two createrepo_c processes race.
|
|
concurrency:
|
|
group: rpm-publish
|
|
cancel-in-progress: false
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download all RPMs
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
path: rpms/
|
|
pattern: rpm-*
|
|
merge-multiple: true
|
|
|
|
- name: Import signing key
|
|
run: |
|
|
echo "${{ secrets.RPM_SIGNING_KEY }}" | gpg --batch --import
|
|
echo "%_gpg_name ${{ secrets.RPM_SIGNING_KEY_ID }}" > ~/.rpmmacros
|
|
|
|
- name: Sign and publish
|
|
run: ./script/publish-repo.sh rpms/
|
|
env:
|
|
RSYNC_TARGET: ${{ secrets.RSYNC_TARGET }}
|
|
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
|