Skip to content

Commit

Permalink
Merge ac6e085 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 11, 2022
2 parents 8fbe206 + ac6e085 commit 8043790
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 8 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
python ./do.py test-pkg
to-staging:
needs: test
needs: [test, build-exe]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand All @@ -82,7 +82,7 @@ jobs:
github_token: ${{ github.token }}

build-exe:
needs: [ to-staging ]
#needs: [ to-staging ]
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -93,7 +93,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -113,7 +113,6 @@ jobs:
path: dist/*
retention-days: 3


to-master:
# if the commit message was "publish", copy the tested code
# to "master" branch and create GitHub release
Expand Down Expand Up @@ -156,7 +155,7 @@ jobs:

to-github-release:
needs: [ build-exe, release-flag ]
needs: [ build-exe, to-staging, release-flag ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/linux_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build-dev

on:
push:
branches: [ dev ]
paths-ignore:
- '**.md'
- '**.txt'

concurrency:
# subsequently queued workflow run will interrupt previous runs
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:


build-exe:
#needs: [ to-staging ]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r requirements.txt
- name: Pip list
run: pip list | tail -n +3 | awk '{print $1}' | xargs pip show | grep -E 'Location:|Name:' | cut -d ' ' -f 2 | paste -d ' ' - - | awk '{print $2 "/" tolower($1)}' | xargs du -sh 2> /dev/null | sort -hr
- name: Build
run: python ./do.py build
- name: Run exe (test A)
run: dist/img2texture --version
- name: Run exe (test B)
run: dist/img2texture docs/1_orion_src.jpg texture.tmp.jpg
18 changes: 17 additions & 1 deletion do.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,22 @@ def build():
compile.run([
"--clean", "--onefile", "-y",
"--collect-all", "img2texture",


#"--log-level", "DEBUG",
#"--specpath", "pyinstaller.myspec",
"--exclude-module", 'FixTk',
"--exclude-module", 'tcl',
"--exclude-module", 'tk',
"--exclude-module", '_tkinter',
"--exclude-module", 'tkinter',
"--exclude-module", 'Tkinter',
"--exclude-module", "IPython",
"--exclude-module", "mypy",
"--exclude-module", "pip",
"--exclude-module", "click",
"--exclude-module", "neatest",
"--exclude-module", "chkpkg",
"--name", name, "_run.py"
])

Expand All @@ -98,7 +114,7 @@ def build():
print(f"Created {exe}")
print(f"Exe size: {exe.stat().st_size / 1024 / 1024:.0f} MiB")

os.remove(project_dir / "img2texture.spec")
os.remove(project_dir / "img2texture.spec") # этот генерируется автоматичски
shutil.rmtree(project_dir / "build")


Expand Down
5 changes: 3 additions & 2 deletions img2texture/_constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__version__ = "1.0.1post1"
__version__ = "1.0.2"

__copyright__ = "(c) Artsiom iG (rtmigo.github.io)"
__license__ = "MIT"
__build_timestamp__ = "2022-10-11 21:17:45"
__build_timestamp__ = "2022-10-12 01:21:53"

0 comments on commit 8043790

Please sign in to comment.