Skip to content

Commit 901db08

Browse files
committed
Changes indentation; Changes Mesa3D download
1 parent 382057e commit 901db08

File tree

1 file changed

+107
-103
lines changed

1 file changed

+107
-103
lines changed
Lines changed: 107 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,112 @@
11
name: Build Executables
22

33
on:
4-
push:
5-
branches: [actions-development]
6-
pull_request:
7-
branches: [actions-development]
4+
push:
5+
branches: [actions-development]
6+
pull_request:
7+
branches: [actions-development]
88

99
jobs:
10-
build-windows:
11-
runs-on: windows-latest
12-
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v4
15-
with:
16-
submodules: recursive # Initializes and updates submodules
17-
18-
- name: Set up Python
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: "3.10" # Specify your Python version
22-
cache: 'pip' # caching pip dependencies
23-
24-
- name: Install dependencies
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install -r requirements.txt
28-
29-
- name: Download Mesa3D
30-
run: |
31-
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
32-
if [ -f "mesa3d-22.1.5-release-mingw.7z" ]; then
33-
7z x mesa3d-22.1.5-release-mingw.7z -o./mesa3d
34-
else
35-
echo "Download failed: mesa3d-22.1.5-release-mingw.7z not found"
36-
exit 1
37-
fi
38-
39-
- name: Move DLL to Working Directory
40-
run: |
41-
if [ -f "./mesa3d/opengl32.dll" ]; then
42-
mv ./mesa3d/opengl32.dll ${{ runner.temp }}/opengl32.dll
43-
else
44-
echo "Extraction failed: opengl32.dll not found"
45-
exit 1
46-
fi
47-
48-
49-
- name: Add Mesa3D to Path
50-
run: |
51-
echo "$Env:UserProfile\mesa3d\mesa3d-22.1.5-release-mingw\libglapi.dll" >> $Env:Path
52-
echo "$Env:UserProfile\mesa3d\mesa3d-22.1.5-release-mingw\opengl32.dll" >> $Env:Path
53-
shell: pwsh
54-
55-
- name: Build executable with PyInstaller
56-
run: |
57-
cd package
58-
pyinstaller --noconfirm --upx-dir upx/windows_upx.exe cogmood_windows.spec
59-
60-
- name: Upload Windows executable
61-
uses: actions/upload-artifact@v4
62-
with:
63-
name: SUPREME
64-
path: dist/SUPREME.exe # Path to your Windows executable
65-
66-
build-macos:
67-
runs-on: macos-14
68-
steps:
69-
- name: Checkout code
70-
uses: actions/checkout@v4
71-
with:
72-
submodules: recursive # Initializes and updates submodules
73-
74-
- name: Set up Python
75-
uses: actions/setup-python@v5
76-
with:
77-
python-version: "3.10" # Specify your Python version
78-
79-
- name: Check if Python is a fat binary
80-
run: |
81-
if lipo -info $(which python3) | grep -q "Architectures in the fat file"; then
82-
lipo -info $(which python3)
83-
echo "Python is a fat binary."
84-
else
85-
echo "Python is NOT a fat binary."
86-
exit 1 # Optional: Exit with error if you require a fat binary
87-
fi
88-
89-
- name: Install Homebrew dependencies
90-
run: |
91-
brew update
92-
brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf
93-
94-
- name: Install dependencies
95-
run: |
96-
python -m pip install --upgrade pip
97-
pip install -r requirements.txt
98-
99-
- name: Build executable with PyInstaller
100-
run: |
101-
cd package
102-
pyinstaller --noconfirm cogmood_mac.spec
103-
104-
- name: Upload macOS executable
105-
uses: actions/upload-artifact@v4
106-
with:
107-
name: SUPREME
108-
path: dist/SUPREME
10+
build-windows:
11+
runs-on: windows-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
with:
16+
submodules: recursive # Initializes and updates submodules
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.10" # Specify your Python version
22+
cache: "pip" # caching pip dependencies
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
29+
- name: Download and Extract Mesa3D
30+
shell: pwsh # Specify PowerShell as the shell
31+
run: |
32+
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
33+
34+
# Check if the file was downloaded
35+
if (Test-Path "mesa3d-22.1.5-release-mingw.7z") {
36+
# Extract the archive
37+
7z x mesa3d-22.1.5-release-mingw.7z -aoa # -aoa to overwrite files if they exist
38+
} else {
39+
Write-Error "Failed to download Mesa3D archive."
40+
exit 1
41+
}
42+
43+
- name: Move DLL to Working Directory
44+
shell: pwsh # Specify PowerShell as the shell
45+
run: |
46+
if ( -f "./mesa3d/opengl32.dll" ); then
47+
mv ./mesa3d/opengl32.dll ${{ runner.temp }}/opengl32.dll
48+
else
49+
echo "Extraction failed: opengl32.dll not found"
50+
exit 1
51+
fi
52+
53+
- name: Add Mesa3D to Path
54+
run: |
55+
echo "$Env:UserProfile\mesa3d\mesa3d-22.1.5-release-mingw\libglapi.dll" >> $Env:Path
56+
echo "$Env:UserProfile\mesa3d\mesa3d-22.1.5-release-mingw\opengl32.dll" >> $Env:Path
57+
shell: pwsh
58+
59+
- name: Build executable with PyInstaller
60+
run: |
61+
cd package
62+
pyinstaller --noconfirm --upx-dir upx/windows_upx.exe cogmood_windows.spec
63+
64+
- name: Upload Windows executable
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: SUPREME
68+
path: dist/SUPREME.exe # Path to your Windows executable
69+
70+
build-macos:
71+
runs-on: macos-14
72+
steps:
73+
- name: Checkout code
74+
uses: actions/checkout@v4
75+
with:
76+
submodules: recursive # Initializes and updates submodules
77+
78+
- name: Set up Python
79+
uses: actions/setup-python@v5
80+
with:
81+
python-version: "3.10" # Specify your Python version
82+
83+
- name: Check if Python is a fat binary
84+
run: |
85+
if lipo -info $(which python3) | grep -q "Architectures in the fat file"; then
86+
lipo -info $(which python3)
87+
echo "Python is a fat binary."
88+
else
89+
echo "Python is NOT a fat binary."
90+
exit 1 # Optional: Exit with error if you require a fat binary
91+
fi
92+
93+
- name: Install Homebrew dependencies
94+
run: |
95+
brew update
96+
brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf
97+
98+
- name: Install dependencies
99+
run: |
100+
python -m pip install --upgrade pip
101+
pip install -r requirements.txt
102+
103+
- name: Build executable with PyInstaller
104+
run: |
105+
cd package
106+
pyinstaller --noconfirm cogmood_mac.spec
107+
108+
- name: Upload macOS executable
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: SUPREME
112+
path: dist/SUPREME

0 commit comments

Comments
 (0)