Skip to content

build

build #10

Workflow file for this run

name: build
on:
workflow_dispatch:
schedule:
- cron: '5 14 13 * *'
jobs:
build-windows:
runs-on: windows-2019
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
include: [
{ msystem: mingw64, arch: x86_64 }
]
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
release: false
update: false
install: >-
base-devel
git
mingw-w64-${{ matrix.arch }}-gcc
make
libtool
autoconf
automake-wrapper
mingw-w64-${{ matrix.arch }}-libzip
mingw-w64-${{ matrix.arch }}-github-cli
- uses: actions/checkout@v4
- name: prepare environment
run: |
echo "target_triplet=`gcc -dumpmachine`" >> $GITHUB_ENV
git config --global core.autocrlf false
# libimobiledevice deps (1-3/8), libimobiledevice (4/8), and then unrelated projects (5-8/8)
- name: build projects
run: |
repos=("libplist" "libimobiledevice-glue" "libusbmuxd" "libimobiledevice" "libideviceactivation" "ideviceinstaller" "libirecovery" "idevicerestore")
for repo in "${repos[@]}"; do
echo "Building $repo..."
git clone --depth=1 --recursive "https://github.com/libimobiledevice/$repo"
pushd "$repo" > /dev/null
./autogen.sh CC=gcc CXX=g++ --enable-debug --without-cython
make -j install
popd > /dev/null
done
- name: prepare release
run: |
mkdir -p rel
find /mingw64/bin/ -type f \( -name "*idevice*" -o \
-name "*irecovery*" -o \
-name "libimobiledevice*" -o \
-name "libplist*" -o \
-name "plistutil.exe" -o \
-name "libusbmuxd*" -o \
-name "inetcat.exe" -o \
-name "iproxy.exe" -o \
-name "libcurl*.dll" -o \
-name "libxml2*.dll" -o \
-name "libzip*.dll" -o \
-name "zlib*.dll" -o \
-name "libreadline*.dll" -o \
-name "libbrotli*.dll" -o \
-name "libiconv*.dll" -o \
-name "libunistring*.dll" -o \
-name "libssh*.dll" -o \
-name "libintl*.dll" -o \
-name "libidn*.dll" -o \
-name "libnghttp*.dll" -o \
-name "libpsl*.dll" -o \
-name "libbz2*.dll" -o \
-name "liblzma*.dll" -o \
-name "libzstd*.dll" -o \
-name "libtermcap*.dll" -o \
-name "libcrypto*.dll" -o \
-name "libssl*.dll" \) \
-exec cp -v {} rel \;
tar -C rel -cvf libimobile-suite-latest_${{ matrix.arch }}-${{ matrix.msystem }}.tar .
- name: publish release
env:
github_token: ${{secrets.GITHUB_TOKEN}}
run: |
$NOW=& Get-Date -format yyyy-MM-dd
TAG="${GITHUB_REF##*/}-${GITHUB_SHA:0:7}"
gh release create "$TAG" --title "Release $NOW"
gh release upload "$TAG" libimobile-suite-latest_${{ matrix.arch }}-${{ matrix.msystem }}.tar