]> git.bitcoin.ninja Git - ldk-java/commitdiff
Automatically run diffoscope on changed compressed files in CI
authorMatt Corallo <git@bluematt.me>
Sun, 8 Aug 2021 23:24:48 +0000 (23:24 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 9 Aug 2021 05:53:31 +0000 (05:53 +0000)
.github/workflows/build.yml

index 708f570e4d8faf247f5416fe6fdbab19e21ac897..eb394b083c23978ecf7cee9aa7bc44080fab7136 100644 (file)
@@ -102,7 +102,15 @@ jobs:
           cp ldk-java.jar "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"
           cp ldk-java-classes.jar "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"
           cd ldk-java-bins
-          git diff --exit-code
+          if ! git diff --exit-code; then
+            mv "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"* ./
+            git checkout "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"
+            apt-get -y install diffoscope
+            diffoscope ldk-java-sources.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-sources.jar"
+            diffoscope ldk-java-classes.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java-classes.jar"
+            diffoscope ldk-java.jar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/ldk-java.jar"
+            exit 1
+          fi
 
   android:
     runs-on: ubuntu-latest
@@ -183,7 +191,13 @@ jobs:
           rm "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/LDK-release.aar"
           cp LDK-release.aar "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"
           cd ldk-java-bins
-          git diff --exit-code
+          if ! git diff --exit-code; then
+            mv "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/LDK-release.aar" ./
+            git checkout "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/LDK-release.aar"
+            apt-get -y install diffoscope
+            diffoscope LDK-release.aar "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/LDK-release.aar"
+            exit 1
+          fi
 
   osx:
     strategy: