66 - v*
77
88env :
9- LIBZIM_VERSION : 7.2.2
9+ LIBZIM_VERSION : 8.0.0
1010 LIBZIM_INCLUDE_PATH : include/zim
1111 TWINE_USERNAME : __token__
1212 TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
@@ -19,20 +19,20 @@ jobs:
1919 runs-on : ${{ matrix.os }}
2020 strategy :
2121 matrix :
22- os : [ubuntu-20.04, macos-10.15 ]
23- python-version : ["3.6", "3.7", "3.8", "3.9", "3.10"]
22+ os : [ubuntu-20.04, macos-12 ]
23+ python-version : ["3.6.15 ", "3.7", "3.8", "3.9", "3.10"]
2424
2525 steps :
2626 - uses : actions/checkout@v2
2727
2828 - name : Set up Python ${{ matrix.python-version }}
29- uses : actions/setup-python@v1
29+ uses : actions/setup-python@v4.2.0
3030 with :
3131 python-version : ${{ matrix.python-version }}
3232 architecture : x64
3333
3434 - name : set macOS environ
35- if : matrix.os == 'macos-10.15 '
35+ if : matrix.os == 'macos-12 '
3636 run : |
3737 echo LIBZIM_EXT=dylib >> $GITHUB_ENV
3838 echo LIBZIM_RELEASE=libzim_macos-x86_64-$LIBZIM_VERSION >> $GITHUB_ENV
@@ -41,23 +41,26 @@ jobs:
4141 echo RPATH=@loader_path/ >> $GITHUB_ENV
4242
4343 - name : install Apple certificate
44- if : matrix.os == 'macos-10.15 '
44+ if : matrix.os == 'macos-12 '
4545 shell : bash
4646 env :
4747 CERTIFICATE : /tmp/wmch-devid.p12
4848 run : |
4949 echo "${{ secrets.APPLE_SIGNING_CERTIFICATE }}" | base64 --decode -o $CERTIFICATE
50- security create-keychain -p mysecretpassword build.keychain
51- security default-keychain -s build.keychain
52- security unlock-keychain -p mysecretpassword build.keychain
53- security import $CERTIFICATE -k build.keychain -P "${{ secrets.APPLE_SIGNING_P12_PASSWORD }}" -A
50+ security create-keychain -p mysecretpassword $(pwd)/ build.keychain
51+ security default-keychain -s $(pwd)/ build.keychain
52+ security unlock-keychain -p mysecretpassword $(pwd)/ build.keychain
53+ security import $CERTIFICATE -k $(pwd)/ build.keychain -P "${{ secrets.APPLE_SIGNING_P12_PASSWORD }}" -A
5454 rm $CERTIFICATE
55- security set-key-partition-list -S "apple-tool:,apple:" -s -k mysecretpassword build.keychain
55+ security set-key-partition-list -S "apple-tool:,apple:" -s -k mysecretpassword $(pwd)/ build.keychain
5656 security find-identity -v
57- sudo sntp -sS -t 60 time4.google.com || true
58- xcrun altool --store-password-in-keychain-item "ALTOOL_PASSWORD" \
59- -u "${{ secrets.APPLE_SIGNING_ALTOOL_USERNAME }}" \
60- -p "${{ secrets.APPLE_SIGNING_ALTOOL_PASSWORD }}"
57+ xcrun notarytool store-credentials \
58+ --apple-id "${{ secrets.APPLE_SIGNING_ALTOOL_USERNAME }}" \
59+ --password "${{ secrets.APPLE_SIGNING_ALTOOL_PASSWORD }}" \
60+ --team-id "${{ secrets.APPLE_SIGNING_TEAM }}" \
61+ --validate \
62+ --keychain $(pwd)/build.keychain \
63+ build-profile
6164
6265 - name : set linux environ
6366 if : matrix.os == 'ubuntu-20.04'
@@ -86,33 +89,33 @@ jobs:
8689 if : matrix.os == 'ubuntu-20.04'
8790 run : |
8891 cp -dp $GITHUB_WORKSPACE/libzim_dist/lib/x86_64-linux-gnu/* lib/
89- ln -s libzim.so.${LIBZIM_VERSION:0:1} lib/libzim.so
90- ln -s $GITHUB_WORKSPACE/libzim_dist/$LIBZIM_INCLUDE_PATH include/zim
92+ ln -sf libzim.so.${LIBZIM_VERSION:0:1} lib/libzim.so
93+ ln -sf $GITHUB_WORKSPACE/libzim_dist/$LIBZIM_INCLUDE_PATH include/zim
9194
9295 - name : Link macOS libzim dylib & headers into workspace lib and include folders
93- if : matrix.os == 'macos-10.15 '
96+ if : matrix.os == 'macos-12 '
9497 run : |
9598 cp -Pp $GITHUB_WORKSPACE/libzim_dist/lib/* lib/
9699 ln -sf libzim.${LIBZIM_VERSION:0:1}.dylib lib/libzim.dylib
97- ln -s $GITHUB_WORKSPACE/libzim_dist/$LIBZIM_INCLUDE_PATH include/zim
100+ ln -sf $GITHUB_WORKSPACE/libzim_dist/$LIBZIM_INCLUDE_PATH include/zim
98101
99102 - name : Build cython and sdist
100103 run : |
101- pip install --upgrade "cython>=0.29.30 ,<3.0" setuptools pip wheel
104+ pip install --upgrade "cython>=0.29.32 ,<3.0" setuptools pip wheel
102105 python3 setup.py build_ext --rpath $RPATH
103106 if [[ "${{ matrix.python-version }}" == "3.8" ]]
104107 then
105108 python3 setup.py sdist
106109 fi
107110
108111 - name : add macOS libzim binary to source for wheel
109- if : matrix.os == 'macos-10.15 '
112+ if : matrix.os == 'macos-12 '
110113 run : |
111114 install_name_tool -change libzim.${LIBZIM_VERSION:0:1}.dylib @loader_path/libzim.${LIBZIM_VERSION:0:1}.dylib $(find build -name "libzim.cpython*.so")
112115 cp -pv lib/libzim.${LIBZIM_VERSION:0:1}.dylib $(find build/lib* -type d)/
113116
114117 - name : sign macOS wrapper binary
115- if : matrix.os == 'macos-10.15 '
118+ if : matrix.os == 'macos-12 '
116119 run : |
117120 echo "make sure libzim is signed and notarized"
118121 spctl -a -v -t install lib/libzim.${LIBZIM_VERSION:0:1}.dylib
@@ -123,15 +126,12 @@ jobs:
123126 wrapper_zip="${wrapper}.zip"
124127 ditto -c -k --keepParent ${wrapper} ${wrapper_zip}
125128 echo "request notarization"
126- xcrun altool --notarize-app --file ${wrapper_zip} \
127- --primary-bundle-id org.openzim.libzim.pylibzim \
128- --username "${{ secrets.APPLE_SIGNING_ALTOOL_USERNAME }}" \
129- --password "@keychain:ALTOOL_PASSWORD" \
130- --asc-provider "${{ secrets.APPLE_SIGNING_TEAM }}"
129+ security unlock-keychain -p mysecretpassword $(pwd)/build.keychain
130+ xcrun notarytool submit --keychain $(pwd)/build.keychain --keychain-profile "build-profile" --wait ${wrapper_zip}
131131 echo "remove zip file"
132132 rm ${wrapper_zip}
133133 echo "display request status (should be rejected)"
134- spctl -a -v -t install ${wrapper} || true
134+ spctl --assess -vv --type install ${wrapper}
135135
136136 - name : add Linux libzim binary to source for wheel
137137 if : matrix.os == 'ubuntu-20.04'
0 commit comments