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

[CI] Add mac arm64 runner #574

Merged
merged 7 commits into from
Oct 6, 2023
Merged
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
42 changes: 42 additions & 0 deletions .github/workflows/build-mac-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build mac arm64

on:
workflow_dispatch:

env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
RUDDERSTACK_CLIENT_ID: ${{ secrets.RUDDERSTACK_CLIENT_ID }}

jobs:
release-mac-arm64:
runs-on: macos-latest-xlarge

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'recursive'
token: ${{ secrets.pat }}

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'

- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/

- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Install dependencies
run: yarn setup

- name: Build artifacts.
run: yarn release:mac:arm64
env:
NOTARIZE: true
18 changes: 6 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
name: win-setup
path: dist/HyperPlay*.exe
retention-days: 14
retention-days: 7
build_linux:
runs-on: ubuntu-latest
concurrency:
Expand Down Expand Up @@ -77,10 +77,10 @@ jobs:
run: yarn dist:linux:ci:rpm
- name: Build pacman artifact
run: yarn dist:linux:ci:pacman
build_mac:
build_mac_x64:
runs-on: macos-13
concurrency:
group: build-mac-${{ github.ref }}
group: build-mac-x64-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout repository.
Expand All @@ -102,18 +102,12 @@ jobs:
- name: Install modules.
run: yarn setup
- name: Build artifacts.
run: yarn dist:mac
run: yarn dist:mac:x64
env:
NOTARIZE: false
- name: Upload Intel build.
uses: actions/upload-artifact@v3
with:
name: mac-dmg-Intel
name: mac-dmg-x64
path: dist/HyperPlay*x64.dmg
retention-days: 14
- name: Upload M1/M2.
uses: actions/upload-artifact@v3
with:
name: mac-dmg-M1-M2
path: dist/HyperPlay*arm64.dmg
retention-days: 14
retention-days: 7
36 changes: 34 additions & 2 deletions .github/workflows/release_macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
TEAMID: ${{ secrets.TEAMID }}

jobs:
build-and-release:
release-x64:
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -45,6 +45,38 @@ jobs:
run: yarn setup

- name: Build artifacts.
run: yarn release:mac
run: yarn release:mac:x64
env:
NOTARIZE: true

release-arm64:
runs-on: macos-latest-xlarge

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'recursive'
token: ${{ secrets.pat }}

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'

- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/

- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Install dependencies
run: yarn setup

- name: Build artifacts.
run: yarn release:mac:arm64
env:
NOTARIZE: true
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,16 @@
"manualTestProxyJest": "jest mmExtIntegration.test.ts",
"release:linux": "export NODE_ENV_ELECTRON_VITE=production && vite build && electron-builder -p always --linux deb rpm pacman tar.xz snap",
"release:updateFlathub:ci": "tsc flathub/update-flathub.ts --skipLibCheck --target es2015 --moduleResolution node --module commonjs && node flathub/update-flathub.js",
"release:mac": "export NODE_ENV_ELECTRON_VITE=production && vite build && electron-builder -p always --mac --x64 --arm64",
"release:mac:x64": "export NODE_ENV_ELECTRON_VITE=production && vite build && electron-builder -p always --mac --x64",
"release:mac:arm64": "export NODE_ENV_ELECTRON_VITE=production && vite build && electron-builder -p always --mac --arm64",
"dist:linux": "export NODE_ENV_ELECTRON_VITE=production && vite build && electron-builder --linux",
"dist:linux:ci:deb": "yarn dist:linux deb --publish=never",
"dist:linux:ci:rpm": "yarn dist:linux rpm --publish=never",
"dist:linux:ci:pacman": "yarn dist:linux pacman --publish=never",
"dist:linux:ci:flatpak": "npm run dist:linux tar.xz --publish=never",
"dist:mac:base": "export NODE_ENV_ELECTRON_VITE=production && export CSC_IDENTITY_AUTO_DISCOVERY=false && vite build && electron-builder --mac",
"dist:mac:x64": "yarn dist:mac:base --x64 --publish=never",
"dist:mac": "yarn dist:mac:base --x64 --arm64 --publish=never",
"dist:mac:arm64": "yarn dist:mac:base --arm64 --publish=never",
"dist:win": "cross-env NODE_ENV_ELECTRON_VITE=production vite build && electron-builder --win nsis --publish=never",
"build-signed:win": "vite build && electron-builder --win -c.win.certificateSubjectName=\"HyperPlay Labs Inc.\"",
"lint": "eslint --cache -c .eslintrc --ext .tsx,ts ./src",
Expand Down