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

fix: add 32-bit builds #311

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3721dba
fix: add 32-bit builds
okdistribute Mar 18, 2020
ba40b44
fix: update github action to create separate 32bit build
okdistribute Mar 18, 2020
2d4d2b2
fix: 32 bit builds..
okdistribute Mar 18, 2020
ef8562f
update strategy
okdistribute Mar 18, 2020
13f6134
update strateegy
okdistribute Mar 18, 2020
512a139
more testing
okdistribute Mar 18, 2020
d9b4933
use a config..
okdistribute Mar 18, 2020
2bc8224
update architecture build
okdistribute Mar 18, 2020
d905a98
build 32 bit with exe..
okdistribute Mar 19, 2020
52239aa
windows
okdistribute Mar 19, 2020
e1786a8
fix: disable asar packaging for windows builds
okdistribute Mar 19, 2020
3881da6
compile native modules using x32
okdistribute Mar 19, 2020
30f8052
add specific win32 build
okdistribute Mar 19, 2020
136bb1b
add config
okdistribute Mar 19, 2020
e84ad21
build ia32 builds specifically
okdistribute Mar 19, 2020
de2b151
specify arch in npm
okdistribute Mar 19, 2020
94ea628
some janky testing cause github actions has incomplete docs
okdistribute Mar 19, 2020
064e3f9
typo
okdistribute Mar 19, 2020
fcc06aa
rebuild leveldown from source
okdistribute Mar 19, 2020
941951d
build without asar in windows
okdistribute Mar 20, 2020
23c6a1c
add rebuild-leveldb back
okdistribute Mar 20, 2020
04d4544
typo
okdistribute Mar 20, 2020
8e447bc
add cross-env
okdistribute Mar 20, 2020
e62bec6
fix: add leveldown rebuild with node-gyp
okdistribute Mar 20, 2020
cab3407
for windows, use simple node-gyp setup
okdistribute Mar 20, 2020
0cdabdb
use node 12.4
okdistribute Mar 20, 2020
b951306
testing
okdistribute Mar 20, 2020
b381374
attempt 1000
okdistribute Mar 20, 2020
b02819b
attempt 1001
okdistribute Mar 20, 2020
7de63b4
don't rebuild leveldown for electron
okdistribute Mar 20, 2020
e515f77
rebuild deps for arch
okdistribute Mar 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ on: [push]

jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.config.os }}

strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
config:
- { os: macos-latest, arch: x64, name: macos-latest }
- { os: ubuntu-latest, arch: x64, name: ubuntu-latest }
- { os: windows-latest, arch: x64, name: windows-latest }
- { os: windows-latest, arch: ia32, name: windows-latest-32 }

steps:
- name: Context
Expand All @@ -18,27 +22,30 @@ jobs:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Use Node.js 8.x
- name: Use Node.js 12.4
uses: actions/setup-node@v1
with:
node-version: 8.x
node-version: 12.4
architecture: ${{matrix.config.arch}}
- name: npm install
run: |
npm install
env:
npm_config_arch: ${{matrix.config.arch}}
- name: npm run rebuild-deps
run: |
npm run rebuild-deps -- -a ${{matrix.config.arch}}
- name: Lint
run: |
npm run lint
- name: Rebuild native deps for Electron
run: |
npm run rebuild-leveldb
- name: Build frontend
run: |
npm run build
env:
CI: true
- name: Publish
run: |
npm run dist
npm run dist
env:
CI: true
GITHUB_CI_REF: ${{ github.ref }}
Expand All @@ -65,5 +72,5 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.os }}
name: ${{ matrix.config.name }}
path: dist
4 changes: 3 additions & 1 deletion bin/release_latest.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,19 @@ gh.readFile(config.filename, { ref: config.branches[0] }, function (err, data) {
var version = config.version
var macLine = `/mapeo/latest/mac https://github.com/digidem/mapeo-desktop/releases/download/v${version}/Installar_Mapeo_v${version}_mac.dmg 302`
var windowsLine = `/mapeo/latest/windows https://github.com/digidem/mapeo-desktop/releases/download/v${version}/Installar_Mapeo_v${version}_win.exe 302`
var linuxLine = `/mapeo/latest/linux https://github.com/digidem/mapeo-desktop/releases/download/v${version}/Installar_Mapeo_v${version}_linux.deb 302`
var res = []
data
.toString()
.split('\n')
.map(function (line) {
if (line.length > 0 && !line.match(/mapeo\/latest\//)) {
if (line.length > 0 && !line.match(/mapeo\/latest\/(mac|windows|linux)/)) {
res.push(line.trim())
}
})
res.push(macLine)
res.push(windowsLine)
res.push(linuxLine)
data = res.join('\n') + '\n'

var pending = config.branches.length
Expand Down
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"main": "index.js",
"engine": {
"node": "8.11.4"
"node": "12.4"
},
"scripts": {
"clean": "rimraf \"dist/\"",
Expand All @@ -20,7 +20,7 @@
"check:prod-unused": "dependency-check package.json --entry index.js --entry src/renderer/app.js --no-dev --detective precinct -i electron -i electron-devtools-installer --unused -i @babel/runtime -i @fortawesome/fontawesome-svg-core -i date-fns -i html-react-parser -i mapbox-gl",
"check:dev": "dependency-check package.json --entry index.js --entry 'test/**.js' --entry src/renderer/app.js --entry 'stories/**.js' --detective precinct",
"pack": "electron-builder --dir",
"dist": "electron-builder --publish=onTag",
"dist": "electron-builder --x64 --ia32 --publish=onTag",
"build": "npm-run-all -s build:translations build:js",
"build:js": "webpack",
"build:translations": "node bin/build-translations.js",
Expand All @@ -32,8 +32,8 @@
"start": "electron . --disable-http-cache",
"server": "node index.js --headless",
"dev": "electron . --debug --disable-http-cache",
"postinstall": "patch-package && electron-builder install-app-deps",
"rebuild-leveldb": "electron-rebuild -o leveldown",
"postinstall": "patch-package",
"rebuild-deps": "electron-rebuild -f -o utp-native,sodium-native,fd-lock",
"license-check": "license-check",
"release": "standard-version",
"release:beta": "standard-version --prerelease beta",
Expand Down Expand Up @@ -79,12 +79,14 @@
"asar": "^1.0.0",
"clsx": "^1.0.4",
"core-js": "^3.3.5",
"cross-env": "^7.0.2",
"d3-dsv": "^1.1.1",
"date-fns": "^2.1.0",
"ecstatic": "^2.2.1",
"electron-context-menu": "^0.15.0",
"electron-debug": "^1.5.0",
"electron-is-dev": "^1.1.0",
"electron-rebuild": "^1.10.1",
"electron-store": "^5.0.0",
"electron-timber": "^0.5.1",
"flat": "^5.0.0",
Expand Down Expand Up @@ -145,7 +147,6 @@
"electron": "^6.0.10",
"electron-builder": "^21.2.0",
"electron-devtools-installer": "^2.2.4",
"electron-rebuild": "^1.8.6",
"eslint": "^6.4.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.18.2",
Expand Down Expand Up @@ -194,6 +195,10 @@
"mac": {
"category": "public.app-category.utilities"
},
"win": {
"asar": false,
"target": "NSIS"
},
"linux": {
"target": [
"AppImage",
Expand Down