Skip to content

Build for MacOS 11

Build for MacOS 11 #39

Workflow file for this run

name: Build for MacOS 11
env:
ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Controls when the workflow will run
on:
# push:
# # Sequence of patterns matched against refs/tags
# tags:
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
tags:
description: 'Build tags'
jobs:
build_mac_11:
if: ${{ github.actor == 'badabing2005' }}
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
# runs-on: macos-latest
runs-on: macos-11
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: List Cellar directory Again
run: |
ls /usr/local/Cellar
- name: Uninstall Pythons other than 3.11
run: |
brew uninstall --ignore-dependencies python@3.10
brew uninstall --ignore-dependencies python@3.12
echo "doing brew list"
brew list
echo "getting directory list for /usr/local/Cellar"
ls /usr/local/Cellar
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install wxPython
# run: brew install wxpython
run: pip install wxPython
- name: Install node
run: brew install node
# - name: Install GraphicsMagick
# run: |
# curl -L -O https://newcontinuum.dl.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.42/GraphicsMagick-1.3.42.tar.xz
# xz -d GraphicsMagick-1.3.42.tar.xz
# tar -xf GraphicsMagick-1.3.42.tar
# cd GraphicsMagick-1.3.42
# ./configure
# make
# sudo make install
# cd ..
# - name: Install ImageMagick
# run: |
# curl -O https://imagemagick.org/archive/binaries/ImageMagick-x86_64-apple-darwin20.1.0.tar.gz
# tar -xzf ImageMagick-x86_64-apple-darwin20.1.0.tar.gz
# echo "MAGICK_HOME=$(pwd)/ImageMagick-7.0.10" >> $GITHUB_ENV
# echo "DYLD_LIBRARY_PATH=$(pwd)/ImageMagick-7.0.10/lib/" >> $GITHUB_ENV
# echo "PATH=$(pwd)/ImageMagick-7.0.10/bin:$PATH" >> $GITHUB_ENV
# echo "MAGICK_HOME = ${{env.MAGICK_HOME}}"
# echo "DYLD_LIBRARY_PATH = ${{env.DYLD_LIBRARY_PATH}}"
# echo "PATH = ${{env.PATH}}"
# ls -l ${{env.MAGICK_HOME}}/bin/
- name: Install create-dmg
run: |
npm cache clean --force
npm install --global create-dmg
- name: Add Python 3.11 to PATH
run: export PATH=/usr/local/Cellar/python@3.11/bin:$PATH
- name: Create virtual environment
run: python3.11 -m venv myenv
shell: bash
- name: Activate virtual environment
run: source myenv/bin/activate
shell: bash
- name: Install requirements
run: python3.11 -m pip install -r requirements.txt
- name: List modules and their versions
run: python3.11 -m pip freeze
- name: Build application
id: build_app
run: ./build.sh
- name: Upload PixelFlasher.app as artifact
uses: actions/upload-artifact@v4
with:
name: PixelFlasher.app
path: dist/PixelFlasher.app
# - name: Create DMG
# id: create_dmg
# run: |
# create-dmg dist/PixelFlasher.app dist
# ls -l ./ dist/
# if: ${{ steps.build_app.outcome == 'success' }}
# continue-on-error: true
# - name: Rename the file
# id: rename_dmg
# run: mv dist/PixelFlasher*.dmg dist/PixelFlasher_MacOS_11.dmg
- name: Get sha256
run: |
shasum -a 256 dist/PixelFlasher.dmg > dist/PixelFlasher_MacOS_11.dmg.sha256
cat dist/PixelFlasher_MacOS_11.dmg.sha256
if: ${{ steps.build_app.outcome == 'success' }}
- name: List contents of dist directory
run: ls ./ dist/
# Upload artifacts Mac-OS 11
- name: Upload Mac-OS 11 Artifact
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} # Only run this step when running in GitHub Actions
uses: actions/upload-artifact@v4
id: upload_artifact_macos_11
with:
name: PixelFlasher_MacOS_11.dmg Artifacts
path: |
dist/PixelFlasher_MacOS_11.dmg
dist/PixelFlasher_MacOS_11.dmg.sha256