Skip to content

Commit

Permalink
Merge branch 'canary' into note-styles
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotny committed Jun 12, 2023
2 parents 623d35b + e5a45c8 commit 68a54d9
Show file tree
Hide file tree
Showing 20 changed files with 310 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ filter = "package(next-dev-tests)"
leak-timeout = "500ms"
retries = 2
slow-timeout = "60s"
threads-required = 2
threads-required = 4
failure-output = "immediate-final"
66 changes: 52 additions & 14 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,23 @@ env:
NEXT_TEST_JOB: 1

jobs:
build:
name: build
build-native:
name: build-native
uses: ./.github/workflows/build_reusable.yml
with:
skipInstallBuild: 'yes'
secrets: inherit

build-next:
name: build-next
uses: ./.github/workflows/build_reusable.yml
with:
skipNativeBuild: 'yes'
secrets: inherit

lint:
name: lint
needs: ['build']
needs: ['build-native', 'build-next']

uses: ./.github/workflows/build_reusable.yml
with:
Expand All @@ -44,7 +53,7 @@ jobs:

check-types-precompiled:
name: types and precompiled
needs: ['build']
needs: ['build-native', 'build-next']

uses: ./.github/workflows/build_reusable.yml
with:
Expand All @@ -54,29 +63,56 @@ jobs:

test-cargo-unit:
name: test cargo unit
needs: ['build']
needs: ['build-next']

uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
needsRust: 'yes'
skipInstallBuild: 'yes'
skipNativeBuild: 'yes'
afterBuild: turbo run test-cargo-unit
secrets: inherit

test-cargo-integration:
name: test cargo integration
needs: ['build-next']

uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
needsNextest: 'yes'
needsRust: 'yes'
skipNativeBuild: 'yes'
afterBuild: xvfb-run turbo run test-cargo-integration

test-cargo-bench:
name: test cargo benchmarks
needs: ['build-next']

uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
needsRust: 'yes'
skipNativeBuild: 'yes'
afterBuild: xvfb-run turbo run test-cargo-bench

rust-check:
name: rust check
needs: ['build']
needs: ['build-next']

uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
needsRust: 'yes'
skipInstallBuild: 'yes'
skipNativeBuild: 'yes'
afterBuild: turbo run rust-check
secrets: inherit

test-turbopack-dev:
name: test turbopack dev
needs: ['build']
needs: ['build-native', 'build-next']
uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
Expand All @@ -85,8 +121,7 @@ jobs:

test-next-swc-wasm:
name: test next-swc wasm
needs: ['build']

needs: ['build-native', 'build-next']
uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
Expand All @@ -95,7 +130,7 @@ jobs:

test-dev:
name: test dev
needs: ['build']
needs: ['build-native', 'build-next']
strategy:
fail-fast: false
matrix:
Expand All @@ -109,7 +144,7 @@ jobs:

test-prod:
name: test prod
needs: ['build']
needs: ['build-native', 'build-next']
strategy:
fail-fast: false
matrix:
Expand All @@ -123,7 +158,7 @@ jobs:

test-integration:
name: test integration
needs: ['build']
needs: ['build-native', 'build-next']
strategy:
fail-fast: false
matrix:
Expand All @@ -138,7 +173,7 @@ jobs:

test-firefox-safari:
name: test firefox and safari
needs: ['build']
needs: ['build-native', 'build-next']

uses: ./.github/workflows/build_reusable.yml
with:
Expand All @@ -149,13 +184,16 @@ jobs:
tests-pass:
needs:
[
'build',
'build-native',
'build-next',
'lint',
'check-types-precompiled',
'test-dev',
'test-prod',
'test-integration',
'test-cargo-unit',
'test-cargo-integration',
'test-cargo-bench',
'rust-check',
'test-next-swc-wasm',
'test-turbopack-dev',
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/build_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
required: false
description: 'whether to skip pnpm install && pnpm build'
type: string
skipNativeBuild:
required: false
description: 'whether to skip building native modules'
type: string
skipForDocsOnly:
required: false
description: 'skip for docs only changes'
Expand All @@ -19,6 +23,10 @@ on:
required: false
description: 'version of Node.js to use'
type: string
needsRust:
required: false
description: 'if rust is needed'
type: string
needsNextest:
required: false
description: 'if nextest rust dep is needed'
Expand Down Expand Up @@ -67,6 +75,7 @@ jobs:
# local action -> needs to run after checkout
- name: Install Rust
uses: ./.github/actions/setup-rust
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}
with:
components: rustfmt, clippy

Expand All @@ -75,11 +84,15 @@ jobs:
uses: taiki-e/install-action@nextest

- run: rustc --version
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}

- run: npm i -g yarn "pnpm@${PNPM_VERSION}" "turbo@${TURBO_VERSION}" "@napi-rs/cli@${NAPI_CLI_VERSION}"

# 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 && cargo clean
- run: git clean -xdf && rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* /tmp/yarn-* /tmp/ncc-cache target

- run: cargo clean
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}

- run: echo "DOCS_CHANGE<<EOF" >> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT
name: check docs only change
Expand All @@ -90,6 +103,7 @@ jobs:
name: normalize versions

- run: turbo run build-native-release --summarize -- --target x86_64-unknown-linux-gnu
if: ${{ inputs.skipNativeBuild != 'yes' }}

- name: Upload next-swc artifact
if: ${{ inputs.uploadSwcArtifact == 'yes' }}
Expand Down

0 comments on commit 68a54d9

Please sign in to comment.