--- a +++ b/.github/workflows/python-app-all_main.yml @@ -0,0 +1,55 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python Main + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + #runs-on: ubuntu-18.04 + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['windows-latest', 'Ubuntu 22.04', 'macos-latest'] + #os: ['windows-latest'] + py: ['bx'] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: "3.9" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install . + pip install pyinstaller onnxruntime + - name: Run Pyinstaller 1 + if: matrix.os == 'windows-latest' + run: | + pyinstaller -c -p ./tigerbx --icon=./tigerbx/exe/ico.ico --add-data "./tigerbx/exe/onnxruntime_providers_shared.dll;onnxruntime/capi" -F ./tigerbx/${{ matrix.py }}.py + - name: Run Pyinstaller 2 + if: matrix.os == 'ubuntu-20.04' + run: | + pyinstaller -c -p ./tigerbx --icon=./tigerbx/exe/ico.ico --add-data ./tigerbx/exe/libonnxruntime_providers_shared.so:onnxruntime/capi -F ./tigerbx/${{ matrix.py }}.py + - name: Run Pyinstaller 3 + if: matrix.os == 'macos-latest' + run: | + pyinstaller -c -p ./tigerbx --icon=./tigerbx/exe/ico.ico --add-data ./tigerbx/exe/libonnxruntime_providers_shared.so:onnxruntime/capi -F ./tigerbx/${{ matrix.py }}.py + + + - uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.py }}-${{ matrix.os }} + path: dist/*