From aa5ae35d91e74b587a5d0f131816eb90d410ae3d Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Thu, 5 Dec 2024 12:12:50 -0700 Subject: [PATCH 1/4] objdump --- etc/install-zstd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/install-zstd.sh b/etc/install-zstd.sh index 0e2945a..e300218 100644 --- a/etc/install-zstd.sh +++ b/etc/install-zstd.sh @@ -40,6 +40,7 @@ build_zstd() { ../build/cmake cmake --build . --target libzstd_static + objdump --syms lib/Debug/zstd_static.lib } clean_deps From 0a9568a0f5960ff69ce6ff4993e72e318d8b86ed Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Thu, 5 Dec 2024 12:16:38 -0700 Subject: [PATCH 2/4] add grep --- .github/workflows/test.yml | 160 +++++++++++++++++++------------------ etc/install-zstd.sh | 2 +- 2 files changed, 82 insertions(+), 80 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 89f9590..e521abd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,8 +11,10 @@ jobs: host_tests: strategy: matrix: - os: [macos-latest, windows-2019, macos-13] - node: [16.20.1, 18.x, 20.x, 22.x] + os: [windows-2019] + # os: [macos-latest, windows-2019, macos-13] + # node: [16.20.1, 18.x, 20.x, 22.x] + node: [16.20.1] fail-fast: false runs-on: ${{ matrix.os }} steps: @@ -36,80 +38,80 @@ jobs: shell: bash run: npm test - container_tests_glibc: - runs-on: ubuntu-latest - strategy: - matrix: - linux_arch: [s390x, arm64, amd64] - node: [16.x, 18.x, 20.x, 22.x] - fail-fast: false - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node }} - - - name: Get Full Node.js Version - id: get_nodejs_version - shell: bash - run: | - echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT" - echo "ubuntu_version=$(node --print '(+process.version.slice(1).split(`.`).at(0)) > 16 ? `noble` : `bionic`')" >> "$GITHUB_OUTPUT" - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Run Buildx - run: | - docker buildx create --name builder --bootstrap --use - docker buildx build \ - --platform linux/${{ matrix.linux_arch }} \ - --build-arg="NODE_ARCH=${{ matrix.linux_arch == 'amd64' && 'x64' || matrix.linux_arch }}" \ - --build-arg="NODE_VERSION=${{ steps.get_nodejs_version.outputs.version }}" \ - --build-arg="UBUNTU_VERSION=${{ steps.get_nodejs_version.outputs.ubuntu_version }}" \ - --build-arg="RUN_TEST=true" \ - --output type=local,dest=./prebuilds,platform-split=false \ - -f ./.github/docker/Dockerfile.glibc \ - . - - container_tests_musl: - runs-on: ubuntu-latest - strategy: - matrix: - linux_arch: [amd64, arm64] - node: [16.20.1, 18.x, 20.x, 22.x] - fail-fast: false - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node }} - - - name: Get Full Node.js Version - id: get_nodejs_version - shell: bash - run: | - echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT" - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Run Buildx - run: | - docker buildx create --name builder --bootstrap --use - docker --debug buildx build --progress=plain --no-cache \ - --platform linux/${{ matrix.linux_arch }} \ - --build-arg="PLATFORM=${{ matrix.linux_arch == 'arm64' && 'arm64v8' || matrix.linux_arch }}" \ - --build-arg="NODE_VERSION=${{ steps.get_nodejs_version.outputs.version }}" \ - --build-arg="RUN_TEST=true" \ - --output type=local,dest=./prebuilds,platform-split=false \ - -f ./.github/docker/Dockerfile.musl \ - . + # container_tests_glibc: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # linux_arch: [s390x, arm64, amd64] + # node: [16.x, 18.x, 20.x, 22.x] + # fail-fast: false + # steps: + # - uses: actions/checkout@v4 + + # - uses: actions/setup-node@v4 + # with: + # node-version: ${{ matrix.node }} + + # - name: Get Full Node.js Version + # id: get_nodejs_version + # shell: bash + # run: | + # echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT" + # echo "ubuntu_version=$(node --print '(+process.version.slice(1).split(`.`).at(0)) > 16 ? `noble` : `bionic`')" >> "$GITHUB_OUTPUT" + + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 + + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + + # - name: Run Buildx + # run: | + # docker buildx create --name builder --bootstrap --use + # docker buildx build \ + # --platform linux/${{ matrix.linux_arch }} \ + # --build-arg="NODE_ARCH=${{ matrix.linux_arch == 'amd64' && 'x64' || matrix.linux_arch }}" \ + # --build-arg="NODE_VERSION=${{ steps.get_nodejs_version.outputs.version }}" \ + # --build-arg="UBUNTU_VERSION=${{ steps.get_nodejs_version.outputs.ubuntu_version }}" \ + # --build-arg="RUN_TEST=true" \ + # --output type=local,dest=./prebuilds,platform-split=false \ + # -f ./.github/docker/Dockerfile.glibc \ + # . + + # container_tests_musl: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # linux_arch: [amd64, arm64] + # node: [16.20.1, 18.x, 20.x, 22.x] + # fail-fast: false + # steps: + # - uses: actions/checkout@v4 + + # - uses: actions/setup-node@v4 + # with: + # node-version: ${{ matrix.node }} + + # - name: Get Full Node.js Version + # id: get_nodejs_version + # shell: bash + # run: | + # echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT" + + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 + + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + + # - name: Run Buildx + # run: | + # docker buildx create --name builder --bootstrap --use + # docker --debug buildx build --progress=plain --no-cache \ + # --platform linux/${{ matrix.linux_arch }} \ + # --build-arg="PLATFORM=${{ matrix.linux_arch == 'arm64' && 'arm64v8' || matrix.linux_arch }}" \ + # --build-arg="NODE_VERSION=${{ steps.get_nodejs_version.outputs.version }}" \ + # --build-arg="RUN_TEST=true" \ + # --output type=local,dest=./prebuilds,platform-split=false \ + # -f ./.github/docker/Dockerfile.musl \ + # . diff --git a/etc/install-zstd.sh b/etc/install-zstd.sh index e300218..475362b 100644 --- a/etc/install-zstd.sh +++ b/etc/install-zstd.sh @@ -40,7 +40,7 @@ build_zstd() { ../build/cmake cmake --build . --target libzstd_static - objdump --syms lib/Debug/zstd_static.lib + objdump --syms lib/Debug/zstd_static.lib | grep debug } clean_deps From ee7e0a9dc18d4c87c0c47f4da171d0e9e4568ed5 Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Thu, 5 Dec 2024 12:24:02 -0700 Subject: [PATCH 3/4] Update etc/install-zstd.sh Co-authored-by: Neal Beeken --- etc/install-zstd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/install-zstd.sh b/etc/install-zstd.sh index 475362b..6084383 100644 --- a/etc/install-zstd.sh +++ b/etc/install-zstd.sh @@ -39,7 +39,7 @@ build_zstd() { -DCMAKE_BUILD_TYPE=Release \ ../build/cmake - cmake --build . --target libzstd_static + cmake --build . --target libzstd_static --config Release objdump --syms lib/Debug/zstd_static.lib | grep debug } From 6565172d39f7fc4c9d2051a8209e695db194f8f4 Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Thu, 5 Dec 2024 12:27:17 -0700 Subject: [PATCH 4/4] non-debug release windows --- .github/workflows/test.yml | 160 ++++++++++++++++++------------------- binding.gyp | 2 +- etc/install-zstd.sh | 1 - 3 files changed, 80 insertions(+), 83 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e521abd..89f9590 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,10 +11,8 @@ jobs: host_tests: strategy: matrix: - os: [windows-2019] - # os: [macos-latest, windows-2019, macos-13] - # node: [16.20.1, 18.x, 20.x, 22.x] - node: [16.20.1] + os: [macos-latest, windows-2019, macos-13] + node: [16.20.1, 18.x, 20.x, 22.x] fail-fast: false runs-on: ${{ matrix.os }} steps: @@ -38,80 +36,80 @@ jobs: shell: bash run: npm test - # container_tests_glibc: - # runs-on: ubuntu-latest - # strategy: - # matrix: - # linux_arch: [s390x, arm64, amd64] - # node: [16.x, 18.x, 20.x, 22.x] - # fail-fast: false - # steps: - # - uses: actions/checkout@v4 - - # - uses: actions/setup-node@v4 - # with: - # node-version: ${{ matrix.node }} - - # - name: Get Full Node.js Version - # id: get_nodejs_version - # shell: bash - # run: | - # echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT" - # echo "ubuntu_version=$(node --print '(+process.version.slice(1).split(`.`).at(0)) > 16 ? `noble` : `bionic`')" >> "$GITHUB_OUTPUT" - - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 - - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - - # - name: Run Buildx - # run: | - # docker buildx create --name builder --bootstrap --use - # docker buildx build \ - # --platform linux/${{ matrix.linux_arch }} \ - # --build-arg="NODE_ARCH=${{ matrix.linux_arch == 'amd64' && 'x64' || matrix.linux_arch }}" \ - # --build-arg="NODE_VERSION=${{ steps.get_nodejs_version.outputs.version }}" \ - # --build-arg="UBUNTU_VERSION=${{ steps.get_nodejs_version.outputs.ubuntu_version }}" \ - # --build-arg="RUN_TEST=true" \ - # --output type=local,dest=./prebuilds,platform-split=false \ - # -f ./.github/docker/Dockerfile.glibc \ - # . - - # container_tests_musl: - # runs-on: ubuntu-latest - # strategy: - # matrix: - # linux_arch: [amd64, arm64] - # node: [16.20.1, 18.x, 20.x, 22.x] - # fail-fast: false - # steps: - # - uses: actions/checkout@v4 - - # - uses: actions/setup-node@v4 - # with: - # node-version: ${{ matrix.node }} - - # - name: Get Full Node.js Version - # id: get_nodejs_version - # shell: bash - # run: | - # echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT" - - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 - - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - - # - name: Run Buildx - # run: | - # docker buildx create --name builder --bootstrap --use - # docker --debug buildx build --progress=plain --no-cache \ - # --platform linux/${{ matrix.linux_arch }} \ - # --build-arg="PLATFORM=${{ matrix.linux_arch == 'arm64' && 'arm64v8' || matrix.linux_arch }}" \ - # --build-arg="NODE_VERSION=${{ steps.get_nodejs_version.outputs.version }}" \ - # --build-arg="RUN_TEST=true" \ - # --output type=local,dest=./prebuilds,platform-split=false \ - # -f ./.github/docker/Dockerfile.musl \ - # . + container_tests_glibc: + runs-on: ubuntu-latest + strategy: + matrix: + linux_arch: [s390x, arm64, amd64] + node: [16.x, 18.x, 20.x, 22.x] + fail-fast: false + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + + - name: Get Full Node.js Version + id: get_nodejs_version + shell: bash + run: | + echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT" + echo "ubuntu_version=$(node --print '(+process.version.slice(1).split(`.`).at(0)) > 16 ? `noble` : `bionic`')" >> "$GITHUB_OUTPUT" + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Run Buildx + run: | + docker buildx create --name builder --bootstrap --use + docker buildx build \ + --platform linux/${{ matrix.linux_arch }} \ + --build-arg="NODE_ARCH=${{ matrix.linux_arch == 'amd64' && 'x64' || matrix.linux_arch }}" \ + --build-arg="NODE_VERSION=${{ steps.get_nodejs_version.outputs.version }}" \ + --build-arg="UBUNTU_VERSION=${{ steps.get_nodejs_version.outputs.ubuntu_version }}" \ + --build-arg="RUN_TEST=true" \ + --output type=local,dest=./prebuilds,platform-split=false \ + -f ./.github/docker/Dockerfile.glibc \ + . + + container_tests_musl: + runs-on: ubuntu-latest + strategy: + matrix: + linux_arch: [amd64, arm64] + node: [16.20.1, 18.x, 20.x, 22.x] + fail-fast: false + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + + - name: Get Full Node.js Version + id: get_nodejs_version + shell: bash + run: | + echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT" + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Run Buildx + run: | + docker buildx create --name builder --bootstrap --use + docker --debug buildx build --progress=plain --no-cache \ + --platform linux/${{ matrix.linux_arch }} \ + --build-arg="PLATFORM=${{ matrix.linux_arch == 'arm64' && 'arm64v8' || matrix.linux_arch }}" \ + --build-arg="NODE_VERSION=${{ steps.get_nodejs_version.outputs.version }}" \ + --build-arg="RUN_TEST=true" \ + --output type=local,dest=./prebuilds,platform-split=false \ + -f ./.github/docker/Dockerfile.musl \ + . diff --git a/binding.gyp b/binding.gyp index da470aa..4aa6259 100644 --- a/binding.gyp +++ b/binding.gyp @@ -23,7 +23,7 @@ { 'link_settings': { 'libraries': [ - '<(module_root_dir)/deps/zstd/out/lib/Debug/zstd_static.lib' + '<(module_root_dir)/deps/zstd/out/lib/Release/zstd_static.lib' ] }, }, diff --git a/etc/install-zstd.sh b/etc/install-zstd.sh index 6084383..1f3bae8 100644 --- a/etc/install-zstd.sh +++ b/etc/install-zstd.sh @@ -40,7 +40,6 @@ build_zstd() { ../build/cmake cmake --build . --target libzstd_static --config Release - objdump --syms lib/Debug/zstd_static.lib | grep debug } clean_deps