Skip to content

Commit

Permalink
Revert "build for Apple M1"
Browse files Browse the repository at this point in the history
This reverts commit 681f2ad.
  • Loading branch information
xcodebuild committed Jul 12, 2021
1 parent 681f2ad commit 487c30a
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 120 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
os: [macos-latest, windows-latest, macos-10.15]
os: [macos-latest, windows-latest]

steps:
- name: Check out Git repository
Expand All @@ -20,13 +20,11 @@ jobs:
node-version: 14

- name: Install deps
if: matrix.os != 'macos-10.15'
run: |
npm run install-deps
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
if: matrix.os != 'macos-10.15'
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
Expand All @@ -36,23 +34,3 @@ jobs:
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}
args: --x64

- name: Install deps for M1
if: matrix.os == 'macos-10.15'
run: |
env IS_ARM=1 npm run install-deps
- name: Build/release Electron app for M1
uses: samuelmeuli/action-electron-builder@v1
if: matrix.os == 'macos-10.15'
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}
args: --arm64
25 changes: 2 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
build:
strategy:
matrix:
os: [windows-latest, macos-latest, macos-10.15]
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out Git repository
Expand All @@ -26,17 +26,10 @@ jobs:
node-version: 14

- name: Install deps
if: matrix.os != 'macos-10.15'
run: |
npm run install-deps
npm run dateversion
- name: Install deps for M1
if: matrix.os == 'macos-10.15'
run: |
env IS_ARM=1 npm run install-deps
npm run dateversion
- name: build windows app
if: matrix.os == 'windows-latest'
run: |
Expand All @@ -51,13 +44,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.github_token }}

- name: build mac app for M1
if: matrix.os == 'macos-10.15'
run: |
npm run dist:mac-arm
env:
GH_TOKEN: ${{ secrets.github_token }}

- name: upload windows app
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v2
Expand All @@ -69,12 +55,5 @@ jobs:
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v2
with:
name: iProxyTesting-Intel-${{ runner.OS }}
path: release/*.dmg

- name: upload mac app for M1
if: matrix.os == 'macos-10.15'
uses: actions/upload-artifact@v2
with:
name: iProxyTesting-Apple-${{ runner.OS }}
name: iProxyTesting-${{ runner.OS }}
path: release/*.dmg
111 changes: 45 additions & 66 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,69 +6,48 @@ on:

jobs:
build:
strategy:
matrix:
os: [windows-latest, macos-latest, macos-10.15]
runs-on: ${{ matrix.os }}
steps:
- name: Check out Git repository
uses: actions/checkout@v1

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14

- name: Install deps
if: matrix.os != 'macos-10.15'
run: |
npm run install-deps
npm run nightlyversion
- name: Install deps for M1
if: matrix.os == 'macos-10.15'
run: |
env IS_ARM=1 npm run install-deps
npm run nightlyversion
- name: build windows app
if: matrix.os == 'windows-latest'
run: |
npm run dist:win
env:
GH_TOKEN: ${{ secrets.github_token }}

- name: build mac app
if: matrix.os == 'macos-latest'
run: |
npm run dist:mac
env:
GH_TOKEN: ${{ secrets.github_token }}

- name: build mac app for M1
if: matrix.os == 'macos-10.15'
run: |
npm run dist:mac-arm
env:
GH_TOKEN: ${{ secrets.github_token }}

- name: upload windows app
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v2
with:
name: iProxyNightly-${{ runner.OS }}
path: release/*.exe

- name: upload mac app
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v2
with:
name: iProxyNightly-Intel-${{ runner.OS }}
path: release/*.dmg

- name: upload mac app for M1
if: matrix.os == 'macos-10.15'
uses: actions/upload-artifact@v2
with:
name: iProxyNightly-Apple-${{ runner.OS }}
path: release/*.dmg
strategy:
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out Git repository
uses: actions/checkout@v1

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14

- name: Install deps
run: |
npm run install-deps
npm run nightlyversion
- name: build windows app
if: matrix.os == 'windows-latest'
run: |
npm run dist:win
env:
GH_TOKEN: ${{ secrets.github_token }}

- name: build mac app
if: matrix.os == 'macos-latest'
run: |
npm run dist:mac
env:
GH_TOKEN: ${{ secrets.github_token }}

- name: upload windows app
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v2
with:
name: iProxyNightly-${{ runner.OS }}
path: release/*.exe

- name: upload mac app
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v2
with:
name: iProxyNightly-${{ runner.OS }}
path: release/*.dmg
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"compile": "yarn run lint && yarn run compile-main && yarn run compile-renderer",
"build": "yarn clean:dist && yarn syncversion && yarn compile ",
"dist": "yarn run build && cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --mac --win --x64 --publish never",
"dist:mac": "yarn run build && cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --mac --x64",
"dist:mac-arm": "yarn run build && cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --mac --arm64",
"dist:mac": "yarn run build && cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --mac --universal",
"dist:win": "yarn run build && cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --win --x64",
"dist-codesign": "yarn run build && electron-builder --mac --win --x64 --publish never",
"pack": "yarn dist --dir -c.compression=store -c.mac.identity=null",
Expand Down
8 changes: 2 additions & 6 deletions scripts/update-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ const shell = require('shelljs');
const systemType = os.type();
const SYSTEM_IS_MACOS = systemType === 'Darwin';

const VERSION = 'v16.4.2';

const IS_ARM = process.env.IS_ARM === '1';

if (SYSTEM_IS_MACOS) {
shell.exec(`cd vendor/files/node && curl https://cdn.npm.taobao.org/dist/node/${VERSION}/node-${VERSION}-darwin-${IS_ARM ? 'arm64': 'x64'}.tar.gz| tar -xz && mv node-*-darwin-*/bin/node node-mac && rm -rf node-*-darwin-*`);
shell.exec(`cd vendor/files/node && curl https://cdn.npm.taobao.org/dist/node/v15.12.0/node-v15.12.0-darwin-x64.tar.gz| tar -xz && mv node-*-darwin-x64/bin/node node-mac && rm -rf node-*-darwin-x64`);
} else {
shell.exec(`cd vendor/files/node && curl https://cdn.npm.taobao.org/dist/node/${VERSION}/win-x86/node.exe > node-win.exe`)
shell.exec(`cd vendor/files/node && curl https://cdn.npm.taobao.org/dist/node/v14.15.3/win-x86/node.exe > node-win.exe`)
}

0 comments on commit 487c30a

Please sign in to comment.