OpenSeeFace/.github/workflows/create-binaries.yaml

57 lines
1.6 KiB
YAML

name: Package using PyInstaller
on:
push:
tags:
- v**
workflow_dispatch:
env:
dist-folder-path: dist/OpenSeeFace # The directory generated by PyInstaller
artifact-path: OpenSeeFace # Needed since upload-artifacts pulls files out of parent directories
jobs:
build-all:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Pull OpenSeeFace
uses: actions/checkout@v3
- name: Create binary Unix
if: matrix.os != 'windows-latest'
shell: bash
run: |
chmod +x 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 files for uploading
shell: bash # Using bash for all OSs should be fine, even on Windows
run: |
mv dist/facetracker ${{ 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
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: ${{ env.artifact-path }}
if-no-files-found: error