fix actions/upload-artifact generating tar bombs, change how

make_exe.bat works
This commit is contained in:
Tim Yuen 2022-09-10 16:55:47 -04:00
parent 1f3a01976b
commit d6062c9664
2 changed files with 25 additions and 7 deletions

View file

@ -6,7 +6,8 @@ on:
workflow_dispatch: workflow_dispatch:
env: env:
dist-folder-path: dist/OpenSeeFace dist-folder-path: dist/OpenSeeFace # The directory generated by PyInstaller
artifact-path: OpenSeeFace # Needed since upload-artifacts pulls files out of parent directories
jobs: jobs:
build-all: build-all:
@ -19,21 +20,38 @@ jobs:
- name: Pull OpenSeeFace - name: Pull OpenSeeFace
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Create binary - name: Create binary Unix
if: matrix.os != 'windows-latest'
shell: bash shell: bash
run: | run: |
chmod +x make_exe.sh chmod +x make_exe.sh
./make_exe.sh ./make_exe.sh
- name: Create binary Windows
if: matrix.os == 'windows-latest'
shell: cmd
run: |
choco install vcredist140
xcopy c:\Windows\System32\msvcp140.dll .
xcopy c:\Windows\System32\vcomp140.dll .
xcopy c:\Windows\System32\concrt140.dll .
xcopy c:\Windows\System32\vccorlib140.dll .
make_exe.bat
- name: Move and zip files - name: Move and zip files
shell: bash # Using bash for all OSs should be fine, even on Windows shell: bash # Using bash for all OSs should be fine, even on Windows
run: | run: |
mv dist/facetracker ${{ env.dist-folder-path }} mv dist/facetracker ${{ env.dist-folder-path }}
cp -r models ${{ env.dist-folder-path }} cp -r models ${{ env.dist-folder-path }}
mkdir ${{ env.artifact-path }}
mv ${{ env.dist-folder-path }} ${{ env.artifact-path }}
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ matrix.os }} name: ${{ matrix.os }}
path: ${{ env.dist-folder-path }} path: ${{ env.artifact-path }}
if-no-files-found: error if-no-files-found: error

View file

@ -1,4 +1,6 @@
pyinstaller facetracker.spec --onedir ^ pip install onnxruntime opencv-python==4.5.4.60 pillow numpy pyinstaller
pyinstaller facetracker.py --onedir ^
--add-binary dshowcapture/dshowcapture_x86.dll;. ^ --add-binary dshowcapture/dshowcapture_x86.dll;. ^
--add-binary dshowcapture/dshowcapture_x64.dll;. ^ --add-binary dshowcapture/dshowcapture_x64.dll;. ^
--add-binary dshowcapture/libminibmcapture32.dll;. ^ --add-binary dshowcapture/libminibmcapture32.dll;. ^
@ -11,6 +13,4 @@ pyinstaller facetracker.spec --onedir ^
--add-binary vccorlib140.dll;. ^ --add-binary vccorlib140.dll;. ^
--add-binary run.bat;. --add-binary run.bat;.
del dist\facetracker\cv2\opencv_videoio_ffmpeg420_64.dll del dist\facetracker\cv2\opencv_videoio_*
pause