From fdabbd554fa464f9c35adae00092eb38c27ad79e Mon Sep 17 00:00:00 2001 From: Inrixia Date: Thu, 17 Oct 2024 15:31:15 +1300 Subject: [PATCH] Fix platform specific build issues --- .github/workflows/autoDev.yml | 6 +++++- .npmrc | 1 + package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .npmrc diff --git a/.github/workflows/autoDev.yml b/.github/workflows/autoDev.yml index 2e8ef7d..33b422b 100644 --- a/.github/workflows/autoDev.yml +++ b/.github/workflows/autoDev.yml @@ -53,13 +53,17 @@ jobs: - name: Build Binaries run: pnpm run build + - name: Rename Float for Windows + if: runner.os == 'Windows' + run: mv ./build/float ./build/float.exe + - name: Test Build Binaries run: pnpm run test - name: Upload Build Artifact uses: actions/upload-artifact@v4 with: - name: build-${{ matrix.runs-on }}${{ matrix.runs-on == 'windows-latest' && '.exe' || '' }} + name: build-${{ matrix.runs-on }} path: ./build/float # Release to GitHub (runs after tests) diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..f3b5690 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +shell-emulator=true \ No newline at end of file diff --git a/package.json b/package.json index a4b57e6..0f9ef87 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "checkLint": "eslint ./src", "sanity": "pnpm run checkLint && pnpm run test-esm && pnpm run build-windows-latest && pnpm run test-windows-latest", "test-esm": "pnpm run tsc && node ./dist/float.js --sanityCheck", - "test": "cd build && float --sanityCheck", + "test": "./build/float --sanityCheck", "makeBlob": "node --experimental-sea-config ./sea-config.json", "bundle": "pnpm run tsc && npx esbuild ./src/float.ts --bundle --minify --tree-shaking=true --platform=node --outfile=./dist/float.cjs", "inject": "npx postject ./build/float NODE_SEA_BLOB ./dist/float.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 --macho-segment-name NODE_SEA",