Skip to content

Commit 3ae7e43

Browse files
authored
Merge pull request #743 from AugurProject/t3code/tiered-change-aware-ci
Stage change-aware tiered CI implementation
2 parents bfb5fc4 + 26c7d31 commit 3ae7e43

10 files changed

Lines changed: 495 additions & 204 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Set up component CI
2+
description: Install one component from its lockfile and restore its local cache
3+
4+
inputs:
5+
directory:
6+
description: Component package directory
7+
required: true
8+
artifacts:
9+
description: Install root artifact-generation workspaces needed by this component
10+
required: false
11+
default: "false"
12+
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Setup Bun
17+
uses: oven-sh/setup-bun@v2
18+
with:
19+
bun-version: ${{ env.BUN_VERSION }}
20+
21+
- name: Cache component dependencies
22+
uses: actions/cache@v5
23+
with:
24+
path: ~/.bun/install/cache
25+
key: ${{ runner.os }}-component-${{ inputs.directory }}-${{ env.BUN_VERSION }}-${{ hashFiles(format('{0}/bun.lock', inputs.directory), format('{0}/package.json', inputs.directory), 'bun.lock', 'package.json', 'bots/shared/bun.lock', 'bots/shared/package.json', 'shared/package.json', 'shared/ts/**') }}
26+
27+
- name: Install local dependency inputs
28+
shell: bash
29+
run: |
30+
bun install --frozen-lockfile
31+
if [[ "${{ inputs.directory }}" == "bots/open-oracle-arbitrager" || "${{ inputs.directory }}" == "bots/liquidator" ]]; then
32+
(cd bots/shared && bun install --frozen-lockfile)
33+
fi
34+
35+
- name: Install component dependencies
36+
shell: bash
37+
working-directory: ${{ inputs.directory }}
38+
run: bun install --frozen-lockfile
39+
40+
- name: Install artifact-generation dependencies
41+
if: inputs.artifacts == 'true'
42+
shell: bash
43+
run: |
44+
(cd ui && bun install --frozen-lockfile)
45+
(cd solidity && bun install --frozen-lockfile)

0 commit comments

Comments
 (0)