Skip to content

Commit 2efc72a

Browse files
authored
[b/474913468, 479101966] CI/CD Optimization (chronicle#544)
* improved workflows * migrated to uv * split windows workflow. * changed naming * changed naming + proccess number * combine all build and validate workflows into one workflow with few jobs * combined linter * windows workflow process * changed test workflows * fixed tal comments * fixed tal comments * fixed tal comments * fixed tal comments
1 parent 67bd43d commit 2efc72a

15 files changed

Lines changed: 819 additions & 425 deletions

.github/workflows/build.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: Build Content-Hub
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths:
8+
- 'content/**'
9+
- 'packages/**'
10+
- '.github/workflows/**'
11+
pull_request:
12+
branches:
13+
- '**'
14+
paths:
15+
- 'content/**'
16+
- 'packages/**'
17+
- '.github/workflows/**'
18+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
changes:
24+
name: Detect Changes
25+
runs-on: ubuntu-latest
26+
outputs:
27+
mp: ${{ steps.filter.outputs.mp }}
28+
integration_packages: ${{ steps.filter.outputs.integration_packages }}
29+
response_integrations_google: ${{ steps.filter.outputs.response_integrations_google }}
30+
response_integrations_third_party: ${{ steps.filter.outputs.response_integrations_third_party }}
31+
playbooks: ${{ steps.filter.outputs.playbooks }}
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
36+
- name: Check for changes
37+
uses: dorny/paths-filter@v3
38+
id: filter
39+
with:
40+
filters: |
41+
mp:
42+
- 'packages/mp/**'
43+
- '.github/workflows/**'
44+
integration_packages:
45+
- 'packages/envcommon/**'
46+
- 'packages/tipcommon/**'
47+
- 'packages/integration_testing/**'
48+
- 'packages/integration_testing_whls/**'
49+
response_integrations_google:
50+
- 'content/response_integrations/google/**'
51+
response_integrations_third_party:
52+
- 'content/response_integrations/third_party/**'
53+
playbooks:
54+
- 'content/playbooks/**'
55+
56+
build_google:
57+
name: Build Google Integrations
58+
needs: changes
59+
if: ${{ needs.changes.outputs.response_integrations_google == 'true' || needs.changes.outputs.mp == 'true' || needs.changes.outputs.integration_packages == 'true' }}
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout repository
63+
uses: actions/checkout@v4
64+
with:
65+
fetch-depth: 0
66+
67+
- name: Set up Python
68+
uses: actions/setup-python@v5
69+
with:
70+
python-version: '3.11'
71+
72+
- name: Install mp package
73+
run: |
74+
python -m pip install uv
75+
uv pip install --system -e ./packages/mp
76+
77+
- name: Build Google Integrations
78+
shell: bash
79+
run: |
80+
mp config --root-path . --processes 10 --display-config
81+
mp build repository google
82+
83+
build_third_party:
84+
name: Build Third-Party Integrations
85+
needs: changes
86+
if: ${{ needs.changes.outputs.response_integrations_third_party == 'true' || needs.changes.outputs.mp == 'true' || needs.changes.outputs.integration_packages == 'true' }}
87+
runs-on: ubuntu-latest
88+
steps:
89+
- name: Checkout repository
90+
uses: actions/checkout@v4
91+
with:
92+
fetch-depth: 0
93+
94+
- name: Set up Python
95+
uses: actions/setup-python@v5
96+
with:
97+
python-version: '3.11'
98+
99+
- name: Install mp package
100+
run: |
101+
python -m pip install uv
102+
uv pip install --system -e ./packages/mp
103+
104+
- name: Build Third-Party Integrations
105+
shell: bash
106+
run: |
107+
mp config --root-path . --processes 10 --display-config
108+
mp build repository third_party
109+
110+
build_playbooks:
111+
name: Build Playbooks
112+
needs: changes
113+
if: ${{ needs.changes.outputs.playbooks == 'true' || needs.changes.outputs.mp == 'true' }}
114+
runs-on: ubuntu-latest
115+
steps:
116+
- name: Checkout repository
117+
uses: actions/checkout@v4
118+
with:
119+
fetch-depth: 0
120+
121+
- name: Set up Python
122+
uses: actions/setup-python@v5
123+
with:
124+
python-version: '3.11'
125+
126+
- name: Install mp package
127+
run: |
128+
python -m pip install uv
129+
uv pip install --system -e ./packages/mp
130+
131+
- name: Build Playbooks
132+
shell: bash
133+
run: |
134+
mp config --root-path . --processes 10 --display-config
135+
mp build repository playbooks

.github/workflows/build_integrations.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/build_playbooks.yaml.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/code_checks.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)