Skip to content

Commit

Permalink
Exclude musl from target (vercel#30548)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Oct 28, 2021
1 parent 387d656 commit 14d3f01
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 56 deletions.
112 changes: 57 additions & 55 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ jobs:
- build-native
- build-windows-i686
- build-windows-aarch64
- build-linux-musl
# Temporarily disabled
# - build-linux-musl
- build-linux-arm7
- build-linux-aarch64
- build-android-aarch64
Expand Down Expand Up @@ -685,60 +686,61 @@ jobs:
with:
name: next-swc-binaries
path: packages/next/native/next-swc.win32-arm64-msvc.node

build-linux-musl:
needs: build
if: ${{ needs.build.outputs.isRelease == 'true' }}
name: next-swc - linux-musl - node@lts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change

- name: Login to registry
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
run: |
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
env:
DOCKER_REGISTRY_URL: ghcr.io
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

- name: Cache
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
uses: actions/cache@v2
with:
path: |
target/
key: linux-musl-publish-integration

- name: Pull docker image
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
run: |
docker pull ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
docker tag ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine builder
- name: Cache native binary
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
id: binary-cache
uses: actions/cache@v2
with:
path: packages/next/native/next-swc.linux-x64-musl.node
key: next-swc-nightly-2021-08-12-linux-x64-musl-${{ hashFiles('.github/workflows/build_test_deploy.yml', 'packages/next/build/swc/**') }}

- name: 'Build'
if: ${{ steps.binary-cache.outputs.cache-hit != 'true' && steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
run: |
docker run --rm -v $(pwd)/packages/next:/swc -w /swc builder sh -c "yarn build-native"
- name: Upload artifact
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
uses: actions/upload-artifact@v2
with:
name: next-swc-binaries
path: packages/next/native/next-swc.linux-x64-musl.node

# Temporarily disabled
# build-linux-musl:
# needs: build
# if: ${{ needs.build.outputs.isRelease == 'true' }}
# name: next-swc - linux-musl - node@lts
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2

# - run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
# id: docs-change

# - name: Login to registry
# if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
# run: |
# docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
# env:
# DOCKER_REGISTRY_URL: ghcr.io
# DOCKER_USERNAME: ${{ github.actor }}
# DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

# - name: Cache
# if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
# uses: actions/cache@v2
# with:
# path: |
# target/
# key: linux-musl-publish-integration

# - name: Pull docker image
# if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
# run: |
# docker pull ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
# docker tag ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine builder

# - name: Cache native binary
# if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
# id: binary-cache
# uses: actions/cache@v2
# with:
# path: packages/next/native/next-swc.linux-x64-musl.node
# key: next-swc-nightly-2021-08-12-linux-x64-musl-${{ hashFiles('.github/workflows/build_test_deploy.yml', 'packages/next/build/swc/**') }}

# - name: 'Build'
# if: ${{ steps.binary-cache.outputs.cache-hit != 'true' && steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
# run: |
# docker run --rm -v $(pwd)/packages/next:/swc -w /swc builder sh -c "yarn build-native"

# - name: Upload artifact
# if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
# uses: actions/upload-artifact@v2
# with:
# name: next-swc-binaries
# path: packages/next/native/next-swc.linux-x64-musl.node

build-linux-aarch64:
needs: build
Expand Down
1 change: 0 additions & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@
"triples": {
"defaults": true,
"additional": [
"x86_64-unknown-linux-musl",
"i686-pc-windows-msvc",
"aarch64-unknown-linux-gnu",
"armv7-unknown-linux-gnueabihf",
Expand Down

0 comments on commit 14d3f01

Please sign in to comment.