Skip to content

Commit 4ff852a

Browse files
committed
feat: Package for linux arm64
1 parent 03a08f0 commit 4ff852a

File tree

8 files changed

+101
-50
lines changed

8 files changed

+101
-50
lines changed

.github/workflows/package.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,16 @@ jobs:
134134
name: Neuron-Win
135135
path: release/Neuron-*-setup.exe
136136

137-
- name: Upload Neuron Linux
137+
- name: Upload Neuron Linux(x64)
138138
if: matrix.os == 'ubuntu-20.04'
139139
uses: actions/upload-artifact@v3
140140
with:
141-
name: Neuron-Linux
142-
path: release/Neuron-*.AppImage
141+
name: Neuron-Linux-x64
142+
path: release/Neuron-*-x86_64.AppImage
143+
144+
- name: Upload Neuron Linux(arm64)
145+
if: matrix.os == 'ubuntu-20.04'
146+
uses: actions/upload-artifact@v3
147+
with:
148+
name: Neuron-Linux-arm64
149+
path: release/Neuron-*-arm64.AppImage

.github/workflows/package_for_test.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,19 @@ jobs:
165165
name: Neuron-Win
166166
path: release/Neuron-*-setup.exe
167167

168-
- name: Upload Neuron Linux
168+
- name: Upload Neuron Linux(arm64)
169169
if: matrix.os == 'ubuntu-20.04'
170170
uses: actions/upload-artifact@v3
171171
with:
172-
name: Neuron-Linux
173-
path: release/Neuron-*.AppImage
172+
name: Neuron-Linux-arm64
173+
path: release/Neuron-*-arm64.AppImage
174+
175+
- name: Upload Neuron Linux(x64)
176+
if: matrix.os == 'ubuntu-20.04'
177+
uses: actions/upload-artifact@v3
178+
with:
179+
name: Neuron-Linux-x64
180+
path: release/Neuron-*-x86_64.AppImage
174181

