]> sigrok.org Git - sigrok-build.git/commitdiff
Rename workflow file and add sigrok-cli build
authorFrank Stettner <redacted>
Mon, 27 Mar 2023 16:41:34 +0000 (18:41 +0200)
committerFrank Stettner <redacted>
Mon, 27 Mar 2023 16:41:34 +0000 (18:41 +0200)
.github/workflows/build.yml [new file with mode: 0644]
.github/workflows/pulseview_mxe.yml [deleted file]

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644 (file)
index 0000000..f0996aa
--- /dev/null
@@ -0,0 +1,200 @@
+name: sigrok Artifacts Build
+
+on:
+  push:
+  workflow_dispatch:
+
+defaults:
+  run:
+    shell: bash
+
+env:
+  # The path where the compiled packages will be installed.
+  INSTALL_DIR: "${{ github.workspace }}/sr"
+  # Git URL for the libserialport dependency
+  LIBSERIALPORT_REPO: "git://sigrok.org/libserialport"
+  # Git URL for the libsigrok dependency
+  LIBSIGROK_REPO: "git://sigrok.org/libsigrok"
+  # Git branch for the libsigrok dependency
+  LIBSIGROK_BRANCH: "master"
+  # Git URL for the libsigrokdecode dependency
+  LIBSIGROKDECODE_REPO: "git://sigrok.org/libsigrokdecode"
+  # Git URL for the sigrok-firmware dependency
+  SIGROK_FIRMWARE_REPO: "git://sigrok.org/sigrok-firmware"
+  # Git URL for the sigrok-firmware-fx2lafw dependency
+  SIGROK_FIRMWARE_FX2LAFW_REPO: "git://sigrok.org/sigrok-firmware-fx2lafw"
+  # Git URL for the sigrok-dumps dependency
+  SIGROK_DUMPS_REPO: "git://sigrok.org/sigrok-dumps"
+  # Build type for PulseView (Debug, Release, RelWithDebInfo, MinSizeRel)
+  BUILD_TYPE: "Release"
+  # Misc commands
+  WGET: "wget -c --quiet"
+  GIT_CLONE: "git clone --depth=1"
+
+jobs:
+
+  build_pulseview_mxe:
+    name: PulseView MXE build (${{ matrix.target.target }})
+
+    runs-on: ubuntu-latest
+    container:
+      image: ghcr.io/knarfs/sigrok-mxe:latest
+
+    strategy:
+      matrix:
+        target:
+          - { target: "i686", nsis_param: "" }
+          - { target: "x86_64", nsis_param: "-DPE64=1" }
+
+    env:
+      TARGET: ${{ matrix.target.target }}
+      DEBUG: 0
+      # When downloading python from sigrok.org, smth is wrong with the cert
+      WGET: "wget -c --quiet --no-check-certificate"
+
+    steps:
+      - name: Checkout sigrok-build
+        uses: actions/checkout@v3
+        with:
+          path: sigrok-build
+
+      - name: Build dependencies
+        run: |
+          cd sigrok-build/ci
+          source sigrok-mxe-init-toolchain.sh
+          ./sigrok-mxe-build-dependencies.sh
+
+      - name: Checkout PulseView
+        uses: actions/checkout@v3
+        with:
+          # TODO: Clone from sigrok.org
+          repository: knarfS/pulseview
+          path: pulseview
+          ref: github-ci
+
+      - name: Build PulseView
+        run: |
+          source sigrok-build/ci/sigrok-mxe-init-toolchain.sh
+          mkdir -p pulseview/build
+          cd pulseview/build
+          $CMAKE \
+            -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \
+            -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
+            -DDISABLE_WERROR=FALSE \
+            -DENABLE_TESTS=FALSE \
+            ..
+          make $PARALLEL $V
+          make install/strip $V
+
+      - name: Build NSIS installer
+        run: |
+          source sigrok-build/ci/sigrok-mxe-init-toolchain.sh
+
+          # Zadig (we ship this with frontends for easy driver switching).
+          $WGET https://github.com/pbatard/libwdi/releases/download/b721/zadig-2.4.exe -O $INSTALL_DIR/zadig.exe
+          $WGET https://github.com/pbatard/libwdi/releases/download/v1.2.5/zadig_xp-2.2.exe -O $INSTALL_DIR/zadig_xp.exe
+
+          cp sigrok-build/ci/contrib-mxe/FileAssociation.nsh pulseview/build/contrib
+          makensis ${{ matrix.target.nsis_param }} pulseview/build/contrib/pulseview_cross.nsi
+
+      - name: Upload artifact
+        uses: actions/upload-artifact@v3
+        with:
+          name: PulseView NSIS ${{ matrix.target.target }} installer
+          path: pulseview/build/contrib/pulseview*installer.exe
+
+
+  build_sigrok-cli_mxe:
+    name: sigrok-cli MXE build (${{ matrix.target.target }})
+
+    runs-on: ubuntu-latest
+    container:
+      image: ghcr.io/knarfs/sigrok-mxe:latest
+
+    strategy:
+      matrix:
+        target:
+          - { target: "i686", nsis_param: "" }
+          - { target: "x86_64", nsis_param: "-DPE64=1" }
+
+    env:
+      TARGET: ${{ matrix.target.target }}
+      DEBUG: 0
+      # When downloading python from sigrok.org, smth is wrong with the cert
+      WGET: "wget -c --quiet --no-check-certificate"
+
+    steps:
+      - name: Checkout sigrok-build
+        uses: actions/checkout@v3
+        with:
+          path: sigrok-build
+
+      - name: Build dependencies
+        run: |
+          cd sigrok-build/ci
+          source sigrok-mxe-init-toolchain.sh
+          ./sigrok-mxe-build-dependencies.sh
+
+      - name: Checkout sigrok-cli
+        uses: actions/checkout@v3
+        with:
+          repository: sigrokproject/sigrok-cli
+          path: sigrok-cli
+
+      - name: Build sigrok-cli
+        run: |
+          source sigrok-build/ci/sigrok-mxe-init-toolchain.sh
+          cd sigrok-cli
+          ./autogen.sh
+          ./configure $C
+          make $PARALLEL $V
+          make install/strip $V
+
+      - name: Build NSIS installer
+        run: |
+          source sigrok-build/ci/sigrok-mxe-init-toolchain.sh
+
+          # Zadig (we ship this with frontends for easy driver switching).
+          $WGET https://github.com/pbatard/libwdi/releases/download/b721/zadig-2.4.exe -O $INSTALL_DIR/zadig.exe
+          $WGET https://github.com/pbatard/libwdi/releases/download/v1.2.5/zadig_xp-2.2.exe -O $INSTALL_DIR/zadig_xp.exe
+
+          cp sigrok-build/ci/contrib-mxe/FileAssociation.nsh pulseview/build/contrib
+          makensis ${{ matrix.target.nsis_param }} contrib/sigrok-cli_cross.nsi
+
+      - name: Upload artifact
+        uses: actions/upload-artifact@v3
+        with:
+          name: PulseView NSIS ${{ matrix.target.target }} installer
+          path: pulseview/build/contrib/sigrok-cli*installer.exe
+
+
+  publish:
+    name: sigrok artifacts publish
+
+    runs-on: ubuntu-latest
+
+    if: |
+      (github.event_name == 'push' && github.ref == 'refs/heads/master') ||
+      (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master')
+    needs:
+      - build_pulseview_mxe
+      - build_sigrok-cli_mxe
+
+    steps:
+      - name: Install dependencies
+        run: |
+          # AppImage needs libfuse2 to start
+          sudo apt-get update
+          sudo apt-get install -y libfuse2
+      - name: Download artifacts
+        uses: actions/download-artifact@v3
+      - name: Inspect directory after downloading artifacts
+        run: ls -alFR
+      - name: Upload artifacts and create (continuous) release
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+            wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
+            chmod +x pyuploadtool-x86_64.AppImage
+            ./pyuploadtool-x86_64.AppImage **/pulseview-*.*
+
diff --git a/.github/workflows/pulseview_mxe.yml b/.github/workflows/pulseview_mxe.yml
deleted file mode 100644 (file)
index 2ed3cc0..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-name: PulseView Build
-
-on:
-  push:
-  workflow_dispatch:
-
-defaults:
-  run:
-    shell: bash
-
-env:
-  # The path where the compiled packages will be installed.
-  INSTALL_DIR: "${{ github.workspace }}/sr"
-  # Git URL for the libserialport dependency
-  LIBSERIALPORT_REPO: "git://sigrok.org/libserialport"
-  # Git URL for the libsigrok dependency
-  LIBSIGROK_REPO: "git://sigrok.org/libsigrok"
-  # Git branch for the libsigrok dependency
-  LIBSIGROK_BRANCH: "master"
-  # Git URL for the libsigrokdecode dependency
-  LIBSIGROKDECODE_REPO: "git://sigrok.org/libsigrokdecode"
-  # Git URL for the sigrok-firmware dependency
-  SIGROK_FIRMWARE_REPO: "git://sigrok.org/sigrok-firmware"
-  # Git URL for the sigrok-dumps dependency
-  SIGROK_DUMPS_REPO: "git://sigrok.org/sigrok-dumps"
-  # Build type for PulseView (Debug, Release, RelWithDebInfo, MinSizeRel)
-  BUILD_TYPE: "Release"
-  # Misc commands
-  WGET: "wget -c --quiet"
-  GIT_CLONE: "git clone --depth=1"
-
-jobs:
-
-  build_mxe:
-    name: PulseView MXE build (${{ matrix.target.target }})
-
-    runs-on: ubuntu-latest
-    container:
-      image: ghcr.io/knarfs/sigrok-mxe:latest
-
-    strategy:
-      matrix:
-        target:
-          - { target: "i686", nsis_param: "" }
-          - { target: "x86_64", nsis_param: "-DPE64=1" }
-
-    env:
-      TARGET: ${{ matrix.target.target }}
-      DEBUG: 0
-      # When downloading python from sigrok.org, smth is wrong with the cert
-      WGET: "wget -c --quiet --no-check-certificate"
-
-    steps:
-      - name: Checkout sigrok-build
-        uses: actions/checkout@v3
-        with:
-          path: sigrok-build
-
-      - name: Build dependencies
-        run: |
-          cd sigrok-build/ci
-          source sigrok-mxe-init-toolchain.sh
-          ./sigrok-mxe-build-dependencies.sh
-
-      - name: Checkout PulseView
-        uses: actions/checkout@v3
-        with:
-          # TODO: Clone from sigrok.org
-          repository: knarfS/pulseview
-          path: pulseview
-          ref: github-ci
-
-      - name: Build PulseView
-        run: |
-          source sigrok-build/ci/sigrok-mxe-init-toolchain.sh
-          mkdir -p pulseview/build
-          cd pulseview/build
-          $CMAKE \
-            -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \
-            -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-            -DDISABLE_WERROR=FALSE \
-            -DENABLE_TESTS=FALSE \
-            ..
-          make $PARALLEL $V
-          make install/strip $V
-
-      - name: Build NSIS installer
-        run: |
-          source sigrok-build/ci/sigrok-mxe-init-toolchain.sh
-
-          # Zadig (we ship this with frontends for easy driver switching).
-          $WGET https://github.com/pbatard/libwdi/releases/download/b721/zadig-2.4.exe -O $INSTALL_DIR/zadig.exe
-          $WGET https://github.com/pbatard/libwdi/releases/download/v1.2.5/zadig_xp-2.2.exe -O $INSTALL_DIR/zadig_xp.exe
-
-          cp sigrok-build/ci/contrib-mxe/FileAssociation.nsh pulseview/build/contrib
-          makensis ${{ matrix.target.nsis_param }} pulseview/build/contrib/pulseview_cross.nsi
-
-      - name: Upload artifact
-        uses: actions/upload-artifact@v3
-        with:
-          name: PulseView NSIS ${{ matrix.target.target }} installer
-          path: pulseview/build/contrib/pulseview*installer.exe
-
-
-  publish:
-    name: PulseView publish
-
-    runs-on: ubuntu-latest
-
-    if: |
-      (github.event_name == 'push' && github.ref == 'refs/heads/master') ||
-      (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master')
-    needs:
-      - build_mxe
-
-    steps:
-      - name: Install dependencies
-        run: |
-          # AppImage needs libfuse2 to start
-          sudo apt-get update
-          sudo apt-get install -y libfuse2
-      - name: Download artifacts
-        uses: actions/download-artifact@v3
-      - name: Inspect directory after downloading artifacts
-        run: ls -alFR
-      - name: Upload artifacts and create (continuous) release
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        run: |
-            wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
-            chmod +x pyuploadtool-x86_64.AppImage
-            ./pyuploadtool-x86_64.AppImage **/pulseview-*.*
-