Skip to content

Add digiroms.txt to do-not-overwrite list (#27) #145

Add digiroms.txt to do-not-overwrite list (#27)

Add digiroms.txt to do-not-overwrite list (#27) #145

name: Build Executables
on:
push:
pull_request:
release:
types:
- created
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v2.4.2
with:
fetch-depth: 0
- name: Save version info
shell: bash
run: |
echo "UPDATE_TOOL_VERSION = '$(git describe --tags --always)'" > update_tool_version.py
- name: Set up Python
uses: actions/setup-python@v3.1.0
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then
pip install -r requirements.txt
fi
pip install "pyinstaller==5.13.2"
- name: Build macOS Launcher Script
if: runner.os == 'macOS'
run: |
echo '#!/bin/bash' > wificom-update-tool.command
echo 'SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"' >> wificom-update-tool.command
echo 'cd "$SCRIPT_DIR"' >> wificom-update-tool.command
echo 'python -m pip install --upgrade pip' >> wificom-update-tool.command
echo 'pip install -r requirements.txt' >> wificom-update-tool.command
echo 'python "run.py"' >> wificom-update-tool.command
chmod +x wificom-update-tool.command
mkdir wificom-update-tool
cp wificom-update-tool.command wificom-update-tool/
cp run.py wificom-update-tool/
cp update_tool_version.py wificom-update-tool/
cp requirements.txt wificom-update-tool/
cp README.md wificom-update-tool/
zip -r wificom-update-tool-macos.zip wificom-update-tool/
- name: Build Windows and Linux Executable
if: runner.os != 'macOS'
run: |
pip install pyinstaller
pyinstaller --icon=wificomlogo1.ico --onefile --noupx --hidden-import=queue --name wificom-update-installer run.py
- name: Rename executables
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
mv dist/wificom-update-installer.exe wificom-update-tool.exe
fi
if [ "${{ runner.os }}" == "Linux" ]; then
mv dist/wificom-update-installer wificom-update-tool-linux
fi
- name: Upload as Build Artifact
uses: actions/upload-artifact@v4
with:
name: WiFiCom-Update-Tool-${{ runner.os }}
path: |
wificom-update-tool.exe
wificom-update-tool-linux
wificom-update-tool-macos.zip
- name: Attach to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: |
wificom-update-tool.exe
wificom-update-tool-linux
wificom-update-tool-macos.zip
build-linux-glibc:
runs-on: ubuntu-latest
container:
image: debian:buster
steps:
- name: Checkout
uses: actions/checkout@v2.4.2
- name: Set up Python
run: |
apt-get update
apt-get install -y python3 python3-pip
python3 -m pip install --upgrade pip
- name: Install dependencies
run: |
if [ -f requirements.txt ]; then
pip install -r requirements.txt
fi
pip install pyinstaller
- name: Build Linux Executable with lower glibc
run: |
pyinstaller --onefile --hidden-import=queue --name wificom-update-installer-glibc228 run.py
mv dist/wificom-update-installer-glibc228 wificom-update-tool-linux-glibc228
- name: Upload as Build Artifact
uses: actions/upload-artifact@v4
with:
name: WiFiCom-Update-Tool-Linux-glibc228
path: wificom-update-tool-linux-glibc228
- name: Attach to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: wificom-update-tool-linux-glibc228