-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
171b221
commit 52e527a
Showing
4 changed files
with
42 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,21 +96,21 @@ jobs: | |
- name: 🚀 Run specified benchmark | ||
run: cd scripts && ONLY_INSTALL_SIZE=${{ github.event.inputs.onlyInstallSize }} GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} COMMIT_ID=${{ github.event.inputs.commitId }} pnpm start ${{ matrix.product }} ${{ matrix.case }} | ||
|
||
- name: Setup git user | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
# - name: Setup git user | ||
# run: | | ||
# git config --global user.name "github-actions[bot]" | ||
# git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
|
||
- name: Install rsync | ||
run: | | ||
apt-get update && apt-get install -y rsync | ||
# - name: Install rsync | ||
# run: | | ||
# apt-get update && apt-get install -y rsync | ||
|
||
- name: Update data | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: data | ||
target-folder: data | ||
git-config-name: gh-pages-bot | ||
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com | ||
clean: false | ||
# - name: Update data | ||
# uses: JamesIves/[email protected] | ||
# with: | ||
# branch: gh-pages | ||
# folder: data | ||
# target-folder: data | ||
# git-config-name: gh-pages-bot | ||
# git-config-email: 41898282+github-actions[bot]@users.noreply.github.com | ||
# clean: false |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ import { | |
import fastGlob from 'fast-glob'; | ||
import { performance } from 'perf_hooks'; | ||
import getFolderSize from 'get-folder-size'; | ||
import { familySync as getLibcFamilySync } from 'detect-libc'; | ||
|
||
const getAllDeps = (json: Record<string, Record<string, string>>) => ({ | ||
...json.dependencies, | ||
|
@@ -99,7 +100,7 @@ const getPkgVersions = async (repoPath: string, pkgJsonPath: string) => { | |
|
||
const setPkgVersion = async (repoPath: string, pkgJsonPath: string) => { | ||
const pkgVersions = await getPkgVersions(repoPath, pkgJsonPath); | ||
const pkgJson = await readJson(pkgJsonPath); | ||
let pkgJson = await readJson(pkgJsonPath); | ||
|
||
// override workspace protocol | ||
Object.keys(pkgVersions).forEach(key => { | ||
|
@@ -111,11 +112,23 @@ const setPkgVersion = async (repoPath: string, pkgJsonPath: string) => { | |
} | ||
}); | ||
|
||
// use supportedArchitectures, see https://github.com/pnpm/pnpm/releases/tag/v8.10.0 | ||
pkgJson = { | ||
...pkgJson, | ||
packageManager: '[email protected]', | ||
pnpm: { | ||
supportedArchitectures: { | ||
libc: ['musl'], | ||
}, | ||
}, | ||
}; | ||
|
||
await outputJson(pkgJsonPath, pkgJson, { spaces: 2 }); | ||
}; | ||
|
||
const runInstall = async (casePath: string) => { | ||
const coldStartTime = performance.now(); | ||
await runCommand(casePath, 'corepack enable && pnpm -v'); | ||
await runCommand( | ||
casePath, | ||
'pnpm install --registry https://registry.npmjs.org/', | ||
|
@@ -165,6 +178,7 @@ const getDepCount = async (casePath: string) => { | |
}; | ||
|
||
export const pnpmInstall = async (productName: string, caseName: string) => { | ||
console.log('getLibcFamilySync: ', getLibcFamilySync()); | ||
const repoPath = getRepoPath(getRepoName(productName)); | ||
const tempPath = getTempPath(productName); | ||
const casePath = join(tempPath, caseName); | ||
|
@@ -192,6 +206,8 @@ export const pnpmInstall = async (productName: string, caseName: string) => { | |
const installSize = await getInstallSize(casePath); | ||
const depCount = await getDepCount(casePath); | ||
|
||
await runCommand(join(casePath, 'node_modules/@rspack'), 'ls -l'); | ||
|
||
return saveMetrics({ | ||
coldInstallTime: coldInstallTime, | ||
hotInstallTime: hotInstallTime, | ||
|