Skip to content

Commit

Permalink
Merge branch 'macos' into macos_prmerge
Browse files Browse the repository at this point in the history
  • Loading branch information
kubilus1 committed Oct 18, 2023
2 parents f2a3257 + 4e71f32 commit 8cc56f3
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 3 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,48 @@ jobs:
tag_name: ${{ inputs.relname }}
prerelease: ${{ inputs.prerelease }}

build-macos:
runs-on: macos-latest

env:
VERNAME: ${{ inputs.version }}

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Setup
run: |
brew install [email protected]
python3.10 -m pip install -U -r requirements.txt
python3.10 -m pip install -U -r requirements-build.txt
- name: Optionally set internal version separately
if: ${{ inputs.internalver != '' }}
run: |
echo "${{ inputs.internalver }}" > autoortho/.version
- name: Build
run: |
make osx_bin VERSION=${{ env.VERNAME }}
- name: Save artifact
uses: actions/upload-artifact@v3
with:
name: macosbin
path: autoortho_osx_*.bin

- name: Release
if: ${{ inputs.relname != '' }}
uses: softprops/action-gh-release@v1
with:
files: autoortho_osx_*.bin
tag_name: ${{ inputs.relname }}
prerelease: ${{ inputs.prerelease }}


build-windows:
runs-on: windows-latest
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,30 @@ jobs:
cd autoortho
pytest --log-level=DEBUG -v test_getortho.py test_pydds.py test_downloader.py
test-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Setup
run: |
python3.10 -m pip install -U pytest
python3.10 -m pip install -U -r requirements.txt
- name: Test
run: |
cd autoortho
pytest --log-level=DEBUG -v test_getortho.py test_pydds.py test_downloader.py
test-windows:
runs-on: windows-latest


steps:
- uses: actions/checkout@v3

Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ bin: autoortho/.version
./autoortho/__main__.py -o autoortho_lin.bin

autoortho_osx.bin: autoortho/.version
#python3.10 -m nuitka --verbose --verbose-output=nuitka.log
python3 -m nuitka --verbose --verbose-output=nuitka.log \
--macos-app-icon=autoortho/imgs/ao-icon.ico \
--enable-plugin=eventlet \
Expand Down Expand Up @@ -80,6 +81,10 @@ __main__.dist: autoortho/.version
--disable-console \
./autoortho/__main__.py -o autoortho_win.exe

osx_bin: autoortho_osx_$(VERSION).bin
autoortho_osx_$(VERSION).bin: autoortho_osx.bin
mv autoortho_osx.bin $@

win_exe: AutoOrtho_win_$(VERSION).exe
AutoOrtho_win_$(VERSION).exe: __main__.dist
cp autoortho/imgs/ao-icon.ico .
Expand Down
6 changes: 6 additions & 0 deletions autoortho/aoimage/Makefile.osx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ LDFLAGS=-shared -rdynamic -nodefaultlibs -arch arm64 -arch x86_64 -lpthread
LIBS=$(JPGT)/libturbojpeg.a
#LIBS=-L$(JPGT) -lturbojpeg

#CFLAGS+=-O2 -Wall -fPIC -fdiagnostics-color -fvisibility=hidden \
$(DEFINES)
#
#LDFLAGS=-shared -rdynamic -nodefaultlibs -lpthread
#LIBS=-L$(JPGT) -lturbojpeg

all: $(TARGET)

.c.o: $(HEADERS)
Expand Down
17 changes: 15 additions & 2 deletions autoortho/autoortho_fuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import logging
log = logging.getLogger(__name__)

#from fuse import FUSE, FuseOSError, Operations, fuse_get_context
from refuse.high import FUSE, FuseOSError, Operations, fuse_get_context, fuse_exit, _libfuse
#from fuse import FUSE, FuseOSError, Operations, fuse_get_context, _libfuse
from refuse.high import FUSE, FuseOSError, Operations, fuse_get_context, _libfuse

import getortho

Expand Down Expand Up @@ -506,3 +506,16 @@ def run(ao, mountpoint, nothreads=False):
#direct_io=True
)
log.info(f"FUSE: Exiting mount {mountpoint}")


if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('root')
parser.add_argument('mount')
args = parser.parse_args()

logging.basicConfig(level=logging.DEBUG)
ao = AutoOrtho(args.root)

fuse = FUSE(ao, args.mount, foreground=True, allow_other=True)
1 change: 1 addition & 0 deletions requirements-build.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
nuitka==1.6.6
zstandard
ordered-set
imageio
6 changes: 6 additions & 0 deletions requirements-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@
#
# pip-compile requirements-build.in
#
imageio==2.31.5
# via -r requirements-build.in
nuitka==1.6.6
# via -r requirements-build.in
numpy==1.26.1
# via imageio
ordered-set==4.1.0
# via
# -r requirements-build.in
# nuitka
pillow==10.1.0
# via imageio
zstandard==0.21.0
# via
# -r requirements-build.in
Expand Down

0 comments on commit 8cc56f3

Please sign in to comment.