]> sigrok.org Git - sigrok-build.git/commitdiff
build.yml: Try to work around YAML limitation
authorSoeren Apel <redacted>
Sun, 25 Aug 2024 23:43:49 +0000 (01:43 +0200)
committerSoeren Apel <redacted>
Sun, 25 Aug 2024 23:43:49 +0000 (01:43 +0200)
Error was
The workflow is not valid. .github/workflows/build.yml (Line: 129, Col: 13): Unrecognized named-value: 'matrix'.

.github/workflows/build.yml

index f351354daa8643c74bd890772ad2bf4c645d6df4..c06915e9504390bf051a25e061dd634f85bf2a88 100644 (file)
@@ -55,6 +55,7 @@ jobs:
 
     env:
       TARGET: ${{ matrix.target.target }}
+      BUILD_TYPE: ${{ matrix.build_type.name }}
       DEBUG: 0
       # When downloading python from sigrok.org, smth is wrong with the cert
       WGET: "wget -c --quiet --no-check-certificate"
@@ -126,7 +127,7 @@ jobs:
           mv pulseview-*installer.exe pulseview-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-${{ matrix.build_type.name }}-installer.exe
 
       - name: Upload artifact
-        id: upload_pulseview_${{ matrix.target.target }}_${{ matrix.build_type.name }}_mxe_artifact
+        id: upload_pulseview_${{ env.TARGET }}_${{ env.BUILD_TYPE }}_mxe_artifact
         uses: actions/upload-artifact@v4
         with:
           name: artifact-pulseview-${{ matrix.target.target }}-${{ matrix.build_type.name }}-mxe
@@ -138,7 +139,7 @@ jobs:
         uses: actions/github-script@v7
         env:
           PR_NOTES: |
-            pulseview-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-${{ matrix.build_type.name }}-installer.exe created: ${{ env[format('steps.upload_pulseview-{0}_{1}_mxe_artifact.outputs.artifact-url', matrix.target.target, matrix.build_type.name)] }}
+            pulseview-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-${{ matrix.build_type.name }}-installer.exe created: ${{ env[format('steps.upload_pulseview-{0}_{1}_mxe_artifact.outputs.artifact-url', env.TARGET, env.BUILD_TYPE)] }}
         with:
           script: |
             github.rest.issues.createComment({
@@ -235,7 +236,7 @@ jobs:
           mv sigrok-cli-*installer.exe sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug-installer.exe
 
       - name: Upload artifact
-        id: upload_sigrok-cli_${{ matrix.target.target }}_debug_mxe_artifact
+        id: upload_sigrok-cli_${{ env.TARGET }}_debug_mxe_artifact
         uses: actions/upload-artifact@v4
         with:
           name: artifact-sigrok-cli-${{ matrix.target.target }}-mxe
@@ -247,7 +248,7 @@ jobs:
         uses: actions/github-script@v7
         env:
           PR_NOTES: |
-            sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug-installer.exe created: ${{ env[format('steps.upload_sigrok-cli_{0}_debug_mxe_artifact.outputs.artifact-url', matrix.target.target)] }}
+            sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug-installer.exe created: ${{ env[format('steps.upload_sigrok-cli_{0}_debug_mxe_artifact.outputs.artifact-url', env.TARGET)] }}
         with:
           script: |
             github.rest.issues.createComment({
@@ -291,6 +292,7 @@ jobs:
 
     env:
       TARGET: ${{ matrix.target.target }}
+      BUILD_TYPE: ${{ matrix.build_type.name }}
       CC: ${{ matrix.target.cc }}
       CXX: ${{ matrix.target.cxx }}
       LD: ${{ matrix.target.ld }}
@@ -370,7 +372,7 @@ jobs:
           mv PulseView-*.AppImage pulseview-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-${{ matrix.build_type.name }}.appimage
 
       - name: Upload artifact
-        id: upload_pulseview_${{ matrix.target.target }}_${{ matrix.build_type.name }}_appimage_artifact
+        id: upload_pulseview_${{ env.TARGET }}_${{ env.BUILD_TYPE }}_appimage_artifact
         uses: actions/upload-artifact@v4
         with:
           name: artifact-pulseview-${{ matrix.target.target }}-${{ matrix.build_type.name }}-appimage
@@ -382,7 +384,7 @@ jobs:
         uses: actions/github-script@v7
         env:
           PR_NOTES: |
-            pulseview-${{ matrix.target.target }}-${{ matrix.build_type.name }}-appimage created: ${{ env[format('steps.upload_pulseview-{0}_{1}_appimage_artifact.outputs.artifact-url', matrix.target.target, matrix.build_type.name)] }}
+            pulseview-${{ matrix.target.target }}-${{ matrix.build_type.name }}-appimage created: ${{ env[format('steps.upload_pulseview-{0}_{1}_appimage_artifact.outputs.artifact-url', env.TARGET, env.BUILD_TYPE)] }}
         with:
           script: |
             github.rest.issues.createComment({
@@ -499,7 +501,7 @@ jobs:
           mv sigrok-cli-*.AppImage sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug.appimage
 
       - name: Upload artifact
-        id: upload_sigrok-cli_${{ matrix.target.target }}_appimage_artifact
+        id: upload_sigrok-cli_${{ env.TARGET }}_appimage_artifact
         uses: actions/upload-artifact@v4
         with:
           name: artifact-sigrok-cli-${{ matrix.target.target }}-appimage
@@ -517,7 +519,7 @@ jobs:
         uses: actions/github-script@v7
         env:
           PR_NOTES: |
-            sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug.appimage created: ${{ env[format('steps.upload_sigrok-cli_{0}_appimage_artifact.outputs.artifact-url', matrix.target.target)] }}
+            sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug.appimage created: ${{ env[format('steps.upload_sigrok-cli_{0}_appimage_artifact.outputs.artifact-url', env.TARGET)] }}
         with:
           script: |
             github.rest.issues.createComment({