Skip to content

Commit 8b10137

Browse files
committed
revert mac to dw code
1 parent 9978461 commit 8b10137

File tree

1 file changed

+51
-67
lines changed

1 file changed

+51
-67
lines changed

.github/workflows/build_executables.yml

Lines changed: 51 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ jobs:
4848
run: echo $SI > serverinfo.txt && echo $ULCRT > cert.pem
4949
- name: package cogmood
5050
shell: bash -l {0}
51-
run: cd package && python -m PyInstaller cogmood_windows.spec
51+
run: |
52+
cd package
53+
export KIVY_GL_BACKEND=angle_sdl2
54+
python -m PyInstaller cogmood_windows.spec
5255
- name: save exe
5356
uses: actions/upload-artifact@v3
5457
with:
@@ -86,70 +89,51 @@ jobs:
8689
# path: dist/SUPREME.exe # Path to your Windows executable
8790

8891
build-macos:
89-
runs-on: macos-13
92+
runs-on: macos-14
9093
steps:
91-
- name: Setup tmate session
92-
uses: mxschmitt/action-tmate@v3
93-
with:
94-
detached: true
95-
# if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
96-
- uses: conda-incubator/setup-miniconda@v3
97-
with:
98-
miniconda-version: latest
99-
auto-update-conda: true
100-
activate-environment: kivy20
101-
python-version: "3.10"
102-
channels: conda-forge
103-
- name: Checkout code
104-
uses: actions/checkout@v4
105-
with:
106-
submodules: recursive # Initializes and updates submodules
107-
- name: create env
108-
shell: bash -l {0}
109-
run: conda install -y kivy=2.3 pyinstaller=4.10 requests
110-
- name: pip installs
111-
shell: bash -l {0}
112-
run: pip install pyo
113-
- name: install smile
114-
shell: bash -l {0}
115-
run: pip install -e smile
116-
- name: create files
117-
shell: bash -l {0}
118-
env:
119-
SIMAC: ${{ secrets.SIMAC }}
120-
ULCRTMAC: ${{ secrets.ULCRTMAC }}
121-
run: echo "$SIMAC" > serverinfo.txt && echo "$ULCRTMAC" > cert.pem
122-
- name: package cogmood
123-
shell: bash -l {0}
124-
run: cd package && python -m PyInstaller --noconfirm --target-arch universal2 cogmood_mac.spec
125-
- name: save exe
126-
uses: actions/upload-artifact@v3
127-
with:
128-
name: SUPREME
129-
path: dist/SUPREME
130-
# - name: Set up Python
131-
# uses: actions/setup-python@v5
132-
# with:
133-
# python-version: "3.10" # Specify your Python version
134-
#
135-
# - name: Install Homebrew dependencies
136-
# run: |
137-
# brew update
138-
# brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf
139-
#
140-
# - name: Install dependencies
141-
# run: |
142-
# python -m pip install --upgrade pip
143-
# pip install pyinstaller
144-
# pip install --target . --platform=macosx_10_9_universal2 --only-binary=:all: -r requirements.txt
145-
#
146-
# - name: Build executable with PyInstaller
147-
# run: |
148-
# cd package
149-
# pyinstaller --noconfirm --target-arch universal2 cogmood_mac.spec
150-
#
151-
# - name: Upload macOS executable
152-
# uses: actions/upload-artifact@v4
153-
# with:
154-
# name: SUPREME
155-
# path: dist/SUPREME
94+
- name: Setup tmate session
95+
uses: mxschmitt/action-tmate@v3
96+
with:
97+
detached: true
98+
# if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
99+
100+
- name: Checkout code
101+
uses: actions/checkout@v4
102+
with:
103+
submodules: recursive # Initializes and updates submodules
104+
105+
- name: Set up Python
106+
uses: actions/setup-python@v5
107+
with:
108+
python-version: "3.10" # Specify your Python version
109+
110+
- name: Check if Python is a fat binary
111+
run: |
112+
if lipo -info $(which python3) | grep -q "Architectures in the fat file"; then
113+
lipo -info $(which python3)
114+
echo "Python is a fat binary."
115+
else
116+
echo "Python is NOT a fat binary."
117+
exit 1 # Optional: Exit with error if you require a fat binary
118+
fi
119+
120+
- name: Install Homebrew dependencies
121+
run: |
122+
brew update
123+
brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf
124+
125+
- name: Install dependencies
126+
run: |
127+
python -m pip install --upgrade pip
128+
python -m pip install -r requirements.txt
129+
130+
- name: Build executable with PyInstaller
131+
run: |
132+
cd package
133+
python -m pyinstaller --noconfirm cogmood_mac.spec
134+
135+
- name: Upload macOS executable
136+
uses: actions/upload-artifact@v4
137+
with:
138+
name: SUPREME
139+
path: dist/SUPREME

0 commit comments

Comments
 (0)