mirror of
https://github.com/EyeTrackVR/OpenIris.git
synced 2025-11-04 15:39:42 +08:00
feat: testing createzip script
This commit is contained in:
parent
af89d4d380
commit
3094c29d1f
8
.github/workflows/build_release_bins.yml
vendored
8
.github/workflows/build_release_bins.yml
vendored
@ -50,10 +50,6 @@ jobs:
|
||||
run: |
|
||||
sed -i '/\[env\]/p; s/\[env\]/upload_protocol = custom/' platformio.ini
|
||||
# sed -i '/\[env\]/p; s/\[env\]/upload_command = \$PYTHONEXE .\/tools\/createzip.py \$FLASH_EXTRA_IMAGES \$ESP32_APP_OFFSET \$SOURCE/' platformio.ini
|
||||
- name: Archive Firmware name File
|
||||
# create an environment variable with the name of the firmware file by catting the firmware_name.txt file
|
||||
run: |
|
||||
echo "FIRMWARE_NAME=$(cat ./ESP/tools/firmware_name.txt)" >> $GITHUB_ENV
|
||||
- name: Build OpenIris Firmware
|
||||
working-directory: ./ESP
|
||||
run: |
|
||||
@ -66,6 +62,10 @@ jobs:
|
||||
pio run --environment ${{ matrix.target_name }}${{ matrix.target_build_type }} --target upload
|
||||
echo "::endgroup::"
|
||||
unzip -l './build/${{ matrix.target_name }}${{ matrix.target_build_type }}/*.zip'
|
||||
- name: Archive Firmware name File
|
||||
# create an environment variable with the name of the firmware file by catting the firmware_name.txt file
|
||||
run: |
|
||||
echo "FIRMWARE_NAME=$(cat ./ESP/tools/firmware_name.txt)" >> $GITHUB_ENV
|
||||
- name: Archive Firmware Binaries
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
Import("env")
|
||||
|
||||
import os
|
||||
import distro
|
||||
|
||||
print(distro.id())
|
||||
import sys
|
||||
from ntpath import basename
|
||||
from zipfile import ZipFile
|
||||
import json
|
||||
|
||||
|
||||
def createZip(source, target, env):
|
||||
if distro.id() == "ubuntu":
|
||||
if (
|
||||
sys.platform.startswith("ubuntu")
|
||||
or sys.platform.startswith("Linux")
|
||||
or sys.platform.startswith("linux")
|
||||
):
|
||||
print("Program has been built, creating zip archive!")
|
||||
my_flags = env.ParseFlags(env["BUILD_FLAGS"])
|
||||
defines = dict()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user