From f44ed9dad4567e80cb0a82f75164e59f899778da Mon Sep 17 00:00:00 2001 From: Hendra Gunawan <48410066+JadlionHD@users.noreply.github.com> Date: Fri, 22 Nov 2024 23:30:31 +0700 Subject: [PATCH] fix: remove freebsd & fix unit test --- .github/workflows/CI.yml | 53 ---------------------------------------- esm.mjs | 4 +-- 2 files changed, 2 insertions(+), 55 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 97df0b3..745ae87 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -146,58 +146,6 @@ jobs: name: bindings-${{ matrix.settings.target }} path: ${{ env.APP_NAME }}.*.node if-no-files-found: error - build-freebsd: - runs-on: macos-13 - name: Build FreeBSD - steps: - - uses: actions/checkout@v4 - - name: Build - id: build - uses: cross-platform-actions/action@v0.24.0 - env: - DEBUG: napi:* - RUSTUP_IO_THREADS: 1 - with: - operating_system: freebsd - version: "13.2" - memory: 8G - cpu_count: 3 - environment_variables: DEBUG RUSTUP_IO_THREADS - shell: bash - run: | - sudo pkg update - sudo pkg upgrade -y - sudo pkg install -y -f curl libnghttp2 npm - curl -fsSL https://nodejs.org/dist/v20.8.1/node-v20.8.1-freebsd-x64.tar.xz -o node-v20.tar.xz - tar -xf node-v20.tar.xz -C /usr/local --strip-components=1 - rm node-v20.tar.xz - sudo npm install -g yarn --ignore-scripts - curl https://sh.rustup.rs -sSf --output rustup.sh - sh rustup.sh -y --profile minimal --default-toolchain stable - source "$HOME/.cargo/env" - echo "~~~~ rustc --version ~~~~" - rustc --version - echo "~~~~ node -v ~~~~" - node -v - echo "~~~~ yarn --version ~~~~" - yarn --version - pwd - ls -lah - whoami - env - freebsd-version - yarn install - yarn build - yarn test - rm -rf node_modules - rm -rf target - rm -rf .yarn/cache - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: bindings-freebsd - path: ${{ env.APP_NAME }}.*.node - if-no-files-found: error test-macOS-windows-binding: name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} needs: @@ -444,7 +392,6 @@ jobs: name: Publish runs-on: ubuntu-latest needs: - - build-freebsd - test-macOS-windows-binding - test-linux-x64-gnu-binding - test-linux-x64-musl-binding diff --git a/esm.mjs b/esm.mjs index 08bd8e1..fd1cff5 100644 --- a/esm.mjs +++ b/esm.mjs @@ -4,8 +4,8 @@ const TankPacket = (await import("./dist/packets/TankPacket.js")).default; const TextPacket = (await import("./dist/packets/TextPacket.js")).default; const Variant = (await import("./dist/packets/Variant.js")).default; const ItemsDat = (await import("./dist/utils/ItemsDat.js")).default; +const Constants = (await import("./dist/Constants.js")).default; export * from "./native.js"; -export * from "./dist/Constants.js"; -export { Client, Peer, TankPacket, TextPacket, Variant, ItemsDat }; +export { Client, Peer, TankPacket, TextPacket, Variant, ItemsDat, Constants };