Merge pull request #12 from RastislavTuranyi/add_more_metadata #14
This file contains 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: CI/CD | |
on: [push, workflow_dispatch] | |
jobs: | |
windows: | |
runs-on: windows-latest | |
steps: | |
- uses: FedericoCarboni/setup-ffmpeg@v3 | |
id: setup-ffmpeg | |
- uses: actions/checkout@v3 | |
- name: Install python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.9' | |
- name: Install dependencies | |
run: | | |
(gc requirements.txt) -replace 'PyQt5-Qt5==5.15.2', 'PyQt5' | Out-File -encoding UTF8 requirements.txt | |
python -m pip install -r requirements.txt | |
- name: Create bundle | |
run: | | |
(gc kl_gui.spec) -replace 'tools/ffmpeg.exe', "${{steps.setup-ffmpeg.ffmpeg-path}}" | Out-File -encoding UTF8 kl_gui.spec | |
(gc kl_gui.spec) -replace 'tools/', 'C:/hostedtoolcache/windows/Python/3.10.9/x64/Lib/site-packages/ultrastar_pitch/binaries/' | Out-File -encoding UTF8 kl_gui.spec | |
(gc kl_gui.spec) -replace '.venv/', 'C:/hostedtoolcache/windows/Python/3.10.9/x64/' | Out-File -encoding UTF8 kl_gui.spec | |
pyinstaller kl_gui.spec | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows | |
path: ${{ github.workspace }}\dist\*.exe | |
retention-days: 90 | |
macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install ffmpeg | |
run: brew install ffmpeg@6 | |
- name: Install python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.9' | |
- name: Install dependencies | |
run: | | |
test -f "/usr/local/Cellar/ffmpeg/6.0_2/bin/ffmpeg" && sudo sed -i '' 's|tools/ffmpeg.exe|/usr/local/Cellar/ffmpeg/6.0_2/bin/ffmpeg|' kl_gui.spec | |
test -f "/usr/local/Cellar/ffmpeg/6.1.1_2/bin/ffmpeg" && sudo sed -i '' 's|tools/ffmpeg.exe|/usr/local/Cellar/ffmpeg/6.1.1_2/bin/ffmpeg|' kl_gui.spec | |
test -f "/usr/local/Cellar/ffmpeg/6.1.1_3/bin/ffmpeg" && sudo sed -i '' 's|tools/ffmpeg.exe|/usr/local/Cellar/ffmpeg/6.1.1_3/bin/ffmpeg|' kl_gui.spec | |
sudo sed -i '' 's|tools/|/Users/runner/hostedtoolcache/Python/3.10.9/x64/lib/python3.10/site-packages/ultrastar_pitch/binaries/|' kl_gui.spec | |
sudo sed -i '' 's|.venv/lib/|/Users/runner/hostedtoolcache/Python/3.10.9/x64/lib/python3.10/|' kl_gui.spec | |
sudo sed -i '' 's|PyQt5-Qt5|PyQt5|' requirements.txt | |
python -m pip install -r requirements.txt | |
- name: Create bundle | |
run: pyinstaller kl_gui.spec | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: macos | |
path: ${{ github.workspace }}/dist/* | |
retention-days: 90 | |
ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install ffmpeg | |
run: | | |
sudo apt-get update | |
sudo apt-get install ffmpeg python3-pyqt5 | |
- name: Install python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.9' | |
- name: Install dependencies | |
run: | | |
sudo sed -i 's|tools/ffmpeg.exe|/usr/bin/ffmpeg|' kl_gui.spec | |
sudo sed -i 's|tools/|/opt/hostedtoolcache/Python/3.10.9/x64/lib/python3.10/site-packages/ultrastar_pitch/binaries/|' kl_gui.spec | |
sudo sed -i 's|.venv/lib/|/opt/hostedtoolcache/Python/3.10.9/x64/lib/python3.10/|' kl_gui.spec | |
sudo sed -i 's|PyQt5-Qt5|PyQt5|' requirements.txt | |
python -m pip install -r requirements.txt | |
- name: Create bundle | |
run: pyinstaller kl_gui.spec | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ubuntu | |
path: ${{ github.workspace }}/dist/* | |
retention-days: 90 |