Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .github/workflows/build-multiplatform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,27 @@ jobs:
pip install -r requirements.txt
- name: Build engine and bootstrapper
run: |
python build.py
python build.py --no-zip
- name: Decode PFX certificate
run: |
echo "${{ secrets.CODESIGN_PFX }}" | Out-File -Encoding ascii -FilePath cert_base64.txt
certutil -decode cert_base64.txt cert.pfx
shell: pwsh
- name: Sign engine.exe y bootstrapper.exe
run: |
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.VNE_KEY }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/engine.exe
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.VNE_KEY }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/lib/bootstrapper.exe
shell: pwsh
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: dist-windows
path: dist/vne-win.zip
path: dist
- name: delete cert files
run: |
del cert.pfx
del cert_base64.txt
shell: pwsh

build-linux:
runs-on: ubuntu-22.04
Expand All @@ -59,11 +74,12 @@ jobs:
- name: Build engine and bootstrapper
run: |
python build.py
Copy link

Copilot AI Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build.py script should be called with the --no-zip flag since the workflow now uploads the entire dist directory instead of zip files. This ensures consistency with the new artifact upload approach.

Suggested change
python build.py
python build.py --no-zip

Copilot uses AI. Check for mistakes.
# incluye el firmado aqui de engine.exe y /lib/bootstrapper.exe
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: dist-linux
path: dist/vne-linux.zip
path: dist

# Temporarily disabled
# build-mac:
Expand Down
31 changes: 20 additions & 11 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ def so_name():
sys.exit(1)

def build_engine():
no_zip = False
for arg in sys.argv[1:]:
if arg == "--no-zip":
no_zip = True
break

# Verify that main.py exists in the current directory.
if not os.path.exists("main.py"):
print("[build.py] Error: main.py was not found in the current directory.")
Expand All @@ -87,18 +93,21 @@ def build_engine():
subprocess.check_call(doc)
print("[build.py] The documentation was correctly constructed")

if platform.system() == "Windows":
print("[build.py] Zipping the engine and documentation...")
zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine.exe'], f'./dist/vne-win.zip')
elif platform.system() == "Linux":
print("[build.py] Zipping the engine and documentation for Linux...")
zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-linux.zip')
elif platform.system() == "Darwin":
print("[build.py] Zipping the engine and documentation for macOS...")
zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-darwin.zip')
if not no_zip:
if platform.system() == "Windows":
print("[build.py] Zipping the engine and documentation...")
zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine.exe'], f'./dist/vne-win.zip')
elif platform.system() == "Linux":
print("[build.py] Zipping the engine and documentation for Linux...")
zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-linux.zip')
elif platform.system() == "Darwin":
print("[build.py] Zipping the engine and documentation for macOS...")
zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-darwin.zip')
else:
print(f"[build.py] Error: Unsupported platform '{platform.system()}'. Cannot zip engine and documentation.")
sys.exit(1)
else:
print(f"[build.py] Error: Unsupported platform '{platform.system()}'. Cannot zip engine and documentation.")
sys.exit(1)
print("[build.py] Skipping zipping of engine and documentation as per --no-zip flag.")
except subprocess.CalledProcessError as e:
print(f"[build.py] Error during compilation: {e}")
sys.exit(1)
Expand Down
Loading