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

Exclude musl from target #30548

Merged
merged 2 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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