@@ -24,45 +24,66 @@ jobs:
2424 with :
2525 detached : true
2626 # if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
27-
27+ - uses : conda-incubator/setup-miniconda@v2
28+ with :
29+ auto-update-conda : true
30+ activate-environment : kivy20
31+ python-version : 3.9
32+ channels : conda-forge
2833 - name : Checkout code
2934 uses : actions/checkout@v4
3035 with :
3136 submodules : recursive # Initializes and updates submodules
32-
33- - name : Set up Python
34- uses : actions/setup-python@v5
37+ - name : create env
38+ shell : bash -l {0}
39+ run : conda install -y kivy=2.0 pyinstaller=4.10 requests
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 : cd package && python -m PyInstaller cogmood_winkivy20.spec
52+ - name : save exe
53+ uses : actions/upload-artifact@v3
3554 with :
36- python-version : " 3.10" # Specify your Python version
37- cache : ' pip' # caching pip dependencies
38-
39- - name : Install dependencies
40- run : |
41- python -m pip install --upgrade pip
42- pip install -r requirements.txt
43-
44- - name : Set up Mesa3D OpenGL DLL
45- run : |
46- curl -L -o mesa3d-22.1.5-release-mingw.7z https://github.com/pal1000/mesa-dist-win/releases/download/22.1.5/mesa3d-22.1.5-release-mingw.7z
47- 7z x mesa3d-22.1.5-release-mingw.7z -o$Env:UserProfile\mesa3d
48- shell : pwsh
49-
50- - name : Add Mesa3D to Path
51- run : |
52- echo "$Env:UserProfile\mesa3d\mesa3d-22.1.5-release-mingw\libglapi.dll" >> $Env:Path
53- echo "$Env:UserProfile\mesa3d\mesa3d-22.1.5-release-mingw\opengl32.dll" >> $Env:Path
54- shell : pwsh
55-
56- - name : Build executable with PyInstaller
57- run : |
58- cd package
59- pyinstaller --noconfirm --upx-dir upx/windows_upx.exe cogmood_windows.spec
60-
61- - name : Upload Windows executable
62- uses : actions/upload-artifact@v4
63- with :
64- name : SUPREME
65- path : dist/SUPREME.exe # Path to your Windows executable
55+ name : SUPREME
56+ path : dist/SUPREME.exe
57+ # - name: Set up Python
58+ # uses: actions/setup-python@v5
59+ # with:
60+ # python-version: "3.10" # Specify your Python version
61+ # cache: 'pip' # caching pip dependencies
62+ #
63+ # - name: Install dependencies
64+ # run: |
65+ # python -m pip install --upgrade pip
66+ # pip install -r requirements.txt
67+ #
68+ # - name: Set up Mesa3D OpenGL DLL
69+ # run: |
70+ # curl -L -o mesa3d-22.1.5-release-mingw.7z https://github.com/pal1000/mesa-dist-win/releases/download/22.1.5/mesa3d-22.1.5-release-mingw.7z
71+ # 7z x mesa3d-22.1.5-release-mingw.7z -o$HOME/mesa3d
72+ #
73+ # - name: Add Mesa3D to Path
74+ # run: |
75+ # export PATH=$HOME/mesa3d/x86/:$PATH
76+ #
77+ # - name: Build executable with PyInstaller
78+ # run: |
79+ # cd package
80+ # pyinstaller --noconfirm --upx-dir upx/windows_upx.exe cogmood_windows.spec
81+ #
82+ # - name: Upload Windows executable
83+ # uses: actions/upload-artifact@v4
84+ # with:
85+ # name: SUPREME
86+ # path: dist/SUPREME.exe # Path to your Windows executable
6687
6788 build-macos :
6889 runs-on : macos-latest
@@ -72,35 +93,62 @@ jobs:
7293 with :
7394 detached : true
7495 # if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
75-
96+ - uses : conda-incubator/setup-miniconda@v2
97+ with :
98+ auto-update-conda : true
99+ activate-environment : kivy20
100+ python-version : 3.9
101+ channels : conda-forge
76102 - name : Checkout code
77103 uses : actions/checkout@v4
78104 with :
79105 submodules : recursive # Initializes and updates submodules
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 : Install Homebrew dependencies
87- run : |
88- brew update
89- brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf
90-
91- - name : Install dependencies
92- run : |
93- python -m pip install --upgrade pip
94- pip install pyinstaller
95- pip install --target . --platform=macosx_10_9_universal2 --only-binary=:all: -r requirements.txt
96-
97- - name : Build executable with PyInstaller
98- run : |
99- cd package
100- pyinstaller --noconfirm --target-arch universal2 cogmood_mac.spec
101-
102- - name : Upload macOS executable
103- uses : actions/upload-artifact@v4
106+ - name : create env
107+ shell : bash -l {0}
108+ run : conda install -y kivy=2.0 pyinstaller=4.10 requests
109+ - name : pip installs
110+ shell : bash -l {0}
111+ run : pip install pyo
112+ - name : install smile
113+ shell : bash -l {0}
114+ run : pip install -e smile
115+ - name : create files
116+ shell : bash -l {0}
117+ env :
118+ SIMAC : ${{ secrets.SIMAC }}
119+ ULCRTMAC : ${{ secrets.ULCRTMAC }}
120+ run : echo "$SIMAC" > serverinfo.txt && echo "$ULCRTMAC" > cert.pem
121+ - name : package cogmood
122+ shell : bash -l {0}
123+ run : cd package && python -m PyInstaller cogmood_mackivy20.spec
124+ - name : save exe
125+ uses : actions/upload-artifact@v3
104126 with :
105127 name : SUPREME
106128 path : dist/SUPREME
129+ # - name: Set up Python
130+ # uses: actions/setup-python@v5
131+ # with:
132+ # python-version: "3.10" # Specify your Python version
133+ #
134+ # - name: Install Homebrew dependencies
135+ # run: |
136+ # brew update
137+ # brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf
138+ #
139+ # - name: Install dependencies
140+ # run: |
141+ # python -m pip install --upgrade pip
142+ # pip install pyinstaller
143+ # pip install --target . --platform=macosx_10_9_universal2 --only-binary=:all: -r requirements.txt
144+ #
145+ # - name: Build executable with PyInstaller
146+ # run: |
147+ # cd package
148+ # pyinstaller --noconfirm --target-arch universal2 cogmood_mac.spec
149+ #
150+ # - name: Upload macOS executable
151+ # uses: actions/upload-artifact@v4
152+ # with:
153+ # name: SUPREME
154+ # path: dist/SUPREME
0 commit comments