diff options
| author | 2021-09-06 03:22:19 +0200 | |
|---|---|---|
| committer | 2021-09-06 03:22:19 +0200 | |
| commit | cddc7683e4ce003eb4ffaead8146f21a5bf4cb81 (patch) | |
| tree | 50aa46b2c1da49b2e021af4669990a8d4c758298 | |
| parent | 32a8ebedc695dfae21497977bf2f77a3d5b50f91 (diff) | |
| download | usbmuxd-cddc7683e4ce003eb4ffaead8146f21a5bf4cb81.tar.gz usbmuxd-cddc7683e4ce003eb4ffaead8146f21a5bf4cb81.tar.bz2 | |
[github-actions] Add build workflow
| -rw-r--r-- | .github/workflows/build.yml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6d7c11c --- /dev/null +++ b/.github/workflows/build.yml | |||
| @@ -0,0 +1,62 @@ | |||
| 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 install libusb-1.0-0-dev | ||
| 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 libimobiledevice | ||
| 23 | uses: dawidd6/action-download-artifact@v2 | ||
| 24 | with: | ||
| 25 | github_token: ${{secrets.GITHUB_TOKEN}} | ||
| 26 | workflow: build.yml | ||
| 27 | name: libimobiledevice-latest_${{env.target_triplet}} | ||
| 28 | repo: libimobiledevice/libimobiledevice | ||
| 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 | ||
| 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 usbmuxd.tar usr lib | ||
| 58 | - name: publish artifact | ||
| 59 | uses: actions/upload-artifact@v2 | ||
| 60 | with: | ||
| 61 | name: usbmuxd-latest_${{env.target_triplet}} | ||
| 62 | path: usbmuxd.tar | ||
