From 124cb6fcd2790cc3c6ffcdfbbad11497718f5b65 Mon Sep 17 00:00:00 2001 From: Gaspard van Koningsveld Date: Sat, 3 Apr 2021 23:33:00 -0700 Subject: [PATCH] Enable prebuilt binaries through Github actions #closes bnoordhuis/node-heapdump#152 --- .github/workflows/prebuild.yml | 50 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + package.json | 4 ++- 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/prebuild.yml diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml new file mode 100644 index 0000000..8258205 --- /dev/null +++ b/.github/workflows/prebuild.yml @@ -0,0 +1,50 @@ +name: Prebuild Binaries + +on: + push: + tags: + - "v*" + +jobs: + prebuild-linux: + name: Linux + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - run: sudo apt-get install g++-multilib + - uses: actions/setup-node@v1 + with: + node-version: 12.x + - uses: actions/checkout@v1 + - run: npm i + - run: npx prebuild -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 #-u ${{ secrets.GITHUB_TOKEN }} + - run: npx prebuild -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -a ia32 #-u ${{ secrets.GITHUB_TOKEN }} + - run: npx prebuild -t 7.0.0 -t 8.0.0 -t 9.0.0 -t 10.0.0 -t 11.0.0 -t 12.0.0 -r electron #-u ${{ secrets.GITHUB_TOKEN }} + - run: npx prebuild -t 7.0.0 -t 8.0.0 -t 9.0.0 -t 10.0.0 -t 11.0.0 -t 12.0.0 -r electron -a ia32 #-u ${{ secrets.GITHUB_TOKEN }} + + prebuild-macos: + name: macOS + runs-on: macos-latest + timeout-minutes: 30 + steps: + - uses: actions/setup-node@v1 + with: + node-version: 12.x + - uses: actions/checkout@v1 + - run: npm i + - run: npx prebuild -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 #-u ${{ secrets.GITHUB_TOKEN }} + - run: npx prebuild -t 7.0.0 -t 8.0.0 -t 9.0.0 -t 10.0.0 -t 11.0.0 -t 12.0.0 -r electron #-u ${{ secrets.GITHUB_TOKEN }} + + prebuild-windows: + name: Windows + runs-on: windows-latest + timeout-minutes: 30 + steps: + - uses: actions/setup-node@v1 + with: + node-version: 12.x + - uses: actions/checkout@v1 + - run: npm i + - run: cd node_modules/prebuild ; npm i node-gyp@5 + - run: npx prebuild -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 #-u ${{ secrets.GITHUB_TOKEN }} --verbose + - run: npx prebuild -t 7.0.0 -t 8.0.0 -t 9.0.0 -t 10.0.0 -t 11.0.0 -t 12.0.0 -r electron #-u ${{ secrets.GITHUB_TOKEN }} --verbose \ No newline at end of file diff --git a/.gitignore b/.gitignore index 425e761..946ab2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /.lock-wscript /build/ /node_modules/ +prebuilds heapdump-*.heapsnapshot heapdump-*.log diff --git a/package.json b/package.json index 95180f7..4c3a213 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,11 @@ "test": "tap test/test-*" }, "dependencies": { - "nan": "^2.13.2" + "nan": "^2.13.2", + "prebuild-install": "^5.3.3" }, "devDependencies": { + "prebuild": "^9.1.1", "shelljs": "~0.3.0", "tap": "~0.4.12" }