summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2021-09-06 01:29:24 +0200
committerGravatar Nikias Bassen2021-09-06 01:29:24 +0200
commitd8daaa8b10bef9be00aef87d7e9f2ef1d327bd1b (patch)
treeb547f0f6220d804cc655222e0ce38f1ee861efef
parent46869ab79dbc8828fea9f9807be0938fc211d6e5 (diff)
downloadlibimobiledevice-d8daaa8b10bef9be00aef87d7e9f2ef1d327bd1b.tar.gz
libimobiledevice-d8daaa8b10bef9be00aef87d7e9f2ef1d327bd1b.tar.bz2
[github-actions] Add build workflow
-rw-r--r--.github/workflows/build.yml214
1 files changed, 214 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..6fcc2c7
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,214 @@
1name: build
2
3on: [push]
4
5jobs:
6 build-linux-ubuntu:
7 runs-on: ubuntu-latest
8 steps:
9 - name: install dependencies
10 run: |
11 sudo apt-get install cython
12 - name: prepare environment
13 run: |
14 echo "target_triplet=`gcc -dumpmachine`" >> $GITHUB_ENV
15 - name: fetch libplist
16 uses: dawidd6/action-download-artifact@v2
17 with:
18 github_token: ${{secrets.GITHUB_TOKEN}}
19 workflow: build.yml
20 name: libplist-latest_${{env.target_triplet}}
21 repo: libimobiledevice/libplist
22 - name: fetch libusbmuxd
23 uses: dawidd6/action-download-artifact@v2
24 with:
25 github_token: ${{secrets.GITHUB_TOKEN}}
26 workflow: build.yml
27 name: libusbmuxd-latest_${{env.target_triplet}}
28 repo: libimobiledevice/libusbmuxd
29 - name: fetch libimobiledevice-glue
30 uses: dawidd6/action-download-artifact@v2
31 with:
32 github_token: ${{secrets.GITHUB_TOKEN}}
33 workflow: build.yml
34 name: libimobiledevice-glue-latest_${{env.target_triplet}}
35 repo: libimobiledevice/libimobiledevice-glue
36 - name: install external dependencies
37 run: |
38 mkdir extract
39 for I in *.tar; do
40 tar -C extract -xvf $I
41 done
42 sudo cp -r extract/* /
43 sudo ldconfig
44 - uses: actions/checkout@v2
45 with:
46 fetch-depth: 0
47 - name: autogen
48 run: ./autogen.sh PKG_CONFIG_PATH=/usr/local/lib/pkgconfig LDFLAGS="-Wl,-rpath=/usr/local/lib"
49 - name: make
50 run: make
51 - name: make install
52 run: sudo make install
53 - name: prepare artifact
54 run: |
55 mkdir -p dest
56 DESTDIR=`pwd`/dest make install
57 tar -C dest -cf libimobiledevice.tar usr
58 - name: publish artifact
59 uses: actions/upload-artifact@v2
60 with:
61 name: libimobiledevice-latest_${{env.target_triplet}}
62 path: libimobiledevice.tar
63 build-macOS:
64 runs-on: macOS-latest
65 steps:
66 - name: install dependencies
67 run: |
68 if test -x "`which port`"; then
69 sudo port install libtool autoconf automake pkgconfig
70 else
71 brew install libtool autoconf automake pkgconfig
72 fi
73 pip install cython
74 shell: bash
75 - name: fetch libplist
76 uses: dawidd6/action-download-artifact@v2
77 with:
78 github_token: ${{secrets.GITHUB_TOKEN}}
79 workflow: build.yml
80 name: libplist-latest_macOS
81 repo: libimobiledevice/libplist
82 - name: fetch libusbmuxd
83 uses: dawidd6/action-download-artifact@v2
84 with:
85 github_token: ${{secrets.GITHUB_TOKEN}}
86 workflow: build.yml
87 name: libusbmuxd-latest_macOS
88 repo: libimobiledevice/libusbmuxd
89 - name: fetch libimobiledevice-glue
90 uses: dawidd6/action-download-artifact@v2
91 with:
92 github_token: ${{secrets.GITHUB_TOKEN}}
93 workflow: build.yml
94 name: libimobiledevice-glue-latest_macOS
95 repo: libimobiledevice/libimobiledevice-glue
96 - name: install external dependencies
97 run: |
98 mkdir extract
99 for I in *.tar; do
100 tar -C extract -xvf $I
101 done
102 sudo cp -r extract/* /
103 - uses: actions/checkout@v2
104 - name: install additional requirements
105 run: |
106 mkdir -p lib
107 curl -o lib/libcrypto.35.tbd -Ls \
108 https://gist.github.com/nikias/94c99fd145a75a5104415e5117b0cafa/raw/5209dfbff5a871a14272afe4794e76eb4cf6f062/libcrypto.35.tbd
109 curl -o lib/libssl.35.tbd -Ls \
110 https://gist.github.com/nikias/94c99fd145a75a5104415e5117b0cafa/raw/5209dfbff5a871a14272afe4794e76eb4cf6f062/libssl.35.tbd
111 echo "LIBSSL=`pwd`/lib/libssl.35.tbd" >> $GITHUB_ENV
112 echo "LIBCRYPTO=`pwd`/lib/libcrypto.35.tbd" >> $GITHUB_ENV
113 LIBRESSL_VER=2.2.7
114 echo "LIBRESSL_VER=$LIBRESSL_VER" >> $GITHUB_ENV
115 FILENAME="libressl-$LIBRESSL_VER.tar.gz"
116 curl -o $FILENAME -Ls "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/$FILENAME"
117 mkdir -p deps
118 tar -C deps -xzf $FILENAME
119 echo "DEPSDIR=`pwd`/deps" >> $GITHUB_ENV
120 - name: autogen
121 run: |
122 ./autogen.sh PKG_CONFIG_PATH=/usr/local/lib/pkgconfig --enable-debug \
123 openssl_CFLAGS="-I${{ env.DEPSDIR }}/libressl-${{ env.LIBRESSL_VER }}/include" \
124 openssl_LIBS="-Xlinker ${{ env.LIBSSL }} -Xlinker ${{ env.LIBCRYPTO }}"
125 - name: make
126 run: make
127 - name: make install
128 run: sudo make install
129 - name: prepare artifact
130 run: |
131 mkdir -p dest
132 DESTDIR=`pwd`/dest make install
133 tar -C dest -cf libimobiledevice.tar usr
134 - name: publish artifact
135 uses: actions/upload-artifact@v2
136 with:
137 name: libimobiledevice-latest_macOS
138 path: libimobiledevice.tar
139 build-windows:
140 runs-on: windows-latest
141 defaults:
142 run:
143 shell: msys2 {0}
144 strategy:
145 fail-fast: false
146 matrix:
147 include: [
148 { msystem: MINGW64, arch: x86_64 },
149 { msystem: MINGW32, arch: i686 }
150 ]
151 steps:
152 - uses: msys2/setup-msys2@v2
153 with:
154 msystem: ${{ matrix.msystem }}
155 release: false
156 update: false
157 install: >-
158 base-devel
159 git
160 mingw-w64-${{ matrix.arch }}-gcc
161 make
162 libtool
163 autoconf
164 automake-wrapper
165 - name: prepare environment
166 run: |
167 dest=`echo ${{ matrix.msystem }} |tr [:upper:] [:lower:]`
168 echo "dest=$dest" >> $GITHUB_ENV
169 echo "target_triplet=`gcc -dumpmachine`" >> $GITHUB_ENV
170 - name: fetch libplist
171 uses: dawidd6/action-download-artifact@v2
172 with:
173 github_token: ${{secrets.GITHUB_TOKEN}}
174 workflow: build.yml
175 name: libplist-latest_${{ matrix.arch }}-${{ env.dest }}
176 repo: libimobiledevice/libplist
177 - name: fetch libusbmuxd
178 uses: dawidd6/action-download-artifact@v2
179 with:
180 github_token: ${{secrets.GITHUB_TOKEN}}
181 workflow: build.yml
182 name: libusbmuxd-latest_${{ matrix.arch }}-${{ env.dest }}
183 repo: libimobiledevice/libusbmuxd
184 - name: fetch libimobiledevice-glue
185 uses: dawidd6/action-download-artifact@v2
186 with:
187 github_token: ${{secrets.GITHUB_TOKEN}}
188 workflow: build.yml
189 name: libimobiledevice-glue-latest_${{ matrix.arch }}-${{ env.dest }}
190 repo: libimobiledevice/libimobiledevice-glue
191 - name: install external dependencies
192 run: |
193 mkdir extract
194 for I in *.tar; do
195 tar -C extract -xvf $I
196 done
197 cp -r extract/* /
198 - uses: actions/checkout@v2
199 - name: autogen
200 run: ./autogen.sh CC=gcc CXX=g++
201 - name: make
202 run: make
203 - name: make install
204 run: make install
205 - name: prepare artifact
206 run: |
207 mkdir -p dest
208 DESTDIR=`pwd`/dest make install
209 tar -C dest -cf libimobiledevice.tar ${{ env.dest }}
210 - name: publish artifact
211 uses: actions/upload-artifact@v2
212 with:
213 name: libimobiledevice-latest_${{ matrix.arch }}-${{ env.dest }}
214 path: libimobiledevice.tar