-
Notifications
You must be signed in to change notification settings - Fork 237
99 lines (90 loc) · 3.23 KB
/
ci.yml
File metadata and controls
99 lines (90 loc) · 3.23 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: CI # For unit tests and build
on:
push:
branches:
- '**'
env:
USE_PYTHON_VERSION: "3.11"
PROTO_DIR: "proto"
jobs:
# Build meridian "core" and "mmm-proto-schema" distributions.
build-distributions:
name: Build distributions
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Build meridian core distribution
uses: ./.github/actions/build
with:
python_version: ${{ env.USE_PYTHON_VERSION }}
artifact_name: meridian-core-package-distribution
- name: Build mmm-proto-schema distribution
uses: ./.github/actions/build
with:
python_version: ${{ env.USE_PYTHON_VERSION }}
working_directory: ./proto
output_path: ./proto/dist
artifact_name: mmm-proto-package-distribution
# Include for sanity checking that version increment parsing and checking logic works.
check-version:
name: Version check
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
# Check meridian version
- uses: ./.github/actions/install-meridian
with:
python_version: ${{ inputs.python_version }}
extras: ''
- name: Get meridian version
id: get_meridian_version
shell: bash
run: |
VERSION=$(python -c "import meridian; print(meridian.__version__)")
echo "value=$VERSION" >> $GITHUB_OUTPUT
- name: Check meridian version
id: meridian_version_check
uses: ./.github/actions/version-check
with:
python_version: ${{ env.USE_PYTHON_VERSION }}
semver_prefix: v
current_version: ${{ steps.get_meridian_version.outputs.value}}
# Check mmm-proto-schema version
- name: Get mmm-proto-schema version
id: get_proto_version
uses: ./.github/actions/get-proto-version
with:
python_version: ${{ env.USE_PYTHON_VERSION }}
- name: Check mmm-proto-schema version
uses: ./.github/actions/version-check
with:
python_version: ${{ env.USE_PYTHON_VERSION }}
semver_prefix: proto-v
current_version: ${{ steps.get_proto_version.outputs.value}}
pytest:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
max-parallel: 8
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
meridian-backend: ["tensorflow", "jax"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.python-version }}-${{ matrix.meridian-backend }}
cancel-in-progress: true
name: pytest (python-${{ matrix.python-version }}, backend-${{ matrix.meridian-backend }})
steps:
- uses: actions/checkout@v4
if: ${{ !contains(github.event.head_commit.message, '#skip-pytest') }}
- uses: ./.github/actions/install-meridian
if: ${{ !contains(github.event.head_commit.message, '#skip-pytest') }}
with:
python_version: ${{ matrix.python-version }}
# Run tests (in parallel)
- name: Run core tests
if: ${{ !contains(github.event.head_commit.message, '#skip-pytest') }}
run: pytest -vv
env:
MERIDIAN_BACKEND: ${{ matrix.meridian-backend }}