175182
comment_when_package_success:
176183
needs: [packaging]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"resolutions": {
6565
"@types/react": "17.0.62",
6666
"react-i18next": ">=11.16.4",
67-
"usb": "1.8.8"
67+
"usb": "2.9.0"
6868
},
6969
"volta": {
7070
"node": "18.16.1"

packages/neuron-wallet/electron-builder.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,14 @@ linux:
7777
category: Finance
7878
icon: assets/icons/
7979
extraFiles:
80-
- from: "bin/linux/ckb"
80+
- from: "bin/linux/ckb-${arch}"
8181
to: "bin/ckb"
8282
- from: "bin/linux/ckb-light-client"
8383
to: "bin/ckb-light-client"
8484
- from: "light/ckb_light.toml"
8585
to: "light/ckb_light.toml"
8686
target:
87-
- AppImage
87+
- target: AppImage
88+
arch:
89+
- arm64
90+
- x64

packages/neuron-wallet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"@ckb-lumos/helpers": "0.20.0-alpha.3",
5252
"@ckb-lumos/rpc": "0.20.0-alpha.3",
5353
"@iarna/toml": "2.2.5",
54-
"@ledgerhq/hw-transport-node-hid": "6.27.16",
54+
"@ledgerhq/hw-transport-node-hid": "6.27.21",
5555
"@nervosnetwork/ckb-sdk-core": "0.109.0",
5656
"archiver": "5.3.0",
5757
"async": "3.2.4",

scripts/download-ckb.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,30 @@ function download_macos_light() {
4747
}
4848

4949
function download_linux() {
50+
download_linux_x86_64
51+
download_linux_aarch64
52+
}
53+
54+
function download_linux_x86_64() {
5055
# Linux
5156
CKB_FILENAME="ckb_${CKB_VERSION}_x86_64-unknown-linux-gnu-portable"
5257
cd $ROOT_DIR/packages/neuron-wallet/bin/linux
5358

5459
curl -O -L "${GITHUB_RELEASE_URL}/${CKB_VERSION}/${CKB_FILENAME}.tar.gz"
5560
tar xvzf ${CKB_FILENAME}.tar.gz
56-
cp ${CKB_FILENAME}/ckb ./
61+
cp ${CKB_FILENAME}/ckb ./ckb-x64
62+
rm -rf $CKB_FILENAME
63+
rm ${CKB_FILENAME}.tar.gz
64+
}
65+
66+
function download_linux_aarch64() {
67+
# for linux arm64
68+
CKB_FILENAME="ckb_${CKB_VERSION}_aarch64-unknown-linux-gnu"
69+
cd $ROOT_DIR/packages/neuron-wallet/bin/linux
70+
71+
curl -O -L "${GITHUB_RELEASE_URL}/${CKB_VERSION}/${CKB_FILENAME}.tar.gz"
72+
tar xvzf ${CKB_FILENAME}.tar.gz
73+
cp ${CKB_FILENAME}/ckb ./ckb-arm64
5774
rm -rf $CKB_FILENAME
5875
rm ${CKB_FILENAME}.tar.gz
5976
}

scripts/release-checksums.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
macos_x64_dmg = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-x64.dmg"
1414
macos_arm64_dmg = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-arm64.dmg"
1515

16-
linux_appimage = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-x86_64.AppImage"
16+
linux_x64_appimage = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-x64.AppImage"
17+
linux_arm64_appimage = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-arm64.AppImage"
1718

1819
def get_sha256_checksum(url)
1920
content = URI.open(url).read
2021
Digest::SHA256.hexdigest(content)
2122
end
2223

23-
windows_exe_sha256, macos_x64_zip_sha256, macos_arm64_zip_sha256, macos_x64_dmg_sha256, macos_arm64_dmg_sha256, linux_appimage_sha256 = [windows_exe, macos_x64_zip, macos_arm64_zip, macos_x64_dmg, macos_arm64_dmg, linux_appimage].map do |url|
24+
windows_exe_sha256, macos_x64_zip_sha256, macos_arm64_zip_sha256, macos_x64_dmg_sha256, macos_arm64_dmg_sha256, linux_appimage_sha256 = [windows_exe, macos_x64_zip, macos_arm64_zip, macos_x64_dmg, macos_arm64_dmg, linux_x64_appimage, linux_arm64_appimage].map do |url|
2425
Thread.new { get_sha256_checksum(url) }
2526
end.map(&:value)
2627

yarn.lock

Lines changed: 53 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,12 +2382,12 @@
23822382
rxjs "6"
23832383
semver "^7.3.5"
23842384

2385-
"@ledgerhq/devices@^8.0.4":
2386-
version "8.0.4"
2387-
resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.0.4.tgz#ebc7779adbbec2d046424603a481623eb3fbe306"
2388-
integrity sha512-dxOiWZmtEv1tgw70+rW8gviCRZUeGDUnxY6HUPiRqTAc0Ts2AXxiJChgAsPvIywWTGW+S67Nxq1oTZdpRbdt+A==
2385+
"@ledgerhq/devices@^8.0.7":
2386+
version "8.0.7"
2387+
resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.0.7.tgz#206434dbd8a097529bbfc95f5eef94c2923c7578"
2388+
integrity sha512-BbPyET52lXnVs7CxJWrGYqmtGdbGzj+XnfCqLsDnA7QYr1CZREysxmie+Rr6BKpNDBRVesAovXjtaVaZOn+upw==
23892389
dependencies:
2390-
"@ledgerhq/errors" "^6.12.7"
2390+
"@ledgerhq/errors" "^6.14.0"
23912391
"@ledgerhq/logs" "^6.10.1"
23922392
rxjs "6"
23932393
semver "^7.3.5"
@@ -2397,35 +2397,35 @@
23972397
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.50.0.tgz#e3a6834cb8c19346efca214c1af84ed28e69dad9"
23982398
integrity sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow==
23992399

2400-
"@ledgerhq/errors@^6.12.7":
2401-
version "6.12.7"
2402-
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.12.7.tgz#c7b630488d5713bc7b1e1682d6ab5d08918c69f1"
2403-
integrity sha512-1BpjzFErPK7qPFx0oItcX0mNLJMplVAm2Dpl5urZlubewnTyyw5sahIBjU+8LLCWJ2eGEh/0wyvh0jMtR0n2Mg==
2400+
"@ledgerhq/errors@^6.14.0":
2401+
version "6.14.0"
2402+
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.14.0.tgz#0bf253983773ef12eebce2091f463bc719223b37"
2403+
integrity sha512-ZWJw2Ti6Dq1Ott/+qYqJdDWeZm16qI3VNG5rFlb0TQ3UcAyLIQZbnnzzdcVVwVeZiEp66WIpINd/pBdqsHVyOA==
24042404

2405-
"@ledgerhq/hw-transport-node-hid-noevents@^6.27.16":
2406-
version "6.27.16"
2407-
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-6.27.16.tgz#5497b8194ec7802e221a0dd95b799d6c12da1a89"
2408-
integrity sha512-7MK245Cfj4B4WijO+a0iux+glmyHr44ezSuec4h1PfQrtiOGf+Sk26oi8WHJX+pabc9c566Qxkgdo4FvHWCCaA==
2405+
"@ledgerhq/hw-transport-node-hid-noevents@^6.27.19":
2406+
version "6.27.19"
2407+
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-6.27.19.tgz#3bbb6b02c7cab30519b1bf8b8e490d27d70d32a2"
2408+
integrity sha512-zOIB1fBiQH9ZYFzoEpNY4n1lE7bGPgRT+k85fKuLM7cxxm5Sy+TgrdxImvBz0IQUS8EvrtZCm+dVWkb2sH/6OA==
24092409
dependencies:
2410-
"@ledgerhq/devices" "^8.0.4"
2411-
"@ledgerhq/errors" "^6.12.7"
2412-
"@ledgerhq/hw-transport" "^6.28.5"
2410+
"@ledgerhq/devices" "^8.0.7"
2411+
"@ledgerhq/errors" "^6.14.0"
2412+
"@ledgerhq/hw-transport" "^6.28.8"
24132413
"@ledgerhq/logs" "^6.10.1"
24142414
node-hid "^2.1.2"
24152415

2416-
"@ledgerhq/[email protected].16":
2417-
version "6.27.16"
2418-
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-6.27.16.tgz#36df554efb3dd4efeef8590d9fc0f68cbedacf91"
2419-
integrity sha512-V/SA8G5qH+Lbl/bO11GAZKIWCgTfLRWe18gibLXFAdqFeQn8FxRoJTATJaYhWEWsU1T9NPvCfje3EWDUoXnmKg==
2416+
"@ledgerhq/[email protected].21":
2417+
version "6.27.21"
2418+
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-6.27.21.tgz#44bc003a0279296e1d613ddaada5005638aa0217"
2419+
integrity sha512-8G3Owpa2ex+TkGQSMkKoAbMEGZ7a23g0wZUvVzalQphMqbayebMhuXxue8iPp7F9pulm7uyLxgMYptYyw5i4yQ==
24202420
dependencies:
2421-
"@ledgerhq/devices" "^8.0.4"
2422-
"@ledgerhq/errors" "^6.12.7"
2423-
"@ledgerhq/hw-transport" "^6.28.5"
2424-
"@ledgerhq/hw-transport-node-hid-noevents" "^6.27.16"
2421+
"@ledgerhq/devices" "^8.0.7"
2422+
"@ledgerhq/errors" "^6.14.0"
2423+
"@ledgerhq/hw-transport" "^6.28.8"
2424+
"@ledgerhq/hw-transport-node-hid-noevents" "^6.27.19"
24252425
"@ledgerhq/logs" "^6.10.1"
24262426
lodash "^4.17.21"
24272427
node-hid "^2.1.2"
2428-
usb "^1.7.0"
2428+
usb "2.9.0"
24292429

24302430
"@ledgerhq/hw-transport@^5.9.0":
24312431
version "5.51.1"
@@ -2436,13 +2436,13 @@
24362436
"@ledgerhq/errors" "^5.50.0"
24372437
events "^3.3.0"
24382438

2439-
"@ledgerhq/hw-transport@^6.28.5":
2440-
version "6.28.5"
2441-
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.5.tgz#675193be2f695a596068145351da598316c25831"
2442-
integrity sha512-xmw5RhYbqExBBqTvOnOjN/RYNIGMBxFJ+zcYNfkfw/E+uEY3L7xq8Z7sC/n7URTT6xtEctElqduBJnBQE4OQtw==
2439+
"@ledgerhq/hw-transport@^6.28.8":
2440+
version "6.28.8"
2441+
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.8.tgz#f99a5c71c5c09591e9bfb1b970c42aafbe81351f"
2442+
integrity sha512-XxQVl4htd018u/M66r0iu5nlHi+J6QfdPsORzDF6N39jaz+tMqItb7tUlXM/isggcuS5lc7GJo7NOuJ8rvHZaQ==
24432443
dependencies:
2444-
"@ledgerhq/devices" "^8.0.4"
2445-
"@ledgerhq/errors" "^6.12.7"
2444+
"@ledgerhq/devices" "^8.0.7"
2445+
"@ledgerhq/errors" "^6.14.0"
24462446
events "^3.3.0"
24472447

24482448
"@ledgerhq/logs@^5.50.0":
@@ -4673,6 +4673,11 @@
46734673
resolved "https://registry.yarnpkg.com/@types/verror/-/verror-1.10.6.tgz#3e600c62d210c5826460858f84bcbb65805460bb"
46744674
integrity sha512-NNm+gdePAX1VGvPcGZCDKQZKYSiAWigKhKaz5KF94hG6f2s8de9Ow5+7AbXoeKxL8gavZfk4UquSAygOF2duEQ==
46754675

4676+
"@types/w3c-web-usb@^1.0.6":
4677+
version "1.0.8"
4678+
resolved "https://registry.yarnpkg.com/@types/w3c-web-usb/-/w3c-web-usb-1.0.8.tgz#c593fef468b6e6051209c8aa89d1ead08005e23d"
4679+
integrity sha512-ouEoUTyB27wFXUUyl0uKIE6VkeCczDtazWTiZGD1M4onceJnp8KnHDf7CzLbpwzek2ZFWXTC5KrNDRc9q/Jf6Q==
4680+
46764681
"@types/ws@^8.5.5":
46774682
version "8.5.5"
46784683
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.5.tgz#af587964aa06682702ee6dcbc7be41a80e4b28eb"
@@ -13230,6 +13235,11 @@ node-addon-api@^4.2.0:
1323013235
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f"
1323113236
integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==
1323213237

13238+
node-addon-api@^6.0.0:
13239+
version "6.1.0"
13240+
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-6.1.0.tgz#ac8470034e58e67d0c6f1204a18ae6995d9c0d76"
13241+
integrity sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==
13242+
1323313243
node-dir@^0.1.10, node-dir@^0.1.17:
1323413244
version "0.1.17"
1323513245
resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5"
@@ -13273,6 +13283,11 @@ node-gyp-build@^4.3.0:
1327313283
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055"
1327413284
integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==
1327513285

13286+
node-gyp-build@^4.5.0:
13287+
version "4.6.1"
13288+
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.1.tgz#24b6d075e5e391b8d5539d98c7fc5c210cac8a3e"
13289+
integrity sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==
13290+
1327613291
1327713292
version "8.4.1"
1327813293
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937"
@@ -17817,13 +17832,14 @@ url-parse@^1.5.3:
1781717832
querystringify "^2.1.1"
1781817833
requires-port "^1.0.0"
1781917834

17820-
usb@1.8.8, usb@^1.7.0:
17821-
version "1.8.8"
17822-
resolved "https://registry.yarnpkg.com/usb/-/usb-1.8.8.tgz#54de33f9e57dc4efc1b5b5f72b6624a275775e80"
17823-
integrity sha512-xpRAoek268RE3ATqK8l6LjrF4ADHn/A3V3cXEFbYo3/D83ZCLSO0A5tFKO093F4w5IbDfBVlB9VsYzoGz6EJGw==
17835+
usb@2.9.0:
17836+
version "2.9.0"
17837+
resolved "https://registry.yarnpkg.com/usb/-/usb-2.9.0.tgz#8ae3b175f93bee559400bff33491eee63406b6a2"
17838+
integrity sha512-G0I/fPgfHUzWH8xo2KkDxTTFruUWfppgSFJ+bQxz/kVY2x15EQ/XDB7dqD1G432G4gBG4jYQuF3U7j/orSs5nw==
1782417839
dependencies:
17825-
node-addon-api "^4.2.0"
17826-
node-gyp-build "^4.3.0"
17840+
"@types/w3c-web-usb" "^1.0.6"
17841+
node-addon-api "^6.0.0"
17842+
node-gyp-build "^4.5.0"
1782717843

1782817844
use-resize-observer@^9.1.0:
1782917845
version "9.1.0"

0 commit comments

Comments
 (0)