[Terminal] resolve issues with string names and size #47
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: Development Build | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| pull_request: | |
| branches: | |
| - develop | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| tag_name: ${{ steps.vars.outputs.tag_name }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Generate date-based tag | |
| id: vars | |
| run: echo "tag_name=dev-$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT | |
| - name: Configure Git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Create and push tag | |
| run: | | |
| git tag -f ${{ steps.vars.outputs.tag_name }} | |
| git push origin ${{ steps.vars.outputs.tag_name }} --force | |
| - name: Create GitHub Release | |
| id: create_release | |
| uses: actions/create-release@latest | |
| with: | |
| tag_name: ${{ steps.vars.outputs.tag_name }} | |
| release_name: Development Build ${{ steps.vars.outputs.tag_name }} | |
| draft: false | |
| prerelease: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| Arduino-build: | |
| needs: create-release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Arduino CLI | |
| run: | | |
| curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh | |
| sudo mv bin/arduino-cli /usr/local/bin/ | |
| - name: Set up Arduino CLI | |
| run: | | |
| arduino-cli config init | |
| arduino-cli core update-index | |
| arduino-cli core install arduino:avr | |
| - name: Install Adafruit GFX Library (via Library Manager) | |
| run: | | |
| arduino-cli lib install "Adafruit GFX Library" | |
| arduino-cli lib install "SD" | |
| - name: Clone SH1106, TinyGPSPlus, and Base64 libraries | |
| run: | | |
| mkdir -p custom-libraries | |
| git clone https://github.com/wonho-maker/Adafruit_SH1106 custom-libraries/Adafruit_SH1106 | |
| git clone https://github.com/mikalhart/TinyGPSPlus custom-libraries/TinyGPSPlus | |
| git clone https://github.com/Xander-Electronics/Base64 custom-libraries/Base64 | |
| - name: Compile sketch for Arduino Mega 2560 | |
| run: | | |
| mkdir -p build-out | |
| arduino-cli compile \ | |
| --fqbn arduino:avr:mega \ | |
| --libraries custom-libraries \ | |
| --output-dir build-out \ | |
| Source/HamMessenger | |
| - name: Rename firmware file for release | |
| run: | | |
| mkdir -p output | |
| cp build-out/HamMessenger.ino.hex output/HamMessenger-mega2560.hex | |
| - name: Upload Arduino firmware | |
| uses: actions/upload-release-asset@v1 | |
| with: | |
| upload_url: ${{ needs.create-release.outputs.upload_url }} | |
| asset_path: output/HamMessenger-mega2560.hex | |
| asset_name: HamMessenger-mega2560.hex | |
| asset_content_type: application/octet-stream | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| gui-windows-build: | |
| needs: create-release | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install Python dependencies | |
| run: | | |
| pip install -r Source/GUI/requirements-windows.txt | |
| pip install -U pyinstaller | |
| - name: Build GUI with PyInstaller | |
| run: | | |
| cd Source/GUI | |
| pyinstaller --noconfirm --windowed --name HamMessenger --onefile Qt.py | |
| - name: Copy built GUI executable | |
| run: | | |
| mkdir output | |
| copy Source\GUI\dist\HamMessenger.exe output\HamMessenger-windows.exe | |
| - name: Upload Windows GUI | |
| uses: actions/upload-release-asset@v1 | |
| with: | |
| upload_url: ${{ needs.create-release.outputs.upload_url }} | |
| asset_path: output/HamMessenger-windows.exe | |
| asset_name: HamMessenger-windows.exe | |
| asset_content_type: application/octet-stream | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| gui-mac-build: | |
| needs: create-release | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| pip install -r Source/GUI/requirements-macos.txt | |
| pip install -U pyinstaller | |
| - name: Build macOS GUI with PyInstaller | |
| run: | | |
| cd Source/GUI | |
| python -m PyInstaller --windowed --name HamMessenger --onefile Qt.py | |
| - name: Install create-dmg | |
| run: brew install create-dmg | |
| - name: Create DMG | |
| run: | | |
| mkdir -p output | |
| create-dmg \ | |
| --volname "HamMessenger" \ | |
| --window-pos 200 120 \ | |
| --window-size 800 400 \ | |
| --icon-size 100 \ | |
| --icon "HamMessenger.app" 200 190 \ | |
| --hide-extension "HamMessenger.app" \ | |
| --app-drop-link 600 185 \ | |
| output/HamMessenger-mac.dmg \ | |
| Source/GUI/dist/HamMessenger.app | |
| - name: Upload macOS GUI | |
| uses: actions/upload-release-asset@v1 | |
| with: | |
| upload_url: ${{ needs.create-release.outputs.upload_url }} | |
| asset_path: output/HamMessenger-mac.dmg | |
| asset_name: HamMessenger-mac.dmg | |
| asset_content_type: application/octet-stream | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |