Skip to content

Commit

Permalink
More efforts for the x86 build
Browse files Browse the repository at this point in the history
  • Loading branch information
SleepyLeslie committed May 18, 2024
1 parent d88dc3c commit cb01a08
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.host }}
architecture: ${{ matrix.target }}

- name: Install dependencies
run: yarn install --network-timeout 300000
Expand All @@ -86,6 +86,7 @@ jobs:
# github endpoints hang up quite a bit, add one retry.
run: yarn run electron:ci || yarn run electron:ci
env:
TARGET_ARCH: ${{ matrix.target }}
GITHUB_TOKEN: ${{ github.token }}
DEBUG: electron-builder
APPLE_ID: ${{ secrets.APPLE_ID }}
Expand All @@ -96,6 +97,6 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.host }}
name: ${{ matrix.os }}-${{ matrix.host }}-${{ matrix.target }}
path: dist/grist-electron-*
if-no-files-found: "error"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"electron:preview": "electron core/_build/ext/app/electron/main.js",
"electron:dir": "electron-builder build --linux --dir",
"electron:linux": "electron-builder build --linux",
"electron:ci": "electron-builder build --publish always",
"electron:ci": "./scripts/ci.sh",
"electron": "electron-builder build --publish never",
"test": "cd core && rm -f junk.db && node _build/app/server/companion.js sqlite gristify junk.db && ls junk.db"
},
Expand Down
21 changes: 21 additions & 0 deletions scripts/ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -e

case $TARGET_ARCH in
"x86")
ARCHFLAG="--ia32"
;;
"x64")
ARCHFLAG="--x64"
;;
"arm64")
ARCHFLAG="--arm64"
;;
*)
echo "Target architecture $TARGET_ARCH not supported"
exit 1
;;
esac

electron-builder build $ARCHFLAG --publish always

0 comments on commit cb01a08

Please sign in to comment.