Skip to content

Commit b357c19

Browse files
committed
test: 1
1 parent 171b221 commit b357c19

File tree

4 files changed

+42
-17
lines changed

4 files changed

+42
-17
lines changed

.github/workflows/manual.yaml

+16-16
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,21 @@ jobs:
9696
- name: 🚀 Run specified benchmark
9797
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 }}
9898

99-
- name: Setup git user
100-
run: |
101-
git config --global user.name "github-actions[bot]"
102-
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
99+
# - name: Setup git user
100+
# run: |
101+
# git config --global user.name "github-actions[bot]"
102+
# git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
103103

104-
- name: Install rsync
105-
run: |
106-
apt-get update && apt-get install -y rsync
104+
# - name: Install rsync
105+
# run: |
106+
# apt-get update && apt-get install -y rsync
107107

108-
- name: Update data
109-
uses: JamesIves/[email protected]
110-
with:
111-
branch: gh-pages
112-
folder: data
113-
target-folder: data
114-
git-config-name: gh-pages-bot
115-
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
116-
clean: false
108+
# - name: Update data
109+
# uses: JamesIves/[email protected]
110+
# with:
111+
# branch: gh-pages
112+
# folder: data
113+
# target-folder: data
114+
# git-config-name: gh-pages-bot
115+
# git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
116+
# clean: false

pnpm-lock.yaml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@pnpm/lockfile-file": "8.1.4",
3939
"@types/node": "17.0.35",
4040
"@types/fs-extra": "9.0.13",
41+
"detect-libc": "2.0.2",
4142
"get-folder-size": "2.0.1",
4243
"axios": "0.27.2",
4344
"execa": "5.1.1",

scripts/src/runners/pnpm-install.ts

+17-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
import fastGlob from 'fast-glob';
2020
import { performance } from 'perf_hooks';
2121
import getFolderSize from 'get-folder-size';
22+
import { familySync as getLibcFamilySync } from 'detect-libc';
2223

2324
const getAllDeps = (json: Record<string, Record<string, string>>) => ({
2425
...json.dependencies,
@@ -99,7 +100,7 @@ const getPkgVersions = async (repoPath: string, pkgJsonPath: string) => {
99100

100101
const setPkgVersion = async (repoPath: string, pkgJsonPath: string) => {
101102
const pkgVersions = await getPkgVersions(repoPath, pkgJsonPath);
102-
const pkgJson = await readJson(pkgJsonPath);
103+
let pkgJson = await readJson(pkgJsonPath);
103104

104105
// override workspace protocol
105106
Object.keys(pkgVersions).forEach(key => {
@@ -111,11 +112,23 @@ const setPkgVersion = async (repoPath: string, pkgJsonPath: string) => {
111112
}
112113
});
113114

115+
// use supportedArchitectures, see https://github.com/pnpm/pnpm/releases/tag/v8.10.0
116+
pkgJson = {
117+
...pkgJson,
118+
packageManager: '[email protected]',
119+
pnpm: {
120+
supportedArchitectures: {
121+
libc: ['glibc'],
122+
},
123+
},
124+
};
125+
114126
await outputJson(pkgJsonPath, pkgJson, { spaces: 2 });
115127
};
116128

117129
const runInstall = async (casePath: string) => {
118130
const coldStartTime = performance.now();
131+
await runCommand(casePath, 'corepack enable && pnpm -v');
119132
await runCommand(
120133
casePath,
121134
'pnpm install --registry https://registry.npmjs.org/',
@@ -165,6 +178,7 @@ const getDepCount = async (casePath: string) => {
165178
};
166179

167180
export const pnpmInstall = async (productName: string, caseName: string) => {
181+
console.log('getLibcFamilySync: ', getLibcFamilySync());
168182
const repoPath = getRepoPath(getRepoName(productName));
169183
const tempPath = getTempPath(productName);
170184
const casePath = join(tempPath, caseName);
@@ -192,6 +206,8 @@ export const pnpmInstall = async (productName: string, caseName: string) => {
192206
const installSize = await getInstallSize(casePath);
193207
const depCount = await getDepCount(casePath);
194208

209+
await runCommand(join(casePath, 'node_modules/@rspack'), 'ls -l');
210+
195211
return saveMetrics({
196212
coldInstallTime: coldInstallTime,
197213
hotInstallTime: hotInstallTime,

0 commit comments

Comments
 (0)