Skip to content

Commit 952d192

Browse files
committed
ci: apply temporary fix of patching the systeminformation to not acquire cpu information
1 parent aeff66e commit 952d192

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ build:macos:
224224
- export PATH="$(npm root)/.bin:$PATH"
225225
- npm run prebuild --verbose
226226
- npm test -- --ci --coverage
227-
- which grep
227+
# Temporary fix for m1 mac runners: https://github.com/MatrixAI/js-db/pull/64#issuecomment-1607109864
228+
# Remove when upstream has fixed and you have updated `systeminformation` package
229+
- patch ./benches/index.ts < ./scripts/systeminformation-cpu.patch
228230
- npm run bench
229231
artifacts:
230232
when: always

scripts/brew-install.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,3 @@ brew install node@18
1414
brew link --overwrite node@18
1515
brew install python@3.9
1616
brew link --overwrite python@3.9
17-
brew install grep
18-
brew link --overwrite grep

scripts/systeminformation-cpu.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/benches/index.ts b/benches/index.ts
2+
index 5c96be7..ff58cec 100644
3+
--- a/benches/index.ts
4+
+++ b/benches/index.ts
5+
@@ -32,7 +32,6 @@ async function main(): Promise<void> {
6+
}
7+
await metricsFile.close();
8+
const systemData = await si.get({
9+
- cpu: '*',
10+
osInfo: 'platform, distro, release, kernel, arch',
11+
system: 'model, manufacturer',
12+
});

0 commit comments

Comments
 (0)