]> sigrok.org Git - sigrok-build.git/commitdiff
build.yml: Try out caching for MacOS build
authorSoeren Apel <redacted>
Wed, 6 Mar 2024 22:02:47 +0000 (23:02 +0100)
committerSoeren Apel <redacted>
Wed, 6 Mar 2024 22:17:30 +0000 (23:17 +0100)
.github/workflows/build.yml

index 7836976417caa69312f2cd6b89e77a7e7ddab9ce..972d6baec56cf4be18433ff557bc05caf5ec1c27 100644 (file)
@@ -393,15 +393,70 @@ jobs:
       ARTIFACT_VERSION: "NIGHTLY"
 
     steps:
-      - name: Abort run as OSX build is cancelled on github currently
-        run: |
-          exit 1
+      # ------------------------------------------
+      - name: Check for dependency cache (1)
+        uses: actions/cache/restore@v3
+        id: cache-1
+        with:
+          path: $(brew --prefix)
+          key: homebrew-packages-1
 
-      - name: Install dependencies
-        run: |
-          brew install autoconf automake autoconf-archive pkg-config sdcc \
-            libtool libzip libusb libftdi hidapi nettle check doxygen swig \
-            glib glibmm@2.66 cmake boost "$BREW_PYTHON_VERSION" "$BREW_QT_VERSION"
+      - name: Install dependencies (1)
+        if: steps.cache-1.outputs.cache-hit != 'true'
+        run: brew install autoconf automake autoconf-archive pkg-config sdcc
+
+      - name: Cache Homebrew Packages
+        if: steps.cache-1.outputs.cache-hit != 'true'
+        uses: actions/cache/save@v3
+        with:
+          path: $(brew --prefix)
+          key: homebrew-packages-1
+
+      # ------------------------------------------
+      - name: Check for dependency cache (2)
+        uses: actions/cache/restore@v3
+        id: cache-2
+        with:
+          path: $(brew --prefix)
+          key: homebrew-packages-2
+
+      - name: Install dependencies (2)
+        if: steps.cache-2.outputs.cache-hit != 'true'
+        run: brew install libtool libzip libusb libftdi hidapi nettle check doxygen swig
+
+      - name: Cache Homebrew Packages
+        if: steps.cache-2.outputs.cache-hit != 'true'
+        uses: actions/cache/save@v3
+        with:
+          path: $(brew --prefix)
+          key: homebrew-packages-2
+
+      # ------------------------------------------
+      - name: Check for dependency cache (3)
+        uses: actions/cache/restore@v3
+        id: cache-3
+        with:
+          path: $(brew --prefix)
+          key: homebrew-packages-3
+
+      - name: Install dependencies (3)
+        if: steps.cache-3.outputs.cache-hit != 'true'
+        run: brew install glib glibmm@2.66 cmake boost $BREW_PYTHON_VERSION
+
+      - name: Cache Homebrew Packages
+        if: steps.cache-3.outputs.cache-hit != 'true'
+        uses: actions/cache/save@v3
+        with:
+          path: $(brew --prefix)
+          key: homebrew-packages-3
+
+
+      # qt5 dependencies, taken from https://github.com/Homebrew/homebrew-core/blob/5aaa8a4d48eb29ebadf716834355312f41154162/Formula/q/qt@5.rb
+      - name: Install dependencies (4)
+        run: brew bison flex krb5 libxslt sqlite freetype jpeg-turbo libpng pcre2 webp
+
+      - name: Install dependencies (5)
+        run: brew install  "$BREW_QT_VERSION"
 
       - name: Checkout sigrok-build
         uses: actions/checkout@v4