Skip to content

Commit

Permalink
Add information on console about current CPU architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
kelson42 committed Dec 9, 2023
1 parent 3052ba1 commit b0fdb8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ on:
jobs:

macOS:
runs-on: macos-12

strategy:
matrix:
node-version: [18, 20]
platform: [macos-13, macos-13-xlarge]
platform: [macos-12, macos-13-xlarge]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions download-libzim.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ const urlParser = require("url");

mkdirp.sync("./download");

console.info(`os.type() is '%s' and os.arch() gives '%s'`, os.type(), os.arch());

Check warning on line 11 in download-libzim.js

View check run for this annotation

codefactor.io / CodeFactor

download-libzim.js#L11

Replace ``os.type()·is·'%s'·and·os.arch()·gives·'%s'`,·os.type(),·os.arch()` with `⏎··`os.type()·is·'%s'·and·os.arch()·gives·'%s'`,⏎··os.type(),⏎··os.arch(),⏎` (prettier/prettier)

Check failure on line 11 in download-libzim.js

View workflow job for this annotation

GitHub Actions / Ubuntu-Jammy (18)

Replace ``os.type()·is·'%s'·and·os.arch()·gives·'%s'`,·os.type(),·os.arch()` with `⏎··`os.type()·is·'%s'·and·os.arch()·gives·'%s'`,⏎··os.type(),⏎··os.arch()⏎`

Check failure on line 11 in download-libzim.js

View workflow job for this annotation

GitHub Actions / Ubuntu-Jammy (20)

Replace ``os.type()·is·'%s'·and·os.arch()·gives·'%s'`,·os.type(),·os.arch()` with `⏎··`os.type()·is·'%s'·and·os.arch()·gives·'%s'`,⏎··os.type(),⏎··os.arch()⏎`

Check failure on line 11 in download-libzim.js

View workflow job for this annotation

GitHub Actions / Ubuntu-Focal (20)

Replace ``os.type()·is·'%s'·and·os.arch()·gives·'%s'`,·os.type(),·os.arch()` with `⏎··`os.type()·is·'%s'·and·os.arch()·gives·'%s'`,⏎··os.type(),⏎··os.arch()⏎`
const isMacOS = os.type() === "Darwin";
const isLinux = os.type() === "Linux";
const rawArch = os.arch();

const isAvailableArch =
rawArch === "x64" || rawArch === "arm" || rawArch === "arm64";

Expand Down

0 comments on commit b0fdb8b

Please sign in to comment.