Build for Mac #10
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build for Mac | |
on: workflow_dispatch | |
jobs: | |
build-MacOSX-ARM: | |
runs-on: macos-latest | |
env: | |
WOLFRAM_SYSTEM_ID: MacOSX-ARM | |
WOLFRAMENGINE_CACHE_KEY: WolframEngine-B | |
WOLFRAMENGINE_INSTALLATION_DIRECTORY: "/Applications/Wolfram Engine.app" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Install Python 3.11 | |
run: | | |
brew install [email protected] | |
echo "/opt/homebrew/opt/[email protected]/bin" >> $GITHUB_PATH | |
echo "PYTHON=/opt/homebrew/opt/[email protected]/bin/python3.11" >> $GITHUB_ENV | |
- name: Check Python version | |
run: | | |
python3.11 -V | |
which python3.11 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '23' # or '25', etc. | |
architecture: 'arm64' | |
- name: Verify Node.js | |
run: | | |
node -v | |
npm -v | |
- name: Create Python virtual environment | |
run: | | |
python3.11 -m venv venv | |
source venv/bin/activate | |
pip install --upgrade pip setuptools wheel | |
- name: Install Node.js dependencies | |
run: | | |
source venv/bin/activate | |
npm install | |
- name: Cache/restore Wolfram Engine install | |
id: cache-restore | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.WOLFRAMENGINE_INSTALLATION_DIRECTORY }} | |
key: wolframengine-${{ env.WOLFRAM_SYSTEM_ID }}-${{ env.WOLFRAMENGINE_CACHE_KEY }} | |
- name: Install Wolfram Engine | |
if: steps.cache-restore.outputs.cache-hit != 'true' | |
run: | | |
echo 'Installing Wolfram Engine...' | |
brew install --cask wolfram-engine | |
brew install libuv | |
echo 'Installed Wolfram Engine.' | |
- name: Prepare bundle | |
env: | |
WOLFRAMENGINE_EXECUTABLES_DIRECTORY: "${{ env.WOLFRAMENGINE_INSTALLATION_DIRECTORY }}/Contents/Resources/Wolfram Player.app/Contents/MacOS" | |
WOLFRAMSCRIPT_ENTITLEMENTID: ${{ secrets.WOLFRAM_LICENSE_ENTITLEMENT_ID }} | |
WOLFRAMSCRIPT_KERNELPATH: "${{ env.WOLFRAMENGINE_INSTALLATION_DIRECTORY }}/Contents/MacOS/WolframKernel" | |
run: | | |
export PATH="${{ env.WOLFRAMENGINE_EXECUTABLES_DIRECTORY }}:$PATH" | |
npm run pre-dist | |
- name: Build electron | |
env: | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | |
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
npm run dist-mac | |
build-MacOSX-x64: | |
runs-on: macos-13 | |
env: | |
WOLFRAM_SYSTEM_ID: MacOSX-x64 | |
WOLFRAMENGINE_CACHE_KEY: WolframEngine-D | |
WOLFRAMENGINE_INSTALLATION_DIRECTORY: "/Applications/Wolfram Engine.app" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Set up Python virtual environment | |
run: | | |
python3 -m venv venv | |
source venv/bin/activate | |
pip install --upgrade pip setuptools wheel | |
- name: Install Node.js dependencies | |
run: | | |
source venv/bin/activate | |
npm install | |
- name: Cache/restore Wolfram Engine install | |
id: cache-restore | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.WOLFRAMENGINE_INSTALLATION_DIRECTORY }} | |
key: wolframengine-${{ env.WOLFRAM_SYSTEM_ID }}-${{ env.WOLFRAMENGINE_CACHE_KEY }} | |
- name: Install Wolfram Engine | |
if: steps.cache-restore.outputs.cache-hit != 'true' | |
run: | | |
echo 'Installing Wolfram Engine...' | |
brew install --cask wolfram-engine | |
brew install libuv | |
echo 'Installed Wolfram Engine.' | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'latest' # or '25', etc. | |
architecture: 'x86' | |
- name: Verify Node.js | |
run: | | |
node -v | |
npm -v | |
- name: Bundle files | |
env: | |
WOLFRAMENGINE_EXECUTABLES_DIRECTORY: "${{ env.WOLFRAMENGINE_INSTALLATION_DIRECTORY }}/Contents/Resources/Wolfram Player.app/Contents/MacOS" | |
WOLFRAMSCRIPT_ENTITLEMENTID: ${{ secrets.WOLFRAM_LICENSE_ENTITLEMENT_ID }} | |
WOLFRAMSCRIPT_KERNELPATH: "${{ env.WOLFRAMENGINE_INSTALLATION_DIRECTORY }}/Contents/MacOS/WolframKernel" | |
run: | | |
export PATH="${{ env.WOLFRAMENGINE_EXECUTABLES_DIRECTORY }}:$PATH" | |
npm run pre-dist | |
- name: Build electron | |
env: | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | |
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
npm run dist-mac86 |