-
Notifications
You must be signed in to change notification settings - Fork 85
140 lines (115 loc) · 4.39 KB
/
mac_11.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
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 [email protected]
brew uninstall --ignore-dependencies [email protected]
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/[email protected]/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