Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
69 lines
2.6 KiB
YAML
69 lines
2.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
# should sync with ci-check.yml as a workaround to bypass github checks
|
|
- master
|
|
- next
|
|
- v*.x
|
|
pull_request:
|
|
paths-ignore:
|
|
# should sync with ci-check.yml as a workaround to bypass github checks
|
|
- 'docs/**'
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
continuous-releases:
|
|
name: Continuous releases
|
|
uses: mui/mui-public/.github/workflows/ci-base.yml@master
|
|
|
|
# Tests dev-only scripts across all supported dev environments
|
|
test-dev:
|
|
# l10nbot does not affect dev scripts.
|
|
if: ${{ github.actor != 'l10nbot' }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- run: echo '${{ github.actor }}'
|
|
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
|
|
with:
|
|
# fetch all tags which are required for `pnpm release:changelog`
|
|
fetch-depth: 0
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
|
with:
|
|
node-version: '22.18.0'
|
|
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
|
|
- run: pnpm install
|
|
- name: Cache Next.js build
|
|
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
|
with:
|
|
path: docs/.next/cache
|
|
key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}-${{ hashFiles('docs/**/*.js', 'docs/**/*.ts', 'docs/**/*.tsx', 'docs/**/*.jsx', 'docs/**/*.json', 'docs/**/*.md', 'docs/**/*.mdx') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}-
|
|
${{ runner.os }}-nextjs-
|
|
- run: pnpm release:build
|
|
- name: Build docs
|
|
run: pnpm docs:build
|
|
env:
|
|
NODE_OPTIONS: --max_old_space_size=6144
|
|
# macOS-latest has 3 CPUs, but we get "EMFILE: too many open files" errors with that parallelism
|
|
# Limit Next.js to 2 CPUs to prevent file descriptor exhaustion. Empty string uses os.availableParallelism()
|
|
NEXT_PARALLELISM: ${{ runner.os == 'macOS' && '2' || '' }}
|
|
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
|
|
# - run: pnpm release:changelog
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Debug export-detail.json on when pnpm docs:build fails with EMFILE error
|
|
if: failure()
|
|
run: cat ./docs/.next/export-detail.json || true
|