diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..99085ee --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build application executables + +on: + push: + branches: ['master'] + pull_request: + branches: ['master'] + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + id: cp310 + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pyinstaller opencv-python-headless opencv-contrib-python + pip install -r requirements.txt + - name: Make + run: make + - name: Install libgl1 + if: matrix.os == 'ubuntu-latest' + run: sudo apt-get install libgl1 libegl1 + - name: Run PyInstaller (windows) + if: matrix.os == 'windows-latest' + run: pyinstaller -n "OnAirScreen" -F --noconsole -i "images/oas_icon.ico" start.py + - name: Run PyInstaller (ubuntu) + if: matrix.os == 'ubuntu-latest' + run: pyinstaller -n "OnAirScreen" -F --noconsole start.py + - uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.os }} + path: dist/* \ No newline at end of file