enable Apple silicon build #64
Workflow file for this run
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: Package Application with Pyinstaller | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: true | |
prerelease: false | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
build_linux: | |
needs: release | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install requirements | |
run: sudo apt-get install libgirepository1.0-dev && pip install -r requirements.txt | |
- name: Download weights | |
run: ./weights/download.sh | |
- name: Run PyInstaller | |
run: pyinstaller main.spec | |
- name: Upload artifacts | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ needs.release.outputs.upload_url }} | |
asset_path: ./dist/DistanceEstimation | |
asset_name: DistanceEstimation_linux_x64 | |
asset_content_type: application/x-executable | |
build_macos_x64: | |
needs: release | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install requirements | |
run: pip install -r requirements_macos.txt | |
- name: Download weights | |
run: ./weights/download.sh | |
- name: Run PyInstaller | |
run: pyinstaller main.spec | |
- name: Package as DMG file | |
run: dmgbuild -s dmgbuild_settings.py DistanceEstimation dist/DistanceEstimation.dmg | |
- name: Upload artifacts | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ needs.release.outputs.upload_url }} | |
asset_path: ./dist/DistanceEstimation.dmg | |
asset_name: DistanceEstimation_mac_x64.dmg | |
asset_content_type: application/octet-stream | |
build_macos_arm64: | |
needs: release | |
runs-on: macos-13-large | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install requirements | |
run: pip install -r requirements_macos.txt | |
- name: Download weights | |
run: ./weights/download.sh | |
- name: Run PyInstaller | |
run: pyinstaller main.spec | |
- name: Package as DMG file | |
run: dmgbuild -s dmgbuild_settings.py DistanceEstimation dist/DistanceEstimation.dmg | |
- name: Upload artifacts | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ needs.release.outputs.upload_url }} | |
asset_path: ./dist/DistanceEstimation.dmg | |
asset_name: DistanceEstimation_mac_arm64.dmg | |
asset_content_type: application/octet-stream | |
build_windows: | |
needs: release | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install requirements | |
run: pip install -r requirements.txt | |
- name: Download weights | |
run: .\weights\download.ps1 | |
- name: Run PyInstaller | |
run: pyinstaller main.spec | |
- name: Upload artifacts | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ needs.release.outputs.upload_url }} | |
asset_path: ./dist/DistanceEstimation.exe | |
asset_name: DistanceEstimation_win_x64.exe | |
asset_content_type: application/vnd.microsoft.portable-executable |