77 LIBCURL_VERSION : 7.73.0
88 ZLIB_VERSION : 1.2.11
99 LIBZIP_VERSION : 1.7.3
10- LIBGENERAL_VERSION : 34
10+ LIBGENERAL_VERSION : 35
1111 LIBFRAGMENTZIP_VERSION : 60
1212 LIBIRECOVERY_VERSION : 1.0.0
1313
4343 echo "ROOT=${ROOT}" >> $GITHUB_ENV
4444 echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
4545 echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
46- sudo apt-get install libreadline-dev
4746
4847 - name : setup toolchain
4948 run : |
@@ -201,7 +200,6 @@ jobs:
201200 echo "ROOT=${ROOT}" >> $GITHUB_ENV
202201 echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
203202 echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
204- sudo apt-get install libreadline-dev
205203
206204 - name : setup toolchain
207205 run : |
@@ -264,7 +262,8 @@ jobs:
264262 --enable-ipv6 \
265263 --disable-dependency-tracking \
266264 --with-zlib=${ROOT}/usr \
267- --with-winssl
265+ --with-winssl \
266+ --with-schannel
268267 make -j$(nproc)
269268 make install DESTDIR="${ROOT}"
270269
@@ -341,9 +340,149 @@ jobs:
341340 name : tsschecker_windows
342341 path : tsschecker/tsschecker.exe
343342
343+ build-macos :
344+ runs-on : macos-latest
345+ steps :
346+ - uses : actions/checkout@v1
347+ with :
348+ submodules : recursive
349+
350+ - name : ccache cache files
351+ uses : actions/cache@v2
352+ with :
353+ path : |
354+ ~/.ccache
355+ ~/dep_src
356+ key : build-macos-${ { env.GITHUB_SHA } }
357+ restore-keys : |
358+ build-macos-
359+
360+ - name : setup environment
361+ run : |
362+ export DOWNLOAD_PATH=${HOME}/dep_src
363+ export DEP_PATH=${HOME}/build
364+ export ROOT=${HOME}/root
365+ mkdir -p ${DOWNLOAD_PATH} ${DEP_PATH} ${ROOT}
366+ echo "DOWNLOAD_PATH=${DOWNLOAD_PATH}" >> $GITHUB_ENV
367+ echo "DEP_PATH=${DEP_PATH}" >> $GITHUB_ENV
368+ echo "ROOT=${ROOT}" >> $GITHUB_ENV
369+ echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
370+ echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
371+
372+ - name : setup toolchain
373+ run : |
374+ brew install ccache libtool autoconf automake
375+ echo "CC=ccache clang" >> $GITHUB_ENV
376+ echo "CXX=ccache clang++" >> $GITHUB_ENV
377+ echo "CPPFLAGS=-I${ROOT}/usr/include" >> $GITHUB_ENV
378+ echo "LDFLAGS=-L${ROOT}/usr/lib" >> $GITHUB_ENV
379+ echo "PKG_CONFIG_PATH=${ROOT}/usr/lib/pkgconfig" >> $GITHUB_ENV
380+ echo "LD_LIBRARY_PATH=${ROOT}/usr/lib" >> $GITHUB_ENV
381+
382+ - name : build libplist
383+ run : |
384+ wget -q -nc -P ${DOWNLOAD_PATH} https://github.com/libimobiledevice/libplist/releases/download/${LIBPLIST_VERSION}/libplist-${LIBPLIST_VERSION}.tar.bz2
385+ tar xf ${DOWNLOAD_PATH}/libplist-${LIBPLIST_VERSION}.tar.bz2 -C ${DEP_PATH}
386+ cd ${DEP_PATH}/libplist-${LIBPLIST_VERSION}
387+ ./configure --prefix=/usr --without-cython --enable-static --disable-shared
388+ make
389+ make install DESTDIR="${ROOT}"
390+
391+ - name : build libirecovery
392+ run : |
393+ wget -q -nc -P ${DOWNLOAD_PATH} https://github.com/libimobiledevice/libirecovery/releases/download/${LIBIRECOVERY_VERSION}/libirecovery-${LIBIRECOVERY_VERSION}.tar.bz2
394+ tar xf ${DOWNLOAD_PATH}/libirecovery-${LIBIRECOVERY_VERSION}.tar.bz2 -C ${DEP_PATH}
395+ cd ${DEP_PATH}/libirecovery-${LIBIRECOVERY_VERSION}
396+ wget https://gist.github.com/1Conan/2d015aad17f87f171b32ebfd9f48fb96/raw/c12fca047f8b0bba1c8983470bf863d80d7e1c1d/libirecovery.patch
397+ patch -p1 < libirecovery.patch
398+ glibtoolize --force
399+ aclocal -I m4
400+ autoheader
401+ automake --add-missing
402+ autoconf
403+ ./configure --prefix=/usr --enable-static --disable-shared --with-dummy
404+ make
405+ make install DESTDIR="${ROOT}"
406+
407+ - name : build libcurl
408+ run : |
409+ wget -q -nc -P ${DOWNLOAD_PATH} https://curl.haxx.se/download/curl-${LIBCURL_VERSION}.tar.gz
410+ tar xf ${DOWNLOAD_PATH}/curl-${LIBCURL_VERSION}.tar.gz -C ${DEP_PATH}
411+ cd ${DEP_PATH}/curl-${LIBCURL_VERSION}
412+ ./configure \
413+ --prefix=/usr \
414+ --enable-static \
415+ --disable-shared \
416+ --enable-ipv6 \
417+ --disable-dependency-tracking \
418+ --with-zlib=${ROOT}/usr \
419+ --with-darwinssl \
420+ --with-secure-transport \
421+ --without-ca-bundle \
422+ --without-ca-path \
423+ --without-zstd \
424+ --without-brotli \
425+ --disable-ldap \
426+ --disable-ldaps \
427+ --without-libidn2 \
428+ --without-nghttp2 \
429+ --without-librtmp
430+ make
431+ make install DESTDIR="${ROOT}"
432+
433+ - name : build libzip
434+ run : |
435+ wget -q -nc -P ${DOWNLOAD_PATH} https://libzip.org/download/libzip-${LIBZIP_VERSION}.tar.gz
436+ tar xf ${DOWNLOAD_PATH}/libzip-${LIBZIP_VERSION}.tar.gz -C ${DEP_PATH}
437+ cd ${DEP_PATH}/libzip-${LIBZIP_VERSION}
438+ cmake \
439+ -DBUILD_SHARED_LIBS=OFF \
440+ -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
441+ -DENABLE_BZIP2=FALSE \
442+ -DENABLE_LZMA=FALSE \
443+ -DCMAKE_INSTALL_PREFIX=/usr \
444+ -DSKIP_BUILD_RPATH=TRUE
445+ make
446+ make install DESTDIR="${ROOT}"
447+
448+ - name : build libgeneral
449+ run : |
450+ wget -q -nc -P ${DOWNLOAD_PATH} \
451+ https://github.com/tihmstar/libgeneral/releases/download/${LIBGENERAL_VERSION}/buildroot_macos-latest.zip
452+ unzip ${DOWNLOAD_PATH}/buildroot_macos-latest.zip -d ${HOME}
453+ rsync -a ${HOME}/buildroot_macos-latest/usr/local/ ${ROOT}/usr/
454+ rm -rf ${HOME}/buildroot_macos-latest ${DOWNLOAD_PATH}/buildroot_macos-latest.zip
455+ #rm -rf ${DEP_PATH}/libgeneral
456+ #git clone https://github.com/tihmstar/libgeneral ${DEP_PATH}/libgeneral
457+ #cd ${DEP_PATH}/libgeneral
458+ #git checkout f571dc2949c4ca4c9b5db72fff35878717e5ce0b
459+ #./autogen.sh --enable-static --disable-shared --prefix=/usr
460+ #make
461+ #make install DESTDIR="${ROOT}"
462+
463+ - name : build libfragmentzip
464+ run : |
465+ wget -q -nc -P ${DOWNLOAD_PATH} \
466+ https://github.com/tihmstar/libfragmentzip/releases/download/${LIBFRAGMENTZIP_VERSION}/buildroot_macos-latest.zip
467+ unzip ${DOWNLOAD_PATH}/buildroot_macos-latest.zip -d ${HOME}
468+ rsync -a ${HOME}/buildroot_macos-latest/usr/local/ ${ROOT}/usr/
469+ rm -rf ${HOME}/buildroot_macos-latest ${DOWNLOAD_PATH}/buildroot_macos-latest.zip
470+
471+ - name : configure
472+ run : |
473+ ./autogen.sh \
474+ --enable-static \
475+ --disable-shared \
476+ - name : build
477+ run : make LDFLAGS="-all-static ${LDFLAGS}"
478+ - uses : actions/upload-artifact@v1
479+ with :
480+ name : tsschecker_macos
481+ path : tsschecker/tsschecker
482+
344483 releases :
345484 runs-on : ubuntu-latest
346- needs : [build-linux, build-windows]
485+ needs : [build-linux, build-windows, build-macos ]
347486 steps :
348487 - uses : actions/checkout@v1
349488
@@ -357,8 +496,13 @@ jobs:
357496 with :
358497 name : tsschecker_windows
359498 path : tsschecker_windows
499+ - name : Download macos artifact
500+ uses : actions/download-artifact@v1
501+ with :
502+ name : tsschecker_macos
503+ path : tsschecker_macos
360504
361- - name : Set env vars and zip
505+ - name : Set env vars
362506 run : |
363507 echo "BUILD_VERSION_NUM=$(echo "$(git rev-list --count HEAD | tr -d '\n')")" >> $GITHUB_ENV
364508 echo "BUILD_VERSION_SHA=$(echo "$(git rev-parse HEAD | tr -d '\n'])")" >> $GITHUB_ENV
@@ -392,4 +536,13 @@ jobs:
392536 upload_url : ${{ steps.create_release.outputs.upload_url }}
393537 asset_path : ./tsschecker_windows/tsschecker.exe
394538 asset_name : tsschecker.exe
395- asset_content_type : application/x-msdownload
539+ asset_content_type : application/x-msdownload
540+ - name : Upload Release Asset macos
541+ uses : actions/upload-release-asset@v1
542+ env :
543+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
544+ with :
545+ upload_url : ${{ steps.create_release.outputs.upload_url }}
546+ asset_path : ./tsschecker_macos/tsschecker
547+ asset_name : tsschecker_macos
548+ asset_content_type : application/x-mach-binary
0 commit comments