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: support arm #401

Merged
merged 36 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9056bdc
try support arm
starknt Nov 21, 2024
66a6262
fix: path err
starknt Nov 21, 2024
73a5757
fix: proxy api call
starknt Nov 21, 2024
c397e02
build arm
starknt Nov 22, 2024
27c64c2
build arm
starknt Nov 22, 2024
605416d
build arm
starknt Nov 22, 2024
eeacbf1
build arm
starknt Nov 22, 2024
45b395a
build arm
starknt Nov 22, 2024
229c03e
build arm
starknt Nov 22, 2024
4ae856a
build arm
starknt Nov 22, 2024
4fa1f67
build arm
starknt Nov 22, 2024
30c9913
build arm
starknt Nov 22, 2024
ccd9985
build arm
starknt Nov 22, 2024
a57f1c6
cache `electron` and `electron-builder` bin
starknt Nov 22, 2024
c08a8d0
upload lock file because `setup-node` cache requires it
starknt Nov 22, 2024
f044c79
fix: pnpm executable not found
starknt Nov 22, 2024
5e596c4
fix: shell childExec
starknt Nov 24, 2024
524a2ef
modify artifact name
starknt Nov 25, 2024
b5f5601
fix: cache restore keys
starknt Nov 25, 2024
0bca7e7
fix: cache hit path
starknt Nov 25, 2024
c4e71c4
fix: cache hit path
starknt Nov 25, 2024
2b0b637
try fix open loopback
starknt Nov 25, 2024
addbadd
try fix open loopback
starknt Nov 25, 2024
82bc6c0
try fix open loopback
starknt Nov 25, 2024
329fbf7
fix: pnpm cache
starknt Nov 25, 2024
c1b481d
fix: sudo prompt name
starknt Nov 25, 2024
45db6fc
restore cache
starknt Nov 25, 2024
aca7252
try fix open loopback
starknt Nov 25, 2024
cd4ffe6
移除需要管理员打开的提示
starknt Nov 25, 2024
e83527a
移除`windows`建议开机自启的提示
starknt Nov 25, 2024
a6fe9a5
remove `chcp 65001` result on the stdout
starknt Nov 26, 2024
40c3d4c
fix: `@mihomo-party/sysproxy` optional deps not found
starknt Nov 26, 2024
83f8eb2
fix: deps not found
starknt Nov 26, 2024
ca3e942
Merge remote-tracking branch 'upstream/master' into arm-support
wangliang181230 Nov 26, 2024
6573752
Merge branch 'master' into arm-support
wangliang181230 Nov 26, 2024
448fd07
fix: system proxy setting
starknt Nov 26, 2024
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
124 changes: 98 additions & 26 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
# job 1
build-and-upload:
runs-on: ${{ matrix.os }}-latest
env:
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder
strategy:
fail-fast: false
matrix:
Expand All @@ -24,14 +27,15 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: 'Setup Node.js "${{ matrix.node }}.x" environment'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/

- name: Setup pnpm
uses: pnpm/action-setup@v4
cache: pnpm

- name: Setup Python environment (Mac) Because of electron-builder install-app-deps requires Python setup tools
if: matrix.os == 'macos'
Expand Down Expand Up @@ -69,15 +73,31 @@ jobs:
echo "--------------------";
python --version;

- name: pnpm install
- name: Setup electron cahce
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.cache/electron
key: ${{ runner.os }}-electron-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-electron-cache-

- name: Setup electron-builder cahce
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.cache/electron-builder
key: ${{ runner.os }}-electron-builder-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-electron-builder-cache-

- name: "'pnpm install --force' Because we need to install optional dependencies"
run: |
echo "======================================================================";
dir || ls -lah;

echo "======================================================================";
echo "pnpm install";
echo "pnpm install --force";
echo "--------------------";
pnpm install;
pnpm install --force;

- name: 'npm run electron:build'
run: |
Expand All @@ -104,33 +124,63 @@ jobs:
cd ../../../;
dir || ls -lah;

- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}.exe - Windows'
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-ia32.exe - Windows'
uses: actions/[email protected]
if: ${{ matrix.os == 'windows' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.exe
name: 'DevSidecar-${{ steps.package-info.outputs.version }}.exe'
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-ia32.exe
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-ia32.exe'
if-no-files-found: error
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-x64.exe - Windows'
uses: actions/[email protected]
if: ${{ matrix.os == 'windows' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-x64.exe
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-x64.exe'
if-no-files-found: error
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-arm64.exe - Windows'
uses: actions/[email protected]
if: ${{ matrix.os == 'windows' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-arm64.exe
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-arm64.exe'
if-no-files-found: error

- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-amd64.deb - Ubuntu'
uses: actions/[email protected]
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-amd64.deb
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-amd64.deb'
if-no-files-found: error
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}.deb - Ubuntu'
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-arm64.deb - Ubuntu'
uses: actions/[email protected]
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.deb
name: 'DevSidecar-${{ steps.package-info.outputs.version }}.deb'
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-arm64.deb
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-arm64.deb'
if-no-files-found: error
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}.AppImage - Ubuntu'
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-x86_64.AppImage - Ubuntu'
uses: actions/[email protected]
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.AppImage
name: 'DevSidecar-${{ steps.package-info.outputs.version }}.AppImage'
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-x86_64.AppImage
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-x86_64.AppImage'
if-no-files-found: error
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}.dmg - Mac'
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-arm64.AppImage - Ubuntu'
uses: actions/[email protected]
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-arm64.AppImage
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-arm64.AppImage'
if-no-files-found: error

- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-universal.dmg - Mac'
uses: actions/[email protected]
if: ${{ matrix.os == 'macos' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.dmg
name: 'DevSidecar-${{ steps.package-info.outputs.version }}.dmg'
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-universal.dmg
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-universal.dmg'
if-no-files-found: error

# job 2
Expand All @@ -152,25 +202,47 @@ jobs:
run: mkdir release

# Download artifacts
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}.exe - Windows'
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}-ia32.exe - Windows'
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.exe
name: DevSidecar-${{ steps.package-info.outputs.version }}-ia32.exe
path: release
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}.deb - Ubuntu'
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}-x64.exe - Windows'
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.deb
name: DevSidecar-${{ steps.package-info.outputs.version }}-x64.exe
path: release
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}.AppImage - Ubuntu'
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}-arm64.exe - Windows'
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-arm64.exe
path: release

- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}-amd64.deb - Ubuntu'
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.AppImage
name: DevSidecar-${{ steps.package-info.outputs.version }}-amd64.deb
path: release
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}.dmg - Mac'
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}-arm64.deb - Ubuntu'
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-arm64.deb
path: release
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}-x86_64.AppImage - Ubuntu'
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-x86_64.AppImage
path: release
- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}-arm64.AppImage - Ubuntu'
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}-arm64.AppImage
path: release

- name: 'Download DevSidecar-${{ steps.package-info.outputs.version }}-universal.dmg - Mac'
uses: actions/[email protected]
with:
name: DevSidecar-${{ steps.package-info.outputs.version }}.dmg
name: DevSidecar-${{ steps.package-info.outputs.version }}-universal.dmg
path: release

- name: 'Print files from "release" dir'
Expand Down
28 changes: 24 additions & 4 deletions .github/workflows/npm-run-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
jobs:
npm-run-electron:
runs-on: ${{ matrix.os }}-latest
env:
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder
strategy:
fail-fast: false
matrix:
Expand All @@ -23,14 +26,15 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: 'Setup Node.js "${{ matrix.node }}.x" environment'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/

- name: Setup pnpm
uses: pnpm/action-setup@v4
cache: pnpm

- name: Setup Python environment (Mac) Because of electron-builder install-app-deps requires Python setup tools
if: matrix.os == 'macos'
Expand Down Expand Up @@ -68,6 +72,22 @@ jobs:
echo "--------------------";
python --version;

- name: Setup electron cahce
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.cache/electron
key: ${{ runner.os }}-electron-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-electron-cache-

- name: Setup electron-builder cahce
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.cache/electron-builder
key: ${{ runner.os }}-electron-builder-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-electron-builder-cache-

- name: pnpm install
run: |
echo "======================================================================";
Expand All @@ -78,7 +98,7 @@ jobs:
echo "--------------------";
pnpm install;

- name: 'npm run electron'
- name: npm run electron
run: |
echo "======================================================================";
echo "cd packages/gui";
Expand Down
86 changes: 68 additions & 18 deletions .github/workflows/test-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
jobs:
test-and-upload:
runs-on: ${{ matrix.os }}-latest
env:
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder
strategy:
fail-fast: false
matrix:
Expand All @@ -27,14 +30,15 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: 'Setup Node.js "${{ matrix.node }}.x" environment'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/

- name: Setup pnpm
uses: pnpm/action-setup@v4
cache: pnpm

- name: Setup Python environment (Mac) Because of electron-builder install-app-deps requires Python setup tools
if: matrix.os == 'macos'
Expand Down Expand Up @@ -72,15 +76,31 @@ jobs:
echo "--------------------";
python --version;

- name: pnpm install
- name: Setup electron cahce
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.cache/electron
key: ${{ runner.os }}-electron-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-electron-cache-

- name: Setup electron-builder cahce
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.cache/electron-builder
key: ${{ runner.os }}-electron-builder-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-electron-builder-cache-

- name: "'pnpm install --force' Because we need to install optional dependencies"
run: |
echo "======================================================================";
dir || ls -lah;

echo "======================================================================";
echo "pnpm install";
echo "pnpm install --force";
echo "--------------------";
pnpm install;
pnpm install --force;

- name: 'npm run electron:build'
run: |
Expand All @@ -107,31 +127,61 @@ jobs:
cd ../../../;
dir || ls -lah;

- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}.exe - Windows'
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-ia32.exe - Windows'
uses: actions/[email protected]
if: ${{ matrix.os == 'windows' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-ia32.exe
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-ia32.exe'
if-no-files-found: error
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-x64.exe - Windows'
uses: actions/[email protected]
if: ${{ matrix.os == 'windows' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.exe
name: 'DevSidecar-${{ steps.package-info.outputs.version }}.exe'
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-x64.exe
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-x64.exe'
if-no-files-found: error
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}.deb - Ubuntu'
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-arm64.exe - Windows'
uses: actions/[email protected]
if: ${{ matrix.os == 'windows' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-arm64.exe
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-arm64.exe'
if-no-files-found: error

- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-amd64.deb - Ubuntu'
uses: actions/[email protected]
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-amd64.deb
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-amd64.deb'
if-no-files-found: error
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-arm64.deb - Ubuntu'
uses: actions/[email protected]
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.deb
name: 'DevSidecar-${{ steps.package-info.outputs.version }}.deb'
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-arm64.deb
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-arm64.deb'
if-no-files-found: error
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}.AppImage - Ubuntu'
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-x86_64.AppImage - Ubuntu'
uses: actions/[email protected]
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.AppImage
name: 'DevSidecar-${{ steps.package-info.outputs.version }}.AppImage'
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-x86_64.AppImage
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-x86_64.AppImage'
if-no-files-found: error
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}.dmg - Mac'
- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-arm64.AppImage - Ubuntu'
uses: actions/[email protected]
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-arm64.AppImage
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-arm64.AppImage'
if-no-files-found: error

- name: 'Upload DevSidecar-${{ steps.package-info.outputs.version }}-universal.dmg - Mac'
uses: actions/[email protected]
if: ${{ matrix.os == 'macos' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.dmg
name: 'DevSidecar-${{ steps.package-info.outputs.version }}.dmg'
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-universal.dmg
name: 'DevSidecar-${{ steps.package-info.outputs.version }}-universal.dmg'
if-no-files-found: error
Loading