Commit graph

23 commits

Author SHA1 Message Date
JJ Kasper
8997ab0812
Implement granular rust caching (#54582)
This fixes our caching for the docker builds as they were missing inputs
the other jobs had also enables caching the rust target cache which
improves build times when only changing our package and the lockfile
isn't invalidated.

Tested here https://github.com/vercel/next.js/actions/runs/5987764387
2023-08-26 18:54:14 -07:00
JJ Kasper
9a6ae144a9
Update swc runners config (#53939)
This fixes unexpected cache hits occurring causing latest next-swc
changes to not be built for the docker based builds. Noticed in our
turbo run summaries for these builds that no input files were detected
most likely due to older Node.js/pnpm versions being used from the old
Docker image.

This also updates to leverage new runner labels for better build perf
cutting build times down from over an hour down to around 20 min.

Fixes build issue on aarch64-linux-musl due to `TurboMalloc` not being
able to resolve. Test build done here
https://github.com/vercel/next.js/actions/runs/5850893681/job/15860929304

x-ref:
https://github.com/vercel/next.js/actions/runs/5843580924/job/15845848384

x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833506858
x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833506925
x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833507067
x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833507135
2023-08-13 19:02:48 -07:00
JJ Kasper
0c70b9fff6
Fix build-native turbo config (#53380)
The turbo cache is currently not being invalidated for our `build-native` jobs when the root `Cargo.lock` is changed so https://github.com/vercel/next.js/pull/53308 never actually got re-built/applied in CI and tests are unexpectedly passing. 

x-ref: [slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1690808468319679)

- Related to https://github.com/vercel/next.js/pull/52414
2023-07-31 14:00:30 +00:00
Steven
0abc874ed5
chore(ci): fix turbo input path globs (#52414)
This PR fixes turbo.json inputs to avoid cache hit when it should be cache miss.

Example PR it was incorrectly cached:

- [PR 52407](https://github.com/vercel/next.js/pull/52407)
- [Commit 06b780](06b780e15e)
- [Logs with cache hit](https://github.com/vercel/next.js/actions/runs/5488474758/jobs/10001427837#step:27:29)

The docs mention the glob is relative to the workspace (aka package) directory, not the monorepo root.

> inputs globs must be specified as relative paths rooted at the workspace directory.

https://turbo.build/repo/docs/reference/configuration#inputs
2023-07-08 01:57:24 +00:00
JJ Kasper
32ac3ef549
Ensure we run cargo-integration on next change (#51736)
This is currently only running for `next-swc` change but we want this
running on `next` change as well as they both impact these tests.

x-ref:
https://github.com/vercel/next.js/actions/runs/5362063391/jobs/9728782834
2023-06-23 21:57:29 -07:00
Leah
5d54eaaf18
type check tests (and convert next-test-utils.js to ts) (#51071)
Enables type checking for tests in CI and fixes a bunch of things related to that
2023-06-23 17:42:50 +00:00
Alex Kirszenberg
c6313606c9
Next Build Turbo POC (2) (#51546)
Another attempt at getting https://github.com/vercel/next.js/pull/49942 in.

This time, the mold install step is gated to Linux.
2023-06-22 08:03:44 +00:00
JJ Kasper
41ce805de5
Revert "Next Build Turbo POC (#49942)" (#51538)
This reverts commit 7d0bdab83e.

This is failing all builds blocking releases so this reverts it for now
to allow further investigation async.
2023-06-19 21:54:04 -07:00
Alex Kirszenberg
7d0bdab83e
Next Build Turbo POC (#49942)
This contains the original POC for `next build --turbo`. The implementation is _just enough_ to get pages building, and doesn't support the app router yet.

I'll write more details here on the implementation and what the next steps are next week.

Necessary changes on the Turbo side: https://github.com/vercel/turbo/pull/4998
2023-06-19 14:36:05 +00:00
Tobias Koppers
6b0a6f0c25
add turbopack integration tests to CI (#50904)
### What?

* enable turbopack tests in new CI
* split pre-build step into native and JS builds to allow to start
native tests faster
* update swc_core to sync with turbo
* update turbopack

### Why?

Running our test suite is still important as long we don't have the full
integration test suite enabled.

### Turbopack updates

* https://github.com/vercel/turbo/pull/5215 <!-- OJ Kwon - ci(workflow):
upload benchmark results to datadog -->
* https://github.com/vercel/turbo/pull/5239 <!-- OJ Kwon -
fix(swc_plugin): use shared runtime -->
* https://github.com/vercel/turbo/pull/3090 <!-- CHEN Yuan - Docs: prior
to run testcases, add guides to install dependencies for testcases. -->
* https://github.com/vercel/turbo/pull/5264 <!-- Tobias Koppers - update
test runner -->

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-12 07:47:43 -07:00
JJ Kasper
a3ab542630
Add new build and test workflow (#50436)
This adds new `build and test` and `build and deploy` workflows in favor
of the existing massive `build, test, and deploy` workflow. Since the
new workflows will use `pull_request_target` this waits to remove the
existing workflow until the new one is tested.

While testing this new workflow flakey behavior in tests have also been
addressed. Along with the new workflow we will also be leveraging new
runners which allow us to run tests against the production binary of
`next-swc` so this avoids slight differences in tests we've seen due to
running against the dev binary.

Furthermore we will have a new flow for allowing workflow runs on PRs
from external forks which will either require a comment be checking a
box approving the run after each change or a label added by the team.

The new flow also no longer relies on `actions/cache` or similar which
have proven to be pretty unreliable.

Tests runs with the new workflow can be seen here
https://github.com/vercel/next.js/actions/runs/5100673508/jobs/9169416949
2023-05-27 21:02:31 -07:00
Donny/강동윤
54ea0d95a0
feat: Allow trace-level logging for non-published release builds (#49564)
### What?

Disable `tracing/release_max_level_info` for non-published release
builds. I modified CI script to strip out logging for published
binaries.

### Why?

x-ref: https://vercel.slack.com/archives/C03EWR7LGEN/p1683621374204959

It's required to print logging for turbopack.

### How?

Closes WEB-1032

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2023-05-10 14:50:36 +02:00
Jan Kaifer
902bb40454
Remove unused code from test-pack turbo task (#48487)
We decided in https://github.com/vercel/next.js/pull/48308 that we won't
use `turbo` when packing packages for tests.

This PR removes all code associated with that effort. The whole thing
fas behind a flag, so it shouldn't affect anything.
fix NEXT-1025
2023-04-18 12:12:00 +00:00
Jan Kaifer
558d61f5fc
Fix turbo cache miss due to depending on gitignored files (#45166)
Workaround for this issue in turbo https://github.com/vercel/turbo/issues/2560

It caused that we always cache-missed.
2023-01-24 11:53:07 +00:00
Jan Kaifer
d7307cffb7
Fix turbo usage in tests (#44715) 2023-01-18 20:35:28 +01:00
OJ Kwon
3dd9af785c
build(cargo): fix turbopack + next-swc build (#43983)
Fixes WEB-301. 

This PR fixes build failure with latest turbopack, also update necessary
dependencies.

---

Edit by @kdy1:
 - Closes https://github.com/vercel/next.js/issues/43052
2022-12-19 13:10:02 -08:00
JJ Kasper
ea9c5aac5f
Update caching for swc turbo builds (#42929)
Updates to leverage turbo remote caching for the swc builds and
normalize the package versions to prevent repo version bumps from
un-necessarily invalidating the cache.

Full cache hits can be seen in this test run
https://github.com/vercel/next.js/actions/runs/3469932131/jobs/5797559609
2022-11-15 08:24:04 -08:00
Balázs Orbán
a83cfcdc78
chore: make sure polyfills are built for pnpm dev (#41062)
Re-lands #40335 but without modifying the lock file.


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-30 14:54:38 +00:00
Tim Neutkens
a78ce92ede Revert "chore: make sure polyfills are built for pnpm dev (#40335)"
This reverts commit 24f573f8be.
2022-09-30 15:16:17 +02:00
Balázs Orbán
24f573f8be
chore: make sure polyfills are built for pnpm dev (#40335)
Utilize `turbo` for `dev`, and make sure polyfills are built. Fixes #40334

Another option would be to document that an initial `pnpm build` is necessary in  [`CONTRIBUTING.md`](https://github.com/vercel/next.js/blob/canary/contributing.md#developing).

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-30 02:03:47 +00:00
JJ Kasper
1d1ffc88b7
Update to leverage turbo for build/prepublish (#37280)
* Update to leverage turbo for build/prepublish

* update path

* remove extra turbo config
2022-05-30 19:05:27 -05:00
OJ Kwon
951b29e5cc
build(actions): skip plugin features for non supported platform (#37229)
* build(actions): skip plugin features for non supported platform

* test builds

* update turbo config

* Revert "test builds"

This reverts commit 50bdb9765b9fcd4c09e4dcf6566f512ac1a30da0.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-05-26 20:32:43 -05:00
LongYinan
2012f4e7c6
Update components in GitHub Actions (#36669)
`build-native` jobs tested on https://github.com/vercel/next.js/runs/6288266017
2022-05-04 18:51:25 +00:00