Skip to content

Commit bf9c19f

Browse files
authored
Merge pull request #6 from compmem/2024-data-collection-updates
2024 data collection updates
2 parents be9293a + 73db4d6 commit bf9c19f

File tree

114 files changed

+1479
-1303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+1479
-1303
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: Build Executables
2+
3+
on:
4+
5+
workflow_dispatch:
6+
inputs:
7+
debug_enabled:
8+
type: boolean
9+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
10+
required: false
11+
default: false
12+
13+
push:
14+
branches: [master]
15+
pull_request:
16+
branches: [master]
17+
18+
jobs:
19+
build-windows:
20+
runs-on: windows-latest
21+
steps:
22+
- name: Setup tmate session
23+
uses: mxschmitt/action-tmate@v3
24+
with:
25+
detached: true
26+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
27+
- uses: conda-incubator/setup-miniconda@v3
28+
with:
29+
auto-update-conda: true
30+
activate-environment: kivy20
31+
python-version: "3.10"
32+
channels: conda-forge
33+
- name: Checkout code
34+
uses: actions/checkout@v4
35+
with:
36+
submodules: recursive # Initializes and updates submodules
37+
- name: create env
38+
shell: bash -l {0}
39+
run: conda install -y kivy=2.3 pyinstaller=4.10 requests glfw
40+
- name: pip installs
41+
shell: bash -l {0}
42+
run: pip install kivy-deps.sdl2 kivy-deps.glew pyo
43+
- name: install smile
44+
shell: bash -l {0}
45+
run: pip install -e smile
46+
- name: create files
47+
shell: bash -l {0}
48+
run: echo $SI > serverinfo.txt && echo $ULCRT > cert.pem
49+
- name: package cogmood
50+
shell: bash -l {0}
51+
run: |
52+
cd package
53+
export KIVY_GL_BACKEND=angle_sdl2
54+
python -m PyInstaller cogmood_windows.spec
55+
- name: save exe
56+
uses: actions/upload-artifact@v3
57+
with:
58+
name: SUPREME
59+
path: package/dist/SUPREME.exe
60+
61+
62+
build-macos:
63+
runs-on: macos-14
64+
steps:
65+
- name: Setup tmate session
66+
uses: mxschmitt/action-tmate@v3
67+
with:
68+
detached: true
69+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
70+
71+
- name: Checkout code
72+
uses: actions/checkout@v4
73+
with:
74+
submodules: recursive # Initializes and updates submodules
75+
76+
- name: Install Homebrew dependencies
77+
run: |
78+
brew update
79+
brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf
80+
81+
- name: Set up Python
82+
uses: actions/setup-python@v5
83+
with:
84+
python-version: "3.10" # Specify your Python version
85+
86+
- name: Check if Python is a fat binary
87+
run: |
88+
if lipo -info $(which python3) | grep -q "Architectures in the fat file"; then
89+
lipo -info $(which python3)
90+
echo "Python is a fat binary."
91+
export PATH=/Users/runner/hostedtoolcache/Python/3.10.11/arm64/bin:$PATH
92+
else
93+
echo "Python is NOT a fat binary."
94+
exit 1 # Optional: Exit with error if you require a fat binary
95+
fi
96+
97+
- name: Install dependencies
98+
run: |
99+
export PATH=/Users/runner/hostedtoolcache/Python/3.10.11/arm64/bin:$PATH
100+
mkdir python_packages
101+
python3 -m pip install --upgrade pip
102+
python3 -m pip install --target $PWD/python_packages --only-binary=:all: --platform macosx_10_13_universal2 -r requirements.txt
103+
export PYTHONPATH=$PWD/python_packages:$PYTHONPATH
104+
105+
106+
107+
- name: Build executable with PyInstaller
108+
run: |
109+
export PATH=/Users/runner/hostedtoolcache/Python/3.10.11/arm64/bin:$PATH
110+
export PYTHONPATH=$PWD/python_packages:$PYTHONPATH
111+
cd package
112+
python3 -m PyInstaller --noconfirm cogmood_mac.spec
113+
114+
- name: Upload macOS executable
115+
uses: actions/upload-artifact@v4
116+
with:
117+
name: SUPREME
118+
path: package/dist/SUPREME

.github/workflows/mac-build.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/windows-build.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Stimuli extracted for AssBind
2+
tasks/AssBind/stim/
3+
14
# Byte-compiled / optimized / DLL files
25
__pycache__/
36
*.py[cod]
@@ -31,7 +34,6 @@ MANIFEST
3134
# Usually these files are written by a python script from a template
3235
# before PyInstaller builds the exe, so as to inject date/other infos into it.
3336
*.manifest
34-
*.spec
3537

3638
# Installer logs
3739
pip-log.txt
@@ -127,3 +129,6 @@ dmypy.json
127129

128130
# Pyre type checker
129131
.pyre/
132+
133+
# MacOS
134+
.DS_Store

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# SUPREMEMOOD
22

3+
## Updated Non-Conda Build Instructions
4+
**Note:** Must use Git Bash or WSL on Windows for compatibility with Make
5+
6+
7+
Create virtual environment:
8+
```bash
9+
python -m venv .venv
10+
```
11+
12+
Activate venv:
13+
- Windows:
14+
```bash
15+
source .venv/Scripts/activate
16+
```
17+
18+
- Mac:
19+
```bash
20+
source .venv/bin/activate
21+
```
22+
23+
Install requirements:
24+
```bash
25+
pip install -r requirements.txt
26+
```
27+
28+
Go to package directory:
29+
```bash
30+
cd package
31+
```
32+
33+
Use Makefile to call PyInstaller (The Makefile will check for MacOS or Windows or other & call PyInstaller or output message if OS not supported):
34+
```bash
35+
make
36+
```
37+
338
## Windows build instructions
439
### Kivy 2.0
540
Pysinstaller 5.0 took out some tk hooks that kivy 2.0 depends on. kivy 2.1 fixes that, and could be used with pyinstaller 5.0, but there's a mouse issue with kivy 2.1.
@@ -8,7 +43,7 @@ After cloning this repo
843
```commandline
944
conda create -p ./env_kivy20 -c conda-forge python=3.9 kivy=2.0 pyinstaller=4.10 requests
1045
conda activate ./env_kivy20
11-
pip install kivy-deps.sdl2 kivy-deps.glew pyo pyperclip
46+
pip install kivy-deps.sdl2 kivy-deps.glew pyo
1247
pip install -e cogmood/smile
1348
cd cogmood/package
1449
python -m PyInstaller cogmood_winkivy20.spec
@@ -20,7 +55,7 @@ After cloning this repo
2055
```commandline
2156
conda create -p ./env_kivy20 -c conda-forge python=3.9 kivy=2.0 pyinstaller=4.10 requests
2257
conda activate ./env_kivy20
23-
pip install pyo pyperclip
58+
pip install pyo
2459
pip install -e cogmood/smile
2560
cd cogmood/package
2661
python -m PyInstaller cogmood_mackivy20.spec

0 commit comments

Comments
 (0)