Skip to content

Commit 4147e36

Browse files
committed
- try to follow iDebugTool revisions
1 parent d4b1869 commit 4147e36

1 file changed

Lines changed: 135 additions & 31 deletions

File tree

.github/workflows/libinstruments.yml

Lines changed: 135 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ on:
88
workflow_dispatch:
99

1010
env:
11-
PICOTLS_COMMIT: 5a4461d8a3948d9d26bf861e7d90cb80d8093515
12-
PICOQUIC_COMMIT: 3335f4029b55f59a4868cacf3e92c3fb84982115
13-
LWIP_COMMIT: 4599f551dead9eac233b91c0b9ee5879f5d0620a
11+
OPENSSL_COMMIT: ac3cef223a4c61d6bee34527b6d4c8c6432494a7
12+
LIBPLIST_COMMIT: 15164ebe870590376b2286b09dc97890a07dd373
13+
LIBIMOBILEDEVICE_GLUE_COMMIT: da770a7687f35fbb981db4d7b47b1b032cd5c2c7
14+
LIBUSBMUXD_COMMIT: 93eb168bf6b07472d17781328c21df0c60300524
15+
LIBIMOBILEDEVICE_COMMIT: c4f111800d2b08d6c65ec075ad49c4a60e9e4309
16+
PICOTLS_COMMIT: 5a4461d8a3948d9d26bf861e7d90cb80d8093515
17+
PICOQUIC_COMMIT: 3335f4029b55f59a4868cacf3e92c3fb84982115
18+
LWIP_COMMIT: 4599f551dead9eac233b91c0b9ee5879f5d0620a
1419

1520
jobs:
1621
build:
@@ -37,31 +42,24 @@ jobs:
3742
steps:
3843
- uses: actions/checkout@v4
3944

40-
# ── Linux: system deps ────────────────────────────────────────────────
41-
- name: Install Linux system dependencies
45+
# ── Cache built dependencies ──────────────────────────────────────────
46+
- name: Cache dependencies
47+
id: cache-deps
48+
uses: actions/cache@v4
49+
with:
50+
path: ${{ github.workspace }}/deps
51+
key: ${{ runner.os }}-deps-${{ env.OPENSSL_COMMIT }}-${{ env.LIBPLIST_COMMIT }}-${{ env.LIBIMOBILEDEVICE_GLUE_COMMIT }}-${{ env.LIBUSBMUXD_COMMIT }}-${{ env.LIBIMOBILEDEVICE_COMMIT }}
52+
53+
# ── Linux: build tools ────────────────────────────────────────────────
54+
- name: Install Linux build tools
4255
if: runner.os == 'Linux'
4356
run: |
4457
sudo apt-get update -qq
4558
sudo apt-get install -y \
4659
cmake ninja-build pkg-config \
47-
autoconf automake libtool \
48-
libplist-dev \
49-
libusbmuxd-dev \
50-
libimobiledevice-dev \
51-
libssl-dev
52-
53-
- name: Build libimobiledevice-glue from source (Linux)
54-
if: runner.os == 'Linux'
55-
run: |
56-
# libimobiledevice-glue is not packaged in Ubuntu 22.04
57-
git clone --depth=1 https://github.com/libimobiledevice/libimobiledevice-glue.git /tmp/libimobiledevice-glue
58-
cd /tmp/libimobiledevice-glue
59-
./autogen.sh --prefix=/usr/local
60-
make -j$(nproc)
61-
sudo make install
62-
sudo ldconfig
60+
autoconf automake libtool perl
6361
64-
# ── Windows: MSYS2 ───────────────────────────────────────────────────
62+
# ── Windows: MSYS2 setup ──────────────────────────────────────────────
6563
- name: Set up MSYS2 (Windows)
6664
if: runner.os == 'Windows'
6765
uses: msys2/setup-msys2@v2
@@ -72,9 +70,103 @@ jobs:
7270
mingw-w64-x86_64-cmake
7371
mingw-w64-x86_64-ninja
7472
mingw-w64-x86_64-pkg-config
75-
mingw-w64-x86_64-libimobiledevice
76-
mingw-w64-x86_64-libimobiledevice-glue
77-
mingw-w64-x86_64-openssl
73+
mingw-w64-x86_64-toolchain
74+
autoconf
75+
automake
76+
libtool
77+
perl
78+
79+
# ── Build all iMobileDevice dependencies from source (Linux) ─────────
80+
- name: Build dependencies (Linux)
81+
if: runner.os == 'Linux' && steps.cache-deps.outputs.cache-hit != 'true'
82+
run: |
83+
set -e
84+
DEPS=${{ github.workspace }}/deps
85+
export PKG_CONFIG_PATH=$DEPS/lib/pkgconfig
86+
87+
# OpenSSL 1.1.1
88+
git clone https://github.com/openssl/openssl /tmp/openssl
89+
git -C /tmp/openssl checkout ${{ env.OPENSSL_COMMIT }}
90+
cd /tmp/openssl
91+
./config --prefix=$DEPS --openssldir=$DEPS/ssl no-tests no-shared
92+
make -j$(nproc)
93+
make install_sw
94+
95+
# libplist
96+
git clone https://github.com/libimobiledevice/libplist /tmp/libplist
97+
git -C /tmp/libplist checkout ${{ env.LIBPLIST_COMMIT }}
98+
cd /tmp/libplist
99+
./autogen.sh --prefix=$DEPS --without-cython
100+
make -j$(nproc) && make install
101+
102+
# libimobiledevice-glue
103+
git clone https://github.com/libimobiledevice/libimobiledevice-glue /tmp/libimobiledevice-glue
104+
git -C /tmp/libimobiledevice-glue checkout ${{ env.LIBIMOBILEDEVICE_GLUE_COMMIT }}
105+
cd /tmp/libimobiledevice-glue
106+
./autogen.sh --prefix=$DEPS
107+
make -j$(nproc) && make install
108+
109+
# libusbmuxd
110+
git clone https://github.com/libimobiledevice/libusbmuxd /tmp/libusbmuxd
111+
git -C /tmp/libusbmuxd checkout ${{ env.LIBUSBMUXD_COMMIT }}
112+
cd /tmp/libusbmuxd
113+
./autogen.sh --prefix=$DEPS
114+
make -j$(nproc) && make install
115+
116+
# libimobiledevice
117+
git clone https://github.com/libimobiledevice/libimobiledevice /tmp/libimobiledevice
118+
git -C /tmp/libimobiledevice checkout ${{ env.LIBIMOBILEDEVICE_COMMIT }}
119+
cd /tmp/libimobiledevice
120+
./autogen.sh --prefix=$DEPS --without-cython --enable-openssl \
121+
OPENSSL_CFLAGS="-I$DEPS/include" OPENSSL_LIBS="-L$DEPS/lib -lssl -lcrypto"
122+
make -j$(nproc) && make install
123+
124+
# ── Build all iMobileDevice dependencies from source (Windows) ───────
125+
- name: Build dependencies (Windows)
126+
if: runner.os == 'Windows' && steps.cache-deps.outputs.cache-hit != 'true'
127+
shell: msys2 {0}
128+
run: |
129+
set -e
130+
DEPS="$(cygpath -u '${{ github.workspace }}')/deps"
131+
export PKG_CONFIG_PATH=$DEPS/lib/pkgconfig
132+
133+
# OpenSSL 1.1.1
134+
git clone https://github.com/openssl/openssl /tmp/openssl
135+
git -C /tmp/openssl checkout ${{ env.OPENSSL_COMMIT }}
136+
cd /tmp/openssl
137+
./Configure mingw64 --prefix=$DEPS --openssldir=$DEPS/ssl no-tests no-shared
138+
make -j$(nproc)
139+
make install_sw
140+
141+
# libplist
142+
git clone https://github.com/libimobiledevice/libplist /tmp/libplist
143+
git -C /tmp/libplist checkout ${{ env.LIBPLIST_COMMIT }}
144+
cd /tmp/libplist
145+
./autogen.sh --prefix=$DEPS --without-cython --host=x86_64-w64-mingw32
146+
make -j$(nproc) && make install
147+
148+
# libimobiledevice-glue
149+
git clone https://github.com/libimobiledevice/libimobiledevice-glue /tmp/libimobiledevice-glue
150+
git -C /tmp/libimobiledevice-glue checkout ${{ env.LIBIMOBILEDEVICE_GLUE_COMMIT }}
151+
cd /tmp/libimobiledevice-glue
152+
./autogen.sh --prefix=$DEPS --host=x86_64-w64-mingw32
153+
make -j$(nproc) && make install
154+
155+
# libusbmuxd
156+
git clone https://github.com/libimobiledevice/libusbmuxd /tmp/libusbmuxd
157+
git -C /tmp/libusbmuxd checkout ${{ env.LIBUSBMUXD_COMMIT }}
158+
cd /tmp/libusbmuxd
159+
./autogen.sh --prefix=$DEPS --host=x86_64-w64-mingw32
160+
make -j$(nproc) && make install
161+
162+
# libimobiledevice
163+
git clone https://github.com/libimobiledevice/libimobiledevice /tmp/libimobiledevice
164+
git -C /tmp/libimobiledevice checkout ${{ env.LIBIMOBILEDEVICE_COMMIT }}
165+
cd /tmp/libimobiledevice
166+
./autogen.sh --prefix=$DEPS --without-cython --enable-openssl \
167+
--host=x86_64-w64-mingw32 \
168+
OPENSSL_CFLAGS="-I$DEPS/include" OPENSSL_LIBS="-L$DEPS/lib -lssl -lcrypto"
169+
make -j$(nproc) && make install
78170
79171
# ── QUIC deps: clone at pinned commits ───────────────────────────────
80172
- name: Clone QUIC dependencies
@@ -91,53 +183,65 @@ jobs:
91183
git clone https://github.com/lwip-tcpip/lwip /tmp/lwip
92184
git -C /tmp/lwip checkout ${{ env.LWIP_COMMIT }}
93185
94-
# ── Configure ────────────────────────────────────────────────────────
186+
# ── Configure & Build (Linux) ─────────────────────────────────────────
95187
- name: Configure (Linux)
96188
if: runner.os == 'Linux' && !matrix.quic
97189
run: |
190+
DEPS=${{ github.workspace }}/deps
191+
export PKG_CONFIG_PATH=$DEPS/lib/pkgconfig
98192
cmake -B build -S . \
99193
-G Ninja \
100194
-DCMAKE_BUILD_TYPE=Release \
101195
-DINSTRUMENTS_BUILD_TOOL=ON \
102-
-DCMAKE_PREFIX_PATH=/usr/local
196+
-DCMAKE_PREFIX_PATH=$DEPS
103197
104198
- name: Configure (Linux, QUIC)
105199
if: runner.os == 'Linux' && matrix.quic
106200
run: |
201+
DEPS=${{ github.workspace }}/deps
202+
export PKG_CONFIG_PATH=$DEPS/lib/pkgconfig
107203
cmake -B build -S . \
108204
-G Ninja \
109205
-DCMAKE_BUILD_TYPE=Release \
110206
-DINSTRUMENTS_BUILD_TOOL=ON \
111207
-DINSTRUMENTS_HAS_QUIC=ON \
208+
-DCMAKE_PREFIX_PATH=$DEPS \
209+
-DOPENSSL_ROOT_DIR=$DEPS \
112210
-DPICOTLS_SOURCE_DIR=/tmp/picotls \
113211
-DPICOQUIC_SOURCE_DIR=/tmp/picoquic \
114-
-DLWIP_SOURCE_DIR=/tmp/lwip \
115-
-DCMAKE_PREFIX_PATH=/usr/local
212+
-DLWIP_SOURCE_DIR=/tmp/lwip
116213
117214
- name: Build (Linux)
118215
if: runner.os == 'Linux'
119216
run: cmake --build build --parallel
120217

121-
# ── Windows builds (configure + build in one MSYS2 shell) ────────────
218+
# ── Configure & Build (Windows) ───────────────────────────────────────
122219
- name: Configure & Build (Windows)
123220
if: runner.os == 'Windows' && !matrix.quic
124221
shell: msys2 {0}
125222
run: |
223+
DEPS="$(cygpath -u '${{ github.workspace }}')/deps"
224+
export PKG_CONFIG_PATH=$DEPS/lib/pkgconfig
126225
cmake -B build -S . \
127226
-G Ninja \
128227
-DCMAKE_BUILD_TYPE=Release \
129-
-DINSTRUMENTS_BUILD_TOOL=ON
228+
-DINSTRUMENTS_BUILD_TOOL=ON \
229+
-DCMAKE_PREFIX_PATH=$DEPS
130230
cmake --build build --parallel
131231
132232
- name: Configure & Build (Windows, QUIC)
133233
if: runner.os == 'Windows' && matrix.quic
134234
shell: msys2 {0}
135235
run: |
236+
DEPS="$(cygpath -u '${{ github.workspace }}')/deps"
237+
export PKG_CONFIG_PATH=$DEPS/lib/pkgconfig
136238
cmake -B build -S . \
137239
-G Ninja \
138240
-DCMAKE_BUILD_TYPE=Release \
139241
-DINSTRUMENTS_BUILD_TOOL=ON \
140242
-DINSTRUMENTS_HAS_QUIC=ON \
243+
-DCMAKE_PREFIX_PATH=$DEPS \
244+
-DOPENSSL_ROOT_DIR=$DEPS \
141245
-DPICOTLS_SOURCE_DIR=/tmp/picotls \
142246
-DPICOQUIC_SOURCE_DIR=/tmp/picoquic \
143247
-DLWIP_SOURCE_DIR=/tmp/lwip

0 commit comments

Comments
 (0)