Skip to content

Commit 055d7b6

Browse files
committed
GitHub Actions: upload Gradle reports if tests fail, fix tests on Linux
1 parent 73b31d7 commit 055d7b6

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,25 @@ jobs:
1616
uses: actions/setup-java@v1
1717
with:
1818
java-version: '16'
19+
- name: Install Linux dependencies
20+
run: brew install libimobiledevice libirecovery && P=/home/linuxbrew/.linuxbrew/lib; sudo ln -s $P/libimobiledevice-1.0.so $P/libirecovery-1.0.so $P/libplist-2.0.so /usr/lib/
21+
if: runner.os == 'Linux'
1922
- name: Gradle build
2023
uses: eskatos/gradle-command-action@v1
2124
with:
2225
arguments: build --no-daemon
23-
wrapper-cache-enabled: true
26+
distributions-cache-enabled: true
2427
dependencies-cache-enabled: true
2528
- uses: actions/upload-artifact@v2
2629
with:
2730
name: ${{ runner.os }}
2831
path: build/distributions/*
32+
- name: Upload reports on failure
33+
if: ${{ failure() }}
34+
uses: actions/upload-artifact@v2
35+
with:
36+
name: failure-${{ runner.os }}
37+
path: build/reports/
2938
release:
3039
name: Create pubilc releases
3140
runs-on: ubuntu-latest
@@ -35,7 +44,7 @@ jobs:
3544
- name: Get artifacts
3645
uses: actions/download-artifact@v2
3746
- name: Get version from commit
38-
run: echo "VERSION=$(echo ${{ github.event.commits[0].message }} | awk '{print $2}')" >> $GITHUB_ENV
47+
run: echo "VERSION=$(echo ${{ github.event.commits[0].message }} | awk '{print $2}')" >> $GITHUB_ENV
3948
- name: Release public builds
4049
uses: "marvinpinto/action-automatic-releases@latest"
4150
with:

src/main/java/airsquared/blobsaver/app/natives/Libplist.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ public class Libplist {
5454
public static native void toXml(Pointer plist, PointerByReference plist_xml, PointerByReference length);
5555

5656
static {
57-
NativeUtils.register(Libplist.class, "plist");
57+
try {
58+
NativeUtils.register(Libplist.class, "plist");
59+
} catch (UnsatisfiedLinkError e) {
60+
try {
61+
NativeUtils.register(Libplist.class, "plist-2.0");
62+
} catch (UnsatisfiedLinkError e2) {
63+
e.addSuppressed(e2);
64+
throw e;
65+
}
66+
}
5867
}
5968
}

0 commit comments

Comments
 (0)