Skip to content

Commit

Permalink
Dev (#16)
Browse files Browse the repository at this point in the history
Clean up and fixing up misc things

Co-authored-by: Rayrsn <[email protected]>
  • Loading branch information
neural-loop and Rayrsn authored Nov 28, 2022
1 parent ec12dd9 commit f843d7a
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 40 deletions.
135 changes: 95 additions & 40 deletions .github/workflows/pyinstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,54 @@ jobs:
if: contains(github.event.head_commit.message, '[build]') # only run if commit message contains [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pip-licenses
pip install pyinstaller
- name: Build Linux
run: pyinstaller --onefile aimm.py --add-data 'LICENSE:.' --name aimm --distpath dist/
- name: Tests
if: contains(github.event.head_commit.message, '[tests]') # only run if commit message contains [build]
run: |
dist/aimm
dist/aimm init
dist/aimm add BSRGAN
dist/aimm list
dist/aimm remove BSRGAN
dist/aimm search GFPGAN
dist/aimm --version
dist/aimm -v
dist/aimm --check-update
dist/aimm --check-update
dist/aimm --licenses
dist/aimm --licenses -verbose
- name: Upload Release Linux
uses: actions/upload-artifact@v3
with:
name: Linux
path: dist/aimm
#
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
# pip-licenses -f plain-vertical -l --no-license-path -u --from all >> LICENSE
- name: Generate change log
run: |
git clone https://github.com/visioninit/aimm
cd aimm
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:' * %s' | sed '/Merge/d' > changelog.txt
mv changelog.txt ..
cd ..
- name: Build Linux
run: |
pyinstaller --onefile aimm.py --add-data 'LICENSE:.' --name aimm --distpath dist/
cp changelog.txt dist/
cp LICENSE dist/
cp resources/install/linux/Installation-Instructions.txt dist/
mkdir out && cd dist && tar -zcvf ../out/aimm-linux-binary.tar.gz *
- name: Tests
if: contains(github.event.head_commit.message, '[tests]') # only run if commit message contains [build]
run: |
dist/aimm
dist/aimm init
dist/aimm add BSRGAN
dist/aimm list
dist/aimm remove BSRGAN
dist/aimm search GFPGAN
# - name: Upload Release Linux
# uses: actions/upload-artifact@v3
# with:
# name: Linux Binary
# path: dist/aimm
- name: 📂 Deploy FTP
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: "out/"
server-dir: ""

# build-win:
# if: contains(github.event.head_commit.message, '[build]') # only run if commit message contains [build]
# runs-on: windows-latest
Expand All @@ -60,13 +74,22 @@ jobs:
# pip-licenses -f plain-vertical -l --no-license-path -u --from all >> LICENSE
# pip install pyinstaller
# - name: Build Windows
# run: pyinstaller --onefile aimm.py --name aimm --distpath .
# run: pyinstaller --onefile aimm.py --add-data 'LICENSE:.' --name aimm --distpath dist/
# - name: Tests
# if: contains(github.event.head_commit.message, '[tests]') # only run if commit message contains [build]
# run: |
# dist/aimm
# dist/aimm init
# dist/aimm add BSRGAN
# dist/aimm list
# dist/aimm remove BSRGAN
# dist/aimm search GFPGAN
# - name: Upload Release Windows
# uses: actions/upload-artifact@v3
# with:
# name: Windows
# path: ./aimm.exe
#
# name: Windows Binary
# path: dist/aimm.exe

# build-win-installer:
# if: contains(github.event.head_commit.message, '[build]') # only run if commit message contains [build]
# runs-on: windows-latest
Expand All @@ -88,7 +111,7 @@ jobs:
# - name: Upload Release Windows-Installer
# uses: actions/upload-artifact@v3
# with:
# name: Windows-Installer
# name: Windows Installer
# path: dist/win-installer/
#
# build-mac:
Expand Down Expand Up @@ -120,5 +143,37 @@ jobs:
# - name: Upload ReleaseMacOS
# uses: actions/upload-artifact@v3
# with:
# name: MacOS
# name: MacOS Binary
# path: ./aimm
#
# build-mac-installer:
# if: contains(github.event.head_commit.message, '[build]') # only run if commit message contains [build]
# runs-on: macos-11
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python 3.9
# uses: actions/setup-python@v4
# with:
# python-version: 3.9
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt
# pip install pip-licenses
# pip-licenses -f plain-vertical -l --no-license-path -u --from all >> LICENSE
# pip install pyinstaller
# - name: Build MacOS
# run: pyinstaller --onefile aimm.py --name aimm --distpath dist/
# - name: Test
# run: |
# dist/aimm
# dist/aimm init
# dist/aimm add BSRGAN
# dist/aimm list
# dist/aimm remove BSRGAN
# dist/aimm search GFPGAN
# - name: Upload ReleaseMacOS
# uses: actions/upload-artifact@v3
# with:
# name: MacOS Binary
# path: ./aimm
Binary file added resources/icons/icon.icns
Binary file not shown.
Binary file modified resources/icons/icon.ico
Binary file not shown.
Empty file.
17 changes: 17 additions & 0 deletions resources/install/mac/create-dmg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
# Create a folder (named dmg) to prepare our DMG in (if it doesn't already exist).
mkdir -p dist/dmg
# Copy the app bundle to the dmg folder.
cp -r "dist/aimm.app" dist/dmg
# If the DMG already exists, delete it.
create-dmg \
--volname "aimm" \
--volicon "aimm.icns" \
--window-pos 200 120 \
--window-size 600 300 \
--icon-size 100 \
--icon "aimm.app" 175 120 \
--hide-extension "aimm.app" \
--app-drop-link 425 120 \
"dist/aimm.dmg" \
"dist/dmg/"

0 comments on commit f843d7a

Please sign in to comment.