From 466cb5771c5c33e641537f0b49190d106e54e5e4 Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Mon, 20 Jul 2020 17:05:54 +0300 Subject: [PATCH] Support musl (#169) * Update git ignore file * Support musl --- .github/workflows/ci.yaml | 5 +++++ .gitignore | 1 + Makefile | 4 ++++ package.json | 1 + 4 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6203449..10d2ff7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,8 +25,13 @@ jobs: run: yarn install --ignore-scripts - name: Build addon + if: runner.os != 'Linux' run: make build-addon + - name: Build addon + if: runner.os == 'Linux' + run: make build-addon-linux + - name: Get minimal Node.js version from package.json (Linux & macOS) id: node-version-nix if: runner.os != 'Windows' diff --git a/.gitignore b/.gitignore index cae96bd..c187fc1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ prebuilds npm-debug.log package-lock.json +secp256k1-*.tgz yarn-error.log yarn.lock diff --git a/Makefile b/Makefile index f235b43..4057293 100644 --- a/Makefile +++ b/Makefile @@ -4,12 +4,16 @@ prebuildify = ./node_modules/.bin/prebuildify +prebuildify-cross = ./node_modules/.bin/prebuildify-cross # hack, otherwise GitHub Actions for Windows: # '.' is not recognized as an internal or external command, operable program or batch file. build-addon: $(prebuildify) --target node@10.0.0 --napi --strip && node -p "process.platform" +build-addon-linux: + $(prebuildify-cross) -i centos7-devtoolset7 -i alpine --target node@10.0.0 --napi --strip + nyc = ./node_modules/.bin/nyc diff --git a/package.json b/package.json index ec126dc..e445e0b 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "node-gyp": "^5.0.7", "nyc": "^15.0.0", "prebuildify": "^3.0.4", + "prebuildify-cross": "github:prebuild/prebuildify-cross#v4.0.0", "standard": "^14.3.1", "tap-dot": "^2.0.0", "tape": "^4.10.1",