diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yml | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f8c3f94 --- /dev/null +++ b/.github/workflows/build.yml | |||
@@ -0,0 +1,73 @@ | |||
1 | name: build | ||
2 | |||
3 | on: [push] | ||
4 | |||
5 | jobs: | ||
6 | build-linux-ubuntu: | ||
7 | runs-on: ubuntu-latest | ||
8 | steps: | ||
9 | - name: install dependencies | ||
10 | run: | | ||
11 | sudo apt-get update | ||
12 | sudo apt-get install libusb-1.0-0-dev | ||
13 | - name: prepare environment | ||
14 | run: | | ||
15 | echo "target_triplet=`gcc -dumpmachine`" >> $GITHUB_ENV | ||
16 | - name: fetch libplist | ||
17 | uses: dawidd6/action-download-artifact@v2 | ||
18 | with: | ||
19 | github_token: ${{secrets.GITHUB_TOKEN}} | ||
20 | workflow: build.yml | ||
21 | name: libplist-latest_${{env.target_triplet}} | ||
22 | repo: libimobiledevice/libplist | ||
23 | - name: fetch libusbmuxd | ||
24 | uses: dawidd6/action-download-artifact@v2 | ||
25 | with: | ||
26 | github_token: ${{secrets.GITHUB_TOKEN}} | ||
27 | workflow: build.yml | ||
28 | name: libusbmuxd-latest_${{env.target_triplet}} | ||
29 | repo: libimobiledevice/libusbmuxd | ||
30 | - name: fetch libimobiledevice-glue | ||
31 | uses: dawidd6/action-download-artifact@v2 | ||
32 | with: | ||
33 | github_token: ${{secrets.GITHUB_TOKEN}} | ||
34 | workflow: build.yml | ||
35 | name: libimobiledevice-glue-latest_${{env.target_triplet}} | ||
36 | repo: libimobiledevice/libimobiledevice-glue | ||
37 | - name: fetch libimobiledevice | ||
38 | uses: dawidd6/action-download-artifact@v2 | ||
39 | with: | ||
40 | github_token: ${{secrets.GITHUB_TOKEN}} | ||
41 | workflow: build.yml | ||
42 | name: libimobiledevice-latest_${{env.target_triplet}} | ||
43 | repo: libimobiledevice/libimobiledevice | ||
44 | - name: install external dependencies | ||
45 | run: | | ||
46 | mkdir extract | ||
47 | for I in *.tar; do | ||
48 | tar -C extract -xvf $I | ||
49 | done | ||
50 | sudo cp -r extract/* / | ||
51 | sudo ldconfig | ||
52 | - uses: actions/checkout@v3 | ||
53 | with: | ||
54 | fetch-depth: 0 | ||
55 | - name: autogen | ||
56 | run: ./autogen.sh PKG_CONFIG_PATH=/usr/local/lib/pkgconfig | ||
57 | - name: print config.log | ||
58 | if: ${{ failure() }} | ||
59 | run: cat config.log | ||
60 | - name: make | ||
61 | run: make | ||
62 | - name: make install | ||
63 | run: sudo make install | ||
64 | - name: prepare artifact | ||
65 | run: | | ||
66 | mkdir -p dest | ||
67 | DESTDIR=`pwd`/dest make install | ||
68 | tar -C dest -cf usbmuxd.tar usr lib | ||
69 | - name: publish artifact | ||
70 | uses: actions/upload-artifact@v3 | ||
71 | with: | ||
72 | name: usbmuxd-latest_${{env.target_triplet}} | ||
73 | path: usbmuxd.tar | ||