Skip to content

Commit

Permalink
feat: arm64版linuxエディタのデプロイ可能にする (#2579)
Browse files Browse the repository at this point in the history
Co-authored-by: Hiroshiba <[email protected]>
  • Loading branch information
nanae772 and Hiroshiba authored Mar 2, 2025
1 parent f3bd852 commit bd36e78
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 24 deletions.
44 changes: 24 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ jobs:
strategy:
fail-fast: false
matrix:
artifact_name:
- linux-nvidia-prepackage
- linux-cpu-prepackage
- windows-nvidia-prepackage
- windows-cpu-prepackage
- windows-directml-prepackage
- macos-x64-cpu-prepackage
- macos-arm64-cpu-prepackage
include:
# Linux NVIDIA GPU
- artifact_name: linux-nvidia-prepackage
Expand All @@ -69,18 +61,30 @@ jobs:
linux_executable_name: voicevox
linux_appimage_7z_name: VOICEVOX.AppImage
os: ubuntu-20.04
# Linux CPU
- artifact_name: linux-cpu-prepackage
# Linux CPU (x64)
- artifact_name: linux-cpu-x64-prepackage
artifact_path: dist_electron/linux-unpacked
voicevox_engine_asset_name: linux-cpu-x64
package_name: voicevox-cpu
compressed_artifact_name: voicevox-linux-cpu
compressed_artifact_name: voicevox-linux-cpu-x64
app_asar_dir: prepackage/resources
installer_artifact_name: linux-cpu-appimage
linux_artifact_name: "VOICEVOX.${ext}"
installer_artifact_name: linux-cpu-x64-appimage
linux_artifact_name: "VOICEVOX.${version}-x64.${ext}"
linux_executable_name: voicevox
linux_appimage_7z_name: VOICEVOX-CPU.AppImage
linux_appimage_7z_name: VOICEVOX-CPU-X64.AppImage
os: ubuntu-20.04
# Linux CPU (arm64)
- artifact_name: linux-cpu-arm64-prepackage
artifact_path: dist_electron/linux-arm64-unpacked
voicevox_engine_asset_name: linux-cpu-arm64
package_name: voicevox-cpu
compressed_artifact_name: voicevox-linux-cpu-arm64
app_asar_dir: prepackage/resources
installer_artifact_name: linux-cpu-arm64-appimage
linux_artifact_name: "VOICEVOX.${version}-arm64.${ext}"
linux_executable_name: voicevox
linux_appimage_7z_name: VOICEVOX-CPU-ARM64.AppImage
os: ubuntu-22.04-arm
# Windows CUDA
- artifact_name: windows-nvidia-prepackage
artifact_path: dist_electron/win-unpacked
Expand Down Expand Up @@ -112,23 +116,23 @@ jobs:
nsis_web_artifact_name: "VOICEVOX.Web.Setup.${version}.${ext}"
os: windows-2019
# macOS CPU (x64)
- artifact_name: macos-x64-cpu-prepackage
- artifact_name: macos-cpu-x64-prepackage
artifact_path: dist_electron/mac
voicevox_engine_asset_name: macos-x64
package_name: voicevox-cpu
compressed_artifact_name: voicevox-macos-x64-cpu
compressed_artifact_name: voicevox-macos-cpu-x64
app_asar_dir: prepackage/VOICEVOX.app/Contents/Resources
installer_artifact_name: macos-x64-cpu-dmg
installer_artifact_name: macos-cpu-x64-dmg
macos_artifact_name: "VOICEVOX.${version}-x64.${ext}"
os: macos-13
# macOS CPU (arm64)
- artifact_name: macos-arm64-cpu-prepackage
- artifact_name: macos-cpu-arm64-prepackage
artifact_path: dist_electron/mac-arm64
voicevox_engine_asset_name: macos-arm64
package_name: voicevox-cpu
compressed_artifact_name: voicevox-macos-arm64-cpu
compressed_artifact_name: voicevox-macos-cpu-arm64
app_asar_dir: prepackage/VOICEVOX.app/Contents/Resources
installer_artifact_name: macos-arm64-cpu-dmg
installer_artifact_name: macos-cpu-arm64-dmg
macos_artifact_name: "VOICEVOX.${version}-arm64.${ext}"
os: macos-14

Expand Down
2 changes: 1 addition & 1 deletion electron-builder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const builderOptions = {
target: [
{
target: "AppImage",
arch: ["x64"],
arch: [isArm64 ? "arm64" : "x64"],
},
],
},
Expand Down
19 changes: 16 additions & 3 deletions tools/download7z.mts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/**
* OSに合った7-Zipのバイナリとライセンスをダウンロードするスクリプト。
*/
import path from "path";
import fs from "fs";
import { spawnSync } from "child_process";
import fs from "fs";
import { arch } from "os";
import path from "path";
import { retryFetch } from "./helper.mjs";

const distPath = path.resolve(import.meta.dirname, "..", "vendored", "7z");
Expand Down Expand Up @@ -38,7 +39,19 @@ switch (process.platform) {
break;
}
case "linux": {
url = "https://www.7-zip.org/a/7z2201-linux-x64.tar.xz";
switch (arch()) {
case "arm64": {
url = "https://www.7-zip.org/a/7z2201-linux-arm64.tar.xz";
break;
}
case "x64": {
url = "https://www.7-zip.org/a/7z2201-linux-x64.tar.xz";
break;
}
default: {
throw new Error("Unsupported architecture for Linux");
}
}
filesToExtract = ["7zzs", "License.txt"];
break;
}
Expand Down
2 changes: 2 additions & 0 deletions tools/downloadTypos.mts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const TYPOS_URLS = {
"https://github.com/crate-ci/typos/releases/download/v1.30.0/typos-v1.30.0-x86_64-apple-darwin.tar.gz",
},
[OS.LINUX]: {
[CPU_ARCHITECTURE.ARM]:
"https://github.com/crate-ci/typos/releases/download/v1.30.0/typos-v1.30.0-aarch64-unknown-linux-musl.tar.gz",
[CPU_ARCHITECTURE.X86_64]:
"https://github.com/crate-ci/typos/releases/download/v1.30.0/typos-v1.30.0-x86_64-unknown-linux-musl.tar.gz",
},
Expand Down

0 comments on commit bd36e78

Please sign in to comment.