Skip to content

Commit

Permalink
workflows: Upgrade node version support in published binaries
Browse files Browse the repository at this point in the history
- Upgrade dependencies: 'node-pre-gyp' and 'cargo-cp-artifact'
  • Loading branch information
fordN committed Dec 6, 2023
1 parent a96b53c commit f20483b
Show file tree
Hide file tree
Showing 3 changed files with 406 additions and 403 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ name: "Publish binaries"

on:
push:
tags:
- '*'
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
publish-github:
Expand All @@ -15,25 +16,25 @@ jobs:
# (https://github.com/bchr02/node-pre-gyp-github/issues/42)
fail-fast: false
matrix:
node_version: [14, 16, 17]
node_version: [18, 19, 20]
system:
- os: macos-latest
- os: macos-12
target: x86_64-apple-darwin
- os: ubuntu-18.04
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
include:
## ARM64 builds are not working. No ARM64 GitHub Action runners available out of box. Need to nail down cross compile
# - node_version: 16
# system:
# os: macos-latest
# target: aarch64-apple-darwin
- node_version: 18
- node_version: 17
system:
os: ubuntu-22.04
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
- node_version: 18
- node_version: 17
system:
os: macos-latest
os: macos-11
target: x86_64-apple-darwin
runs-on: ${{ matrix.system.os }}
steps:
Expand All @@ -50,8 +51,10 @@ jobs:
toolchain: stable
target: ${{ matrix.system.target }}
override: true
- name: Setup python
run: python3 -m pip install setuptools
- name: Install dependencies
working-directory: ./node-plugin
working-directory: ./
run: yarn install --ignore-scripts
- name: Compile binary, test, package, and publish to Github release page
env:
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/cost-model",
"version": "0.1.16",
"version": "0.1.18",
"description": "Cost model",
"main": "node-plugin/lib/index.js",
"types": "/node-plugin/lib/index.d.ts",
Expand Down Expand Up @@ -35,11 +35,11 @@
"build-test-pack-publish": "yarn build-release && yarn test && yarn package && yarn publish-github",
"install": "node-pre-gyp install --fallback-to-build=false --update-binary || yarn build-release",
"test": "jest",
"clean": "cargo clean && rm -rf ./node-plugin/native ./build ./node_modules"
"clean": "cargo clean && rm -rf ./node-plugin/native ./build ./node_modules ./target"
},
"dependencies": {
"@mapbox/node-pre-gyp": "1.0.9",
"cargo-cp-artifact": "0.1.6"
"@mapbox/node-pre-gyp": "1.0.11",
"cargo-cp-artifact": "0.1.8"
},
"devDependencies": {
"jest": "27.5.1",
Expand Down
Loading

0 comments on commit f20483b

Please sign in to comment.