Skip to content

Commit

Permalink
Merge pull request #74 from Contrast-Security-Inc/NODE-3519-retire-pr…
Browse files Browse the repository at this point in the history
…ebuildify-cross

decruft pass
  • Loading branch information
bmacnaughton authored Jul 22, 2024
2 parents c479315 + 7342943 commit 5131bc2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 34 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/release-no-prebuildify-cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22.5.1
# - name: Update npm
# run: npm install -g npm@10
# new versions of python don't include distutils. setuptools provides it.
# - name: Install setuptools
# run: pip install setuptools
- name: Install dependencies
run: npm ci --ignore-scripts
- name: whoami
run: id
# build each image inline so the matrix doesn't checkout, install, install each time.
- name: Build alpine
run: docker run --rm -v ${{ github.workspace }}:/repo -w /repo -u $(id -u) ghcr.io/bmacnaughton/alpine
Expand Down Expand Up @@ -72,13 +65,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22.5.1
# - name: Update npm
# run: npm install -g npm@10
- name: Install dependencies
run: npm ci --ignore-scripts
# new versions of python don't include distutils. setuptools provides it.
- name: Install setuptools
run: pip install setuptools
- name: Build
run: npm run build:${{ matrix.build-group }}
shell: bash
Expand All @@ -98,10 +86,8 @@ jobs:
# - name: Set up node
# uses: actions/setup-node@v4
# with:
# node-version: 22
# node-version: 22.5.1
# registry-url: https://registry.npmjs.org
# - name: Update npm
# run: npm install -g npm@10
# - name: Install
# run: npm ci --ignore-scripts
# - name: Download artifacts
Expand Down
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,16 @@ const results = funcInfo(testFn);

## Building locally

`npm run build` will build the project for your current OS and architecture. This cleans
the prebuild directory first.
`npm run build` will build the project for your current OS and architecture.

`npm run download` will pull the most recent build artifacts from GitHub.

## Publishing

Simply run `npm version` and `git push && git push --tags`. CI will take care of
releasing.
Simply run `npm version` and `git push && git push --tags`. The `release` workflow runs when
a tag of the form `v1.2.3` is pushed.

## Temporary note
## Temporary code

```
bruce:~/.../csi/fn-inspect$ npm uninstall prebuildify-cross
removed 226 packages, and audited 425 packages in 784ms
89 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
```
Node version 22.5.0 ships with a very broken `npm`. This hardcodes version 22.5.1 until
github actions stops defaulting to 22.5.0 when node version 22 is specified.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"prebuild": "npm run clean",
"build": "prebuildify -t 16.9.1 -t 18.7.0 -t 20.5.0 -t 22.2.0 --strip --napi false",
"build:linux": "prebuildify-cross -i centos7-devtoolset7 -i alpine -i linux-arm64 -t 16.9.1 -t 18.7.0 -t 20.5.0 -t 22.2.0 --strip --napi false",
"build:darwin": "prebuildify -t 16.9.1 -t 18.7.0 -t 20.5.0 -t 22.2.0 --strip --napi false --arch x64+arm64",
"build:win32": "prebuildify -t 16.9.1 -t 18.7.0 -t 20.5.0 -t 22.2.0 --strip --napi false",
"build:darwin": "npm run build -- --arch x64+arm64",
"build:win32": "npm run build",
"clean": "rimraf build/ coverage/ prebuilds/",
"download": "node scripts/download-artifacts.js",
"test": "c8 --reporter lcov --reporter text mocha .",
Expand Down
3 changes: 1 addition & 2 deletions scripts/build-generic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ target=$1

common="-t 16.9.1 -t 18.7.0 -t 20.5.0 -t 22.2.0 --strip --napi false"

id
ls -l . node_modules/.bin node_modules/prebuildify
# this is useful for debugging.
npm ls

case $target in
Expand Down

0 comments on commit 5131bc2

Please sign in to comment.