@@ -3,14 +3,11 @@ name: macOS
33on : [push, pull_request]
44
55env :
6- PYTHON_VER : ' 3.8 .2'
7- PYTHON_VER_SHORT : ' 3.8 '
8- PYTHON_VER_SHORT_COMPACT : ' 38 '
6+ PYTHON_VER : ' 3.9 .2'
7+ PYTHON_VER_SHORT : ' 3.9 '
8+ PYTHON_VER_SHORT_COMPACT : ' 39 '
99 PYOTHERSIDE_VER : ' 1.5.9'
10- OPENSSL_VER : ' 1.1.1g'
11- LIBYUBIKEY_VER : ' 1.13'
12- LIBYKPERS_VER : ' 1.20.0'
13- LIBUSB_VER : ' 1.0.23'
10+ OPENSSL_VER : ' 1.1.1i'
1411
1512jobs :
1613 build :
@@ -20,16 +17,26 @@ jobs:
2017 steps :
2118 - uses : actions/checkout@v1
2219
20+ - name : Install Qt
21+ uses : jurplel/install-qt-action@v2
22+ with :
23+ version : ' 5.15.1'
24+ host : ' mac'
25+ target : ' desktop'
26+
2327 - name : Install dependencies from homebrew
2428 run : |
29+ pip install --upgrade pip
2530 brew update
26- brew install swig qt zlib curl coreutils
27- brew link qt -f
31+ brew install swig zlib curl coreutils
2832
2933 - name : Setup GPG
3034 run : |
31- gpg --keyserver hkps://keys.openpgp.org --recv-keys 0A3B0262BCA1705307D5FF06BCA00FD4B2168C0A 2D347EA6AA65421D e3ff2839c048b25c084debe9b26995e310250568
32- gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C 8657ABB260F056B1E5190839D9C4D26D0E604491
35+ curl https://keys.openpgp.org/vks/v1/by-fingerprint/E3FF2839C048B25C084DEBE9B26995E310250568 | gpg --import
36+ curl "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x7953ac1fbc3dc8b3b292393ed5e9e43f7df9ee8c" -o ./key1.asc
37+ curl "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8657ABB260F056B1E5190839D9C4D26D0E604491" -o ./key2.asc
38+ gpg --import ./key1.asc
39+ gpg --import ./key2.asc
3340
3441 - name : Build OpenSSL
3542 run : |
@@ -53,22 +60,19 @@ jobs:
5360 # otherwise it seems to break the linking for PyOtherSide build later.
5461 # Re-intall after, because it's needed for wget.
5562 brew uninstall gettext --ignore-dependencies
63+ brew unlink python@3.9
5664 ./configure MACOSX_DEPLOYMENT_TARGET=10.13 CPPFLAGS="-I/opt/openssl/include" LDFLAGS="-L/opt/openssl/lib" CC=clang --enable-framework --with-openssl=/opt/openssl --enable-optimizations
5765 sudo make altinstall
66+ brew link --overwrite python@3.9
5867 brew reinstall gettext
5968
60-
61-
6269 - name : Install python dependencies from source
6370 run : |
64- sudo env MACOSX_DEPLOYMENT_TARGET=10.13 CFLAGS="-I/opt/openssl/include" LDFLAGS="-L/opt/openssl/lib" /Library/Frameworks/Python.framework/Versions/3.8/bin/pip3.8 install cryptography --no-binary :all: --ignore-installed --force-reinstall --no-cache
65- /Library/Frameworks/Python.framework/Versions/3.8/bin/pip3.8 download pyscard --no-binary :all:
66- tar -xvf pyscard*
67- sudo env MACOSX_DEPLOYMENT_TARGET=10.13 CFLAGS="-I/opt/openssl/include" LDFLAGS="-L/opt/openssl/lib" /Library/Frameworks/Python.framework/Versions/3.8/bin/pip3.8 install ./pyscard* --no-binary :all: --ignore-installed --force-reinstall --no-cache
68- sudo env MACOSX_DEPLOYMENT_TARGET=10.13 CFLAGS="-I/opt/openssl/include" LDFLAGS="-L/opt/openssl/lib" /Library/Frameworks/Python.framework/Versions/3.8/bin/pip3.8 install -r requirements.txt --no-binary :all:
69-
71+ sudo /Library/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/bin/pip${PYTHON_VER_SHORT} install --upgrade pip
72+ sudo env MACOSX_DEPLOYMENT_TARGET=10.13 CFLAGS="-I/opt/openssl/include" LDFLAGS="-L/opt/openssl/lib" /Library/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/bin/pip${PYTHON_VER_SHORT} install -r requirements.txt
73+
7074 - name : Change id for bundled Python
71- run : sudo sed -i '' 's/org.python.python/com.yubico.python/g' /Library/Frameworks/Python.framework/Versions/3.8 /Resources/Python.app/Contents/Info.plist
75+ run : sudo sed -i '' 's/org.python.python/com.yubico.python/g' /Library/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT} /Resources/Python.app/Contents/Info.plist
7276
7377 - name : Build PyOtherSide QML plugin
7478 run : |
8185 make
8286 sudo make install
8387
84- - name : Build libyubikey
85- run : |
86- wget https://developers.yubico.com/yubico-c/Releases/libyubikey-${LIBYUBIKEY_VER}.tar.gz
87- wget https://developers.yubico.com/yubico-c/Releases/libyubikey-${LIBYUBIKEY_VER}.tar.gz.sig
88- gpg --verify libyubikey-${LIBYUBIKEY_VER}.tar.gz.sig
89- tar -xzvf libyubikey-${LIBYUBIKEY_VER}.tar.gz
90- cd libyubikey-${LIBYUBIKEY_VER}
91- sudo env MACOSX_DEPLOYMENT_TARGET=10.13 ./configure --with-backend=osx --prefix=/opt/libyubikey
92- sudo env MACOSX_DEPLOYMENT_TARGET=10.13 make install
93-
94- - name : Build libykpers
95- run : |
96- wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-${LIBYKPERS_VER}.tar.gz
97- wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-${LIBYKPERS_VER}.tar.gz.sig
98- gpg --verify ykpers-${LIBYKPERS_VER}.tar.gz.sig
99- tar -xzvf ykpers-${LIBYKPERS_VER}.tar.gz
100- cd ykpers-${LIBYKPERS_VER}
101- sudo env MACOSX_DEPLOYMENT_TARGET=10.13 ./configure --disable-dependency-tracking --disable-silent-rules --with-backend=osx --with-libyubikey-prefix=/opt/libyubikey --prefix=/opt/ykpers
102- sudo env MACOSX_DEPLOYMENT_TARGET=10.13 make install
103-
104- - name : Build libusb
105- run : |
106- wget https://github.com/libusb/libusb/releases/download/v${LIBUSB_VER}/libusb-${LIBUSB_VER}.tar.bz2
107- echo "db11c06e958a82dac52cf3c65cb4dd2c3f339c8a988665110e0d24d19312ad8d libusb-${LIBUSB_VER}.tar.bz2" | sha256sum -c -
108- tar -xzvf libusb-${LIBUSB_VER}.tar.bz2
109- cd libusb-${LIBUSB_VER}
110- ./configure --disable-dependency-tracking --prefix=/opt/libusb
111- sudo env MACOSX_DEPLOYMENT_TARGET=10.13 make install
112-
11388 - name : Build yubioath-desktop
11489 run : |
11590 qmake
@@ -118,10 +93,7 @@ jobs:
11893
11994 - name : Copy over dynamic libraries
12095 run : |
121- sudo find /opt/libyubikey/ -name '*.dylib' -exec cp '{}' yubioath-desktop.app/Contents/Frameworks/ ';'
122- sudo find /opt/ykpers/ -name '*.dylib' -exec cp '{}' yubioath-desktop.app/Contents/Frameworks/ ';'
12396 sudo find /opt/openssl/ -name '*.dylib' -exec cp '{}' yubioath-desktop.app/Contents/Frameworks/ ';'
124- sudo find /opt/libusb/ -name '*.dylib' -exec cp '{}' yubioath-desktop.app/Contents/Frameworks/ ';'
12597
12698 - name : Copy over Python.framework to app bundle
12799 run : |
@@ -143,11 +115,6 @@ jobs:
143115 sudo install_name_tool -change /opt/openssl/lib/libcrypto.1.1.dylib @executable_path/../Frameworks/libcrypto.1.1.dylib yubioath-desktop.app/Contents/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/lib/python${PYTHON_VER_SHORT}/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so
144116 sudo install_name_tool -change /opt/openssl/lib/libssl.1.1.dylib @executable_path/../Frameworks/libssl.1.1.dylib yubioath-desktop.app/Contents/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/lib/python${PYTHON_VER_SHORT}/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so
145117
146- - name : Point ykpers dependencies to relative dylibs
147- run : |
148- sudo install_name_tool -change /opt/libyubikey/lib/libyubikey.0.dylib @executable_path/../Frameworks/libyubikey.0.dylib yubioath-desktop.app/Contents/Frameworks/libykpers-1.1.dylib
149- sudo install_name_tool -change /opt/libyubikey/lib/libyubikey.0.dylib @executable_path/../Frameworks/libyubikey.0.dylib yubioath-desktop.app/Contents/Frameworks/libykpers-1.dylib
150-
151118 - name : Rename and archive app bundle
152119 run : |
153120 export REF=$(echo ${GITHUB_REF} | cut -d '/' -f 3)
0 commit comments