ci: Do not test the full matrix on PRs (#2771)

* ci: Do not test the full matrix on PR

Hipblas and sycl take long time to build from scratch as for now. Until
we find a way to speedup image building we are going to test these only
on master, and not for every open PR.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* ci: do not run release workflow twice

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2024-07-11 19:08:39 +02:00 committed by GitHub
parent b6b8ab6c21
commit 03efa26ff5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 96 additions and 93 deletions

View File

@ -35,15 +35,16 @@ jobs:
max-parallel: ${{ github.event_name != 'pull_request' && 4 || 8 }} max-parallel: ${{ github.event_name != 'pull_request' && 4 || 8 }}
matrix: matrix:
include: include:
- build-type: '' # This is basically covered by the AIO test
platforms: 'linux/amd64' # - build-type: ''
tag-latest: 'false' # platforms: 'linux/amd64'
tag-suffix: '-ffmpeg' # tag-latest: 'false'
ffmpeg: 'true' # tag-suffix: '-ffmpeg'
image-type: 'extras' # ffmpeg: 'true'
runs-on: 'arc-runner-set' # image-type: 'extras'
base-image: "ubuntu:22.04" # runs-on: 'arc-runner-set'
makeflags: "--jobs=3 --output-sync=target" # base-image: "ubuntu:22.04"
# makeflags: "--jobs=3 --output-sync=target"
- build-type: 'cublas' - build-type: 'cublas'
cuda-major-version: "12" cuda-major-version: "12"
cuda-minor-version: "4" cuda-minor-version: "4"
@ -55,85 +56,85 @@ jobs:
runs-on: 'arc-runner-set' runs-on: 'arc-runner-set'
base-image: "ubuntu:22.04" base-image: "ubuntu:22.04"
makeflags: "--jobs=3 --output-sync=target" makeflags: "--jobs=3 --output-sync=target"
- build-type: 'hipblas' # - build-type: 'hipblas'
platforms: 'linux/amd64' # platforms: 'linux/amd64'
tag-latest: 'false' # tag-latest: 'false'
tag-suffix: '-hipblas' # tag-suffix: '-hipblas'
ffmpeg: 'false' # ffmpeg: 'false'
image-type: 'extras' # image-type: 'extras'
base-image: "rocm/dev-ubuntu-22.04:6.1" # base-image: "rocm/dev-ubuntu-22.04:6.1"
grpc-base-image: "ubuntu:22.04" # grpc-base-image: "ubuntu:22.04"
runs-on: 'arc-runner-set' # runs-on: 'arc-runner-set'
makeflags: "--jobs=3 --output-sync=target" # makeflags: "--jobs=3 --output-sync=target"
- build-type: 'sycl_f16' # - build-type: 'sycl_f16'
platforms: 'linux/amd64' # platforms: 'linux/amd64'
tag-latest: 'false' # tag-latest: 'false'
base-image: "quay.io/go-skynet/intel-oneapi-base:latest" # base-image: "quay.io/go-skynet/intel-oneapi-base:latest"
grpc-base-image: "ubuntu:22.04" # grpc-base-image: "ubuntu:22.04"
tag-suffix: 'sycl-f16-ffmpeg' # tag-suffix: 'sycl-f16-ffmpeg'
ffmpeg: 'true' # ffmpeg: 'true'
image-type: 'extras' # image-type: 'extras'
runs-on: 'arc-runner-set' # runs-on: 'arc-runner-set'
makeflags: "--jobs=3 --output-sync=target" # makeflags: "--jobs=3 --output-sync=target"
core-image-build: # core-image-build:
uses: ./.github/workflows/image_build.yml # uses: ./.github/workflows/image_build.yml
with: # with:
tag-latest: ${{ matrix.tag-latest }} # tag-latest: ${{ matrix.tag-latest }}
tag-suffix: ${{ matrix.tag-suffix }} # tag-suffix: ${{ matrix.tag-suffix }}
ffmpeg: ${{ matrix.ffmpeg }} # ffmpeg: ${{ matrix.ffmpeg }}
image-type: ${{ matrix.image-type }} # image-type: ${{ matrix.image-type }}
build-type: ${{ matrix.build-type }} # build-type: ${{ matrix.build-type }}
cuda-major-version: ${{ matrix.cuda-major-version }} # cuda-major-version: ${{ matrix.cuda-major-version }}
cuda-minor-version: ${{ matrix.cuda-minor-version }} # cuda-minor-version: ${{ matrix.cuda-minor-version }}
platforms: ${{ matrix.platforms }} # platforms: ${{ matrix.platforms }}
runs-on: ${{ matrix.runs-on }} # runs-on: ${{ matrix.runs-on }}
base-image: ${{ matrix.base-image }} # base-image: ${{ matrix.base-image }}
grpc-base-image: ${{ matrix.grpc-base-image }} # grpc-base-image: ${{ matrix.grpc-base-image }}
makeflags: ${{ matrix.makeflags }} # makeflags: ${{ matrix.makeflags }}
secrets: # secrets:
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }} # dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }} # dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }} # quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }} # quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
strategy: # strategy:
matrix: # matrix:
include: # include:
- build-type: '' # - build-type: ''
platforms: 'linux/amd64' # platforms: 'linux/amd64'
tag-latest: 'false' # tag-latest: 'false'
tag-suffix: '-ffmpeg-core' # tag-suffix: '-ffmpeg-core'
ffmpeg: 'true' # ffmpeg: 'true'
image-type: 'core' # image-type: 'core'
runs-on: 'ubuntu-latest' # runs-on: 'ubuntu-latest'
base-image: "ubuntu:22.04" # base-image: "ubuntu:22.04"
makeflags: "--jobs=4 --output-sync=target" # makeflags: "--jobs=4 --output-sync=target"
- build-type: 'sycl_f16' # - build-type: 'sycl_f16'
platforms: 'linux/amd64' # platforms: 'linux/amd64'
tag-latest: 'false' # tag-latest: 'false'
base-image: "quay.io/go-skynet/intel-oneapi-base:latest" # base-image: "quay.io/go-skynet/intel-oneapi-base:latest"
grpc-base-image: "ubuntu:22.04" # grpc-base-image: "ubuntu:22.04"
tag-suffix: 'sycl-f16-ffmpeg-core' # tag-suffix: 'sycl-f16-ffmpeg-core'
ffmpeg: 'true' # ffmpeg: 'true'
image-type: 'core' # image-type: 'core'
runs-on: 'arc-runner-set' # runs-on: 'arc-runner-set'
makeflags: "--jobs=3 --output-sync=target" # makeflags: "--jobs=3 --output-sync=target"
- build-type: 'cublas' # - build-type: 'cublas'
cuda-major-version: "12" # cuda-major-version: "12"
cuda-minor-version: "4" # cuda-minor-version: "4"
platforms: 'linux/amd64' # platforms: 'linux/amd64'
tag-latest: 'false' # tag-latest: 'false'
tag-suffix: '-cublas-cuda12-ffmpeg-core' # tag-suffix: '-cublas-cuda12-ffmpeg-core'
ffmpeg: 'true' # ffmpeg: 'true'
image-type: 'core' # image-type: 'core'
runs-on: 'ubuntu-latest' # runs-on: 'ubuntu-latest'
base-image: "ubuntu:22.04" # base-image: "ubuntu:22.04"
makeflags: "--jobs=4 --output-sync=target" # makeflags: "--jobs=4 --output-sync=target"
- build-type: 'vulkan' # - build-type: 'vulkan'
platforms: 'linux/amd64' # platforms: 'linux/amd64'
tag-latest: 'false' # tag-latest: 'false'
tag-suffix: '-vulkan-ffmpeg-core' # tag-suffix: '-vulkan-ffmpeg-core'
ffmpeg: 'true' # ffmpeg: 'true'
image-type: 'core' # image-type: 'core'
runs-on: 'ubuntu-latest' # runs-on: 'ubuntu-latest'
base-image: "ubuntu:22.04" # base-image: "ubuntu:22.04"
makeflags: "--jobs=4 --output-sync=target" # makeflags: "--jobs=4 --output-sync=target"

View File

@ -1,8 +1,10 @@
name: Build and Release name: Build and Release
on: on:
- push push:
- pull_request branches:
- master
pull_request:
env: env:
GRPC_VERSION: v1.64.0 GRPC_VERSION: v1.64.0