Skip to content

Commit

Permalink
Chore/rust workflow (vercel#30577)
Browse files Browse the repository at this point in the history
* Remove prebuilt binaries from repo

* Prefer locally built binary

* Add binary packages as optionalDependencies

* Remove build-native workflow for prebuilt binaries

* Remove binaries from checkCompiled job

* Change build-native command to default to dev

* Add build-native-dev and have tests depend on it

* Update contributing

* Run ls to make inspect artifact download

* Use correct artifact download path

* Try using reusable workflows

* Resort to duplication for now

* Inspect artifact download

* Ensure native is copied for PR stats

* Copy after ref checkout and log binaries for PR stats

* fix typo

* copy right before linking/packing

* Use fs.copy

* fix test for now

Co-authored-by: [email protected] <[email protected]>
  • Loading branch information
padmaia and ijjk authored Oct 29, 2021
1 parent c03e284 commit b5a8916
Show file tree
Hide file tree
Showing 16 changed files with 389 additions and 183 deletions.
4 changes: 4 additions & 0 deletions .github/actions/next-stats-action/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
// in case of noisy environment slowing down initial repo build
await exec(buildCommand, false, { timeout: 5 * 60 * 1000 })
}
await fs.copy(
path.join(__dirname, '../native'),
path.join(dir, 'packages/next/native')
)

logger(`Linking packages in ${dir}`)
const pkgPaths = await linkPackages(dir)
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/next-stats-action/src/prepare/repo-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ module.exports = (actionInfo) => {
// make sure native binaries are included in local linking
if (pkg === 'next') {
pkgData.files.push('native')
console.log(
'using swc binaries: ',
await exec(`ls ${path.join(path.dirname(pkgDataPath), 'native')}`)
)
}
await fs.writeFile(
pkgDataPath,
Expand Down
107 changes: 0 additions & 107 deletions .github/workflows/build_native.yml

This file was deleted.

Loading

0 comments on commit b5a8916

Please sign in to comment.