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

feat: Package for linux arm64 #2883

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 10 additions & 3 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,16 @@ jobs:
name: Neuron-Win
path: release/Neuron-*-setup.exe

- name: Upload Neuron Linux
- name: Upload Neuron Linux(x64)
if: matrix.os == 'ubuntu-20.04'
uses: actions/upload-artifact@v4
with:
name: Neuron-Linux
path: release/Neuron-*.AppImage
name: Neuron-Linux-x64
path: release/Neuron-*-x86_64.AppImage

- name: Upload Neuron Linux(arm64)
if: matrix.os == 'ubuntu-20.04'
uses: actions/upload-artifact@v3
with:
name: Neuron-Linux-arm64
path: release/Neuron-*-arm64.AppImage
13 changes: 10 additions & 3 deletions .github/workflows/package_for_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,19 @@ jobs:
name: Neuron-Win
path: release/Neuron-*-setup.exe

- name: Upload Neuron Linux
- name: Upload Neuron Linux(arm64)
if: matrix.os == 'ubuntu-20.04'
uses: actions/upload-artifact@v4
with:
name: Neuron-Linux
path: release/Neuron-*.AppImage
name: Neuron-Linux-arm64
path: release/Neuron-*-arm64.AppImage

- name: Upload Neuron Linux(x64)
if: matrix.os == 'ubuntu-20.04'
uses: actions/upload-artifact@v3
with:
name: Neuron-Linux-x64
path: release/Neuron-*-x86_64.AppImage

comment_when_package_success:
needs: [packaging]
Expand Down
7 changes: 5 additions & 2 deletions packages/neuron-wallet/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ linux:
category: Finance
icon: assets/icons/
extraFiles:
- from: "bin/linux/ckb"
- from: "bin/linux/ckb-${arch}"
to: "bin/ckb"
- from: "bin/linux/ckb-light-client"
to: "bin/ckb-light-client"
Expand All @@ -94,4 +94,7 @@ linux:
- from: "light/ckb_light_mainnet.toml"
to: "light/ckb_light_mainnet.toml"
target:
- AppImage
- target: AppImage
arch:
- arm64
- x64
19 changes: 18 additions & 1 deletion scripts/download-ckb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,30 @@ function download_macos_light() {
}

function download_linux() {
download_linux_x86_64
download_linux_aarch64
}

function download_linux_x86_64() {
# Linux
CKB_FILENAME="ckb_${CKB_VERSION}_x86_64-unknown-linux-gnu-portable"
cd $ROOT_DIR/packages/neuron-wallet/bin/linux

curl -O -L "${GITHUB_RELEASE_URL}/${CKB_VERSION}/${CKB_FILENAME}.tar.gz"
tar xvzf ${CKB_FILENAME}.tar.gz
cp ${CKB_FILENAME}/ckb ./
cp ${CKB_FILENAME}/ckb ./ckb-x64
rm -rf $CKB_FILENAME
rm ${CKB_FILENAME}.tar.gz
}

function download_linux_aarch64() {
# for linux arm64
CKB_FILENAME="ckb_${CKB_VERSION}_aarch64-unknown-linux-gnu"
cd $ROOT_DIR/packages/neuron-wallet/bin/linux

curl -O -L "${GITHUB_RELEASE_URL}/${CKB_VERSION}/${CKB_FILENAME}.tar.gz"
tar xvzf ${CKB_FILENAME}.tar.gz
cp ${CKB_FILENAME}/ckb ./ckb-arm64
rm -rf $CKB_FILENAME
rm ${CKB_FILENAME}.tar.gz
}
Expand Down
5 changes: 3 additions & 2 deletions scripts/release-checksums.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
macos_x64_dmg = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-x64.dmg"
macos_arm64_dmg = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-arm64.dmg"

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

def get_sha256_checksum(url)
content = URI.open(url).read
Digest::SHA256.hexdigest(content)
end

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|
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|
Thread.new { get_sha256_checksum(url) }
end.map(&:value)

Expand Down