Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add musl pre-built builds for utp-native #51

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,36 @@ jobs:
build:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-16.04]
os: [windows-latest, macos-latest, ubuntu-20.04]
runs-on: ${{ matrix.os }}
name: Build
steps:
- uses: actions/[email protected]
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x
- run: sudo apt install -y musl musl-tools
if: ${{ matrix.os == 'ubuntu-20.04' }}
- run: npm run fetch-libutp
- run: npm install
- run: npm run prebuild
- run: npm run prebuild-ia32
if: ${{ matrix.os == 'windows-latest' }}
- run: npm run prebuild-musl
if: ${{ matrix.os == 'ubuntu-20.04' }}
env:
CC: musl-gcc
CXX: musl-gcc
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}
path: ./prebuilds
release:
name: Create Release
runs-on: ubuntu-16.04
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -51,7 +60,7 @@ jobs:
- name: Compress builds
run: |
tar --create --verbose --file="./${{ steps.get_version.outputs.VERSION }}-windows-all.tar" --directory "prebuilds/windows-latest" .
tar --create --verbose --file="./${{ steps.get_version.outputs.VERSION }}-linux-x86.tar" --directory "prebuilds/ubuntu-16.04" .
tar --create --verbose --file="./${{ steps.get_version.outputs.VERSION }}-linux-x86.tar" --directory "prebuilds/ubuntu-20.04" .
tar --create --verbose --file="./${{ steps.get_version.outputs.VERSION }}-osx-x86.tar" --directory "prebuilds/macos-latest" .
- name: Upload x86 build
uses: actions/upload-release-asset@v1
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "libutp"]
path = deps/libutp
url = git://github.com/mafintosh/libutp.git
url = https://github.com/mafintosh/libutp.git
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"test": "standard && tape test/net.js test/sockets.js test/udp.js",
"install": "node-gyp-build",
"fetch-libutp": "git submodule update --recursive --init",
"prebuild": "prebuildify --napi --strip",
"prebuild-ia32": "prebuildify --napi --strip --arch=ia32"
"prebuild": "prebuildify --napi --strip --tag-libc",
"prebuild-musl": "prebuildify --napi --strip --libc=musl --tag-libc",
"prebuild-ia32": "prebuildify --napi --strip --arch=ia32 --tag-libc"
},
"bin": {
"ucat": "./ucat.js"
Expand All @@ -28,7 +29,8 @@
"devDependencies": {
"prebuildify": "^4.1.2",
"standard": "^14.3.1",
"tape": "^4.11.0"
"tape": "^4.11.0",
"node-gyp": "^10.1.0"
},
"repository": {
"type": "git",
Expand Down