-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ghstack-poisoned]
- Loading branch information
Showing
4 changed files
with
1,043 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: (Runtime) Build | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
paths-ignore: | ||
- 'compiler/**' | ||
|
||
jobs: | ||
define_build_params: | ||
name: Build build params | ||
runs-on: ubuntu-latest | ||
outputs: | ||
bundle_type: ${{ steps.define_bundle_types.outputs.result }} | ||
release_channel: ${{ steps.define_release_channels.outputs.result }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/github-script@v7 | ||
id: define_bundle_types | ||
with: | ||
script: | | ||
const {bundleTypes} = require('./scripts/rollup/bundles'); | ||
return Object.values(bundleTypes); | ||
- uses: actions/github-script@v7 | ||
id: define_release_channels | ||
with: | ||
script: | | ||
return ["stable", "experimental"]; | ||
build: | ||
name: yarn build | ||
runs-on: ubuntu-latest | ||
needs: define_build_params | ||
strategy: | ||
matrix: | ||
bundle_type: ${{ fromJSON(needs.define_build_params.outputs.bundle_type) }} | ||
release_channel: ${{ fromJSON(needs.define_build_params.outputs.release_channel) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
cache: "yarn" | ||
cache-dependency-path: yarn.lock | ||
- name: Restore cached node_modules | ||
uses: actions/cache@v4 | ||
id: node_modules | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn build --b=${{ matrix.bundle_type }} --r=${{ matrix.release_channel }} --ci=github | ||
- name: Archive build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} | ||
path: | | ||
build | ||
lint_build: | ||
name: yarn lint-build | ||
needs: [define_build_params, build] | ||
strategy: | ||
matrix: | ||
bundle_type: ${{ fromJSON(needs.define_build_params.outputs.bundle_type) }} | ||
release_channel: ${{ fromJSON(needs.define_build_params.outputs.release_channel) }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
cache: "yarn" | ||
cache-dependency-path: yarn.lock | ||
- name: Restore cached node_modules | ||
uses: actions/cache@v4 | ||
id: node_modules | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} | ||
- name: Restore archived build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn lint-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.