summaryrefslogtreecommitdiffstats
path: root/.github/workflows/build.yml
blob: 5628879677c02f67a8a584d295906690fa83ac57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: build

on: [push]

jobs:
  build-linux-ubuntu:
    runs-on: ubuntu-latest
    steps:
    - name: install dependencies
      run: |
          sudo apt-get update
          sudo apt-get install libusb-1.0-0-dev
    - name: prepare environment
      run: |
          echo "target_triplet=`gcc -dumpmachine`" >> $GITHUB_ENV
    - name: fetch libplist
      uses: dawidd6/action-download-artifact@v2
      with:
        github_token: ${{secrets.GITHUB_TOKEN}}
        workflow: build.yml
        name: libplist-latest_${{env.target_triplet}}
        repo: libimobiledevice/libplist
    - name: fetch libusbmuxd
      uses: dawidd6/action-download-artifact@v2
      with:
        github_token: ${{secrets.GITHUB_TOKEN}}
        workflow: build.yml
        name: libusbmuxd-latest_${{env.target_triplet}}
        repo: libimobiledevice/libusbmuxd
    - name: fetch libimobiledevice-glue
      uses: dawidd6/action-download-artifact@v2
      with:
        github_token: ${{secrets.GITHUB_TOKEN}}
        workflow: build.yml
        name: libimobiledevice-glue-latest_${{env.target_triplet}}
        repo: libimobiledevice/libimobiledevice-glue
    - name: fetch libimobiledevice
      uses: dawidd6/action-download-artifact@v2
      with:
        github_token: ${{secrets.GITHUB_TOKEN}}
        workflow: build.yml
        name: libimobiledevice-latest_${{env.target_triplet}}
        repo: libimobiledevice/libimobiledevice
    - name: install external dependencies
      run: |
          mkdir extract
          for I in *.tar; do
            tar -C extract -xvf $I
          done
          sudo cp -r extract/* /
          sudo ldconfig
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: autogen
      run: ./autogen.sh PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    - name: print config.log
      if: ${{ failure() }}
      run: cat config.log
    - name: make
      run: make
    - name: make install
      run: sudo make install
    - name: prepare artifact
      run: |
          mkdir -p dest
          DESTDIR=`pwd`/dest make install
          tar -C dest -cf usbmuxd.tar usr lib
    - name: publish artifact
      uses: actions/upload-artifact@v2
      with:
        name: usbmuxd-latest_${{env.target_triplet}}
        path: usbmuxd.tar