Skip to content

Commit

Permalink
chore: merge origin
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Jan 15, 2025
2 parents 403580f + f7829b8 commit 6172e15
Show file tree
Hide file tree
Showing 351 changed files with 16,498 additions and 10,696 deletions.
98 changes: 96 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ jobs:
stepName: 'build-native'
secrets: inherit

build-native-windows:
name: build-native-windows
uses: ./.github/workflows/build_reusable.yml
with:
skipInstallBuild: 'yes'
stepName: 'build-native-windows'
runs_on_labels: '["windows","self-hosted","x64"]'
buildNativeTarget: 'x86_64-pc-windows-msvc'

secrets: inherit

build-next:
name: build-next
uses: ./.github/workflows/build_reusable.yml
Expand Down Expand Up @@ -202,8 +213,6 @@ jobs:
# name: test devlow package
# needs: ['optimize-ci', 'changes']
# if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}
# strategy:
# fail-fast: false
# uses: ./.github/workflows/build_reusable.yml
# with:
# stepName: 'test-devlow'
Expand Down Expand Up @@ -337,6 +346,26 @@ jobs:

secrets: inherit

# test-unit-windows:
# name: test unit windows
# needs: ['changes', 'build-native', 'build-native-windows']
# if: ${{ needs.changes.outputs.docs-only == 'false' }}

# strategy:
# fail-fast: false
# matrix:
# node: [18, 20] # TODO: use env var like [env.NODE_MAINTENANCE_VERSION, env.NODE_LTS_VERSION]

# uses: ./.github/workflows/build_reusable.yml
# with:
# nodeVersion: ${{ matrix.node }}
# afterBuild: node run-tests.js -c ${TEST_CONCURRENCY} --type unit
# stepName: 'test-unit-windows-${{ matrix.node }}'
# runs_on_labels: '["windows","self-hosted","x64"]'
# buildNativeTarget: 'x86_64-pc-windows-msvc'

# secrets: inherit

# test-new-tests-dev:
# name: Test new tests for flakes (dev)
# needs: ['optimize-ci', 'changes', 'build-native', 'build-next']
Expand Down Expand Up @@ -409,6 +438,67 @@ jobs:
stepName: 'test-dev-react-${{ matrix.react }}-${{ matrix.group }}'
secrets: inherit

# test-dev-windows:
# name: test dev windows
# needs:
# [
# 'optimize-ci',
# 'changes',
# 'build-native-windows',
# 'build-native',
# 'build-next',
# ]
# if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

# uses: ./.github/workflows/build_reusable.yml
# with:
# afterBuild: NEXT_TEST_MODE=dev node run-tests.js -c ${TEST_CONCURRENCY} test/e2e/app-dir/app/index.test.ts test/e2e/app-dir/app-edge/app-edge.test.ts
# stepName: 'test-dev-windows'
# runs_on_labels: '["windows","self-hosted","x64"]'
# buildNativeTarget: 'x86_64-pc-windows-msvc'
# secrets: inherit

# test-integration-windows:
# name: test integration windows
# needs:
# [
# 'optimize-ci',
# 'changes',
# 'build-native-windows',
# 'build-native',
# 'build-next',
# ]
# if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

# uses: ./.github/workflows/build_reusable.yml
# with:
# nodeVersion: 18.18.2
# afterBuild: node run-tests.js -c 4 test/production/pages-dir/production/test/index.test.ts test/integration/css-client-nav/test/index.test.js test/integration/rewrites-has-condition/test/index.test.js test/integration/create-next-app/index.test.ts test/integration/create-next-app/package-manager/pnpm.test.ts
# stepName: 'test-integration-windows'
# runs_on_labels: '["windows","self-hosted","x64"]'
# buildNativeTarget: 'x86_64-pc-windows-msvc'
# secrets: inherit

# test-prod-windows:
# name: test prod windows
# needs:
# [
# 'optimize-ci',
# 'changes',
# 'build-native-windows',
# 'build-native',
# 'build-next',
# ]
# if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

# uses: ./.github/workflows/build_reusable.yml
# with:
# afterBuild: NEXT_TEST_MODE=start node run-tests.js test/e2e/app-dir/app/index.test.ts test/e2e/app-dir/app-edge/app-edge.test.ts
# stepName: 'test-prod-windows'
# runs_on_labels: '["windows","self-hosted","x64"]'
# buildNativeTarget: 'x86_64-pc-windows-msvc'
# secrets: inherit

test-prod:
name: test prod
needs: ['optimize-ci', 'changes', 'build-native', 'build-next']
Expand Down Expand Up @@ -588,6 +678,10 @@ jobs:
# 'test-new-tests-deploy',
# 'test-turbopack-production',
# 'test-turbopack-production-integration',
# 'test-unit-windows',
# 'test-dev-windows',
# 'test-integration-windows',
# 'test-prod-windows',
]

if: always()
Expand Down
40 changes: 32 additions & 8 deletions .github/workflows/build_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ on:
required: false
type: string
default: '["self-hosted", "linux", "x64", "metal"]'
buildNativeTarget:
description: 'Target for build-native step'
required: false
type: string
default: 'x86_64-unknown-linux-gnu'

env:
NAPI_CLI_VERSION: 2.14.7
Expand Down Expand Up @@ -93,23 +98,42 @@ jobs:
timeout-minutes: ${{ inputs.timeout_minutes }}
runs-on: ${{ fromJson(inputs.runs_on_labels) }}

defaults:
run:
shell: bash -leo pipefail {0}

outputs:
input_step_key: ${{ steps.var.outputs.input_step_key }}

steps:
- name: Check if fnm is installed
id: check-fnm
run: |
if [ -x "$(command -v fnm)" ]; then
echo "fnm found."
echo "found=true" >> $GITHUB_OUTPUT
else
echo "fnm not found."
echo "found=false" >> $GITHUB_OUTPUT
fi
- name: Install fnm
if: steps.check-fnm.outputs.found != 'true'
run: |
curl -fsSL https://fnm.vercel.app/install | bash
export PATH="/home/runner/.local/share/fnm:$PATH"
echo "/home/runner/.local/share/fnm" >> $GITHUB_PATH
fnm env --json | jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' | xargs -I {} echo "{}" >> $GITHUB_ENV
- name: Normalize input step names into path key
uses: actions/github-script@v7
id: var
with:
script: |
core.setOutput('input_step_key', '${{ inputs.stepName }}'.toLowerCase().replaceAll(/[/.]/g, '-').trim('-'));
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodeVersion || env.NODE_LTS_VERSION }}
check-latest: true

- run: fnm use --install-if-missing ${{ inputs.nodeVersion || env.NODE_LTS_VERSION }}
- run: fnm default ${{ inputs.nodeVersion || env.NODE_LTS_VERSION }}
- run: node -v
- run: corepack enable
- run: pwd
Expand Down Expand Up @@ -147,7 +171,7 @@ jobs:
with:
cache-provider: 'turbo'
save-if: ${{ github.ref_name == 'canary' }}
shared-key: ${{ inputs.rustCacheKey }}-x86_64-unknown-linux-gnu-build-${{ hashFiles('.cargo/config.toml') }}
shared-key: ${{ inputs.rustCacheKey }}-${{ inputs.buildNativeTarget }}-build-${{ hashFiles('.cargo/config.toml') }}

# clean up any previous artifacts to avoid hitting disk space limits
- run: git clean -xdf && rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* /tmp/yarn-* /tmp/ncc-cache target
Expand All @@ -165,7 +189,7 @@ jobs:
- run: node scripts/normalize-version-bump.js
name: normalize versions

- run: turbo run build-native-release -vvv --env-mode loose --remote-cache-timeout 90 --summarize -- --target x86_64-unknown-linux-gnu
- run: turbo run build-native-release -v --env-mode loose --remote-cache-timeout 90 --summarize -- --target ${{ inputs.buildNativeTarget }}
if: ${{ inputs.skipNativeBuild != 'yes' }}

- name: Upload next-swc artifact
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/issue_stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
with:
repo-token: ${{ secrets.STALE_TOKEN }}
ascending: true
days-before-issue-stale: 730 # issues with no activity in over two years
days-before-issue-close: 7
days-before-issue-stale: 730 # issues with no activity in over two years
days-before-pr-close: -1
days-before-pr-stale: -1
remove-issue-stale-when-updated: true
Expand All @@ -30,10 +30,10 @@ jobs:
name: 'Close stale issues with no reproduction'
with:
repo-token: ${{ secrets.STALE_TOKEN }}
any-of-labels: 'please add a complete reproduction'
any-of-issue-labels: 'please add a complete reproduction'
close-issue-message: 'This issue has been automatically closed due to 2 days of inactivity and the absence of a complete reproduction. If you believe this was done in error, please leave a comment. If you are experiencing a similar issue, consider opening a new issue with a complete reproduction. Thank you.'
days-before-issue-close: 1
days-before-issue-stale: 2
days-before-issue-close: 2
days-before-issue-stale: 1
days-before-pr-close: -1
days-before-pr-stale: -1
operations-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close
Expand All @@ -42,10 +42,10 @@ jobs:
name: 'Close issues with no simple repro'
with:
repo-token: ${{ secrets.STALE_TOKEN }}
any-of-labels: 'please simplify reproduction'
any-of-issue-labels: 'please simplify reproduction'
close-issue-message: 'This issue has been automatically closed due to 14 days of inactivity and the absence of a simple reproduction for investigation. If you believe this was done in error, please leave a comment. If you are experiencing a similar issue, consider opening a new issue with a simple reproduction. Thank you.'
days-before-issue-close: 1
days-before-issue-stale: 14
days-before-issue-close: 14
days-before-issue-stale: 1
days-before-pr-close: -1
days-before-pr-stale: -1
operations-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close
Expand All @@ -54,10 +54,10 @@ jobs:
name: 'Close issues not verified on canary'
with:
repo-token: ${{ secrets.STALE_TOKEN }}
any-of-labels: 'please verify canary'
any-of-issue-labels: 'please verify canary'
close-issue-message: 'This issue has been automatically closed due to 14 days of inactivity and the absence of testing against next@canary. If you believe this was done in error, please leave a comment. If you are experiencing a similar issue, consider opening a new issue with a reproduction. Thank you.'
days-before-issue-close: 1
days-before-issue-stale: 14
days-before-issue-close: 14
days-before-issue-stale: 1
days-before-pr-close: -1
days-before-pr-stale: -1
operations-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close
Loading

0 comments on commit 6172e15

Please sign in to comment.