mise en place d'une première ui #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build UI executables | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -r ui/requirements.txt | |
| - name: Build executable | |
| run: | | |
| # choose separator for add-data | |
| if [[ "${{ matrix.os }}" == "windows-latest" ]]; then SEP=';'; else SEP=':'; fi | |
| python -m PyInstaller --name ok_computer_ui-${{ matrix.os }} --onefile \ | |
| --add-data "ui/templates${SEP}templates" \ | |
| --add-data "ui/static${SEP}static" \ | |
| ui/app.py | |
| shell: bash | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ok_computer_ui-${{ matrix.os }} | |
| path: dist/* |