-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (77 loc) · 2.2 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI
on:
push:
branches:
- main
pull_request:
# Ensure only one workflow instance runs at a time. For branches other than the
# default branch, cancel the pending jobs in the group. For the default branch,
# queue them up. This avoids cancelling jobs that are in the middle of deploying
# to production.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}
jobs:
check:
name: Check
runs-on: ubuntu-latest
env:
R8_CUDA_PREFIX: ${{ secrets.R8_CUDA_PREFIX }}
R8_CUDNN_PREFIX: ${{ secrets.R8_CUDNN_PREFIX }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- run: ./script/check
test:
name: Test
runs-on: ubuntu-latest-4-cores
env:
R8_CUDA_PREFIX: ${{ secrets.R8_CUDA_PREFIX }}
R8_CUDNN_PREFIX: ${{ secrets.R8_CUDNN_PREFIX }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- run: ./script/build
- run: ./script/build-runtime
- run: ./script/test
test-mini:
name: Test Mini
runs-on: ubuntu-latest-4-cores
env:
R8_CUDA_PREFIX: ${{ secrets.R8_CUDA_PREFIX }}
R8_CUDNN_PREFIX: ${{ secrets.R8_CUDNN_PREFIX }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- run: ./script/build
- run: ./script/test-mini
build-release-monobase:
if: ${{ github.event_name != 'pull_request' }}
name: Build + release monobase image
needs:
- check
- test
- test-mini
permissions:
contents: read
id-token: write
uses: replicate/actions/.github/workflows/buildx.yml@main
with:
image: monobase
fetch-depth: 0
build-args: BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
build-release-monobase-runtime:
if: ${{ github.event_name != 'pull_request' }}
name: Build + release monobase-runtime image
needs:
- check
- test
- test-mini
permissions:
contents: read
id-token: write
uses: replicate/actions/.github/workflows/buildx.yml@main
with:
image: monobase-runtime
file: runtime.Dockerfile
fetch-depth: 0