Skip to content

Commit 0303e32

Browse files
committed
[ci] Add yarn build and yarn lint build gh action
Basic copy of the yarn build & yarn lint build jobs from circleci without any parallelization ghstack-source-id: b583559 Pull Request resolved: #30070
1 parent c21bcd6 commit 0303e32

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/runtime_build.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: (Runtime) Build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
paths-ignore:
8+
- 'compiler/**'
9+
10+
jobs:
11+
build:
12+
name: yarn build
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 18.x
19+
cache: "yarn"
20+
cache-dependency-path: yarn.lock
21+
- name: Restore cached node_modules
22+
uses: actions/cache@v4
23+
id: node_modules
24+
with:
25+
path: "**/node_modules"
26+
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
27+
- run: yarn install --frozen-lockfile
28+
- run: yarn build
29+
- name: Cache build
30+
uses: actions/cache@v4
31+
id: build_cache
32+
with:
33+
path: "build/**"
34+
key: yarn-build-${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
35+
36+
lint_build:
37+
name: yarn lint-build
38+
needs: build
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: actions/setup-node@v4
43+
with:
44+
node-version: 18.x
45+
cache: "yarn"
46+
cache-dependency-path: yarn.lock
47+
- name: Restore cached node_modules
48+
uses: actions/cache@v4
49+
id: node_modules
50+
with:
51+
path: "**/node_modules"
52+
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
53+
- name: Restore cached build
54+
uses: actions/cache@v4
55+
id: build_cache
56+
with:
57+
path: "build/**"
58+
key: yarn-build-${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
59+
- run: yarn install --frozen-lockfile
60+
- run: yarn lint-build

0 commit comments

Comments
 (0)