]> granicus.if.org Git - libmatroska/commitdiff
CI: use an extended map for the Static/Dynamic matrix option
authorSteve Lhomme <slhomme@matroska.org>
Sun, 16 Oct 2022 12:19:24 +0000 (14:19 +0200)
committerSteve Lhomme <robux4@ycbcr.xyz>
Sat, 22 Oct 2022 12:25:53 +0000 (14:25 +0200)
.github/workflows/windows.yaml

index 29b29ed22b2736e7f23393aec61ebb9b0c4d4f9c..a254f89dbcec3580a51d6f7169ad56010956b26e 100644 (file)
@@ -13,7 +13,10 @@ jobs:
       fail-fast: false\r
       matrix:\r
         config: [Debug, Release]\r
-        shared: [Dynamic, Static]\r
+        shared: [\r
+          { "name": "Dynamic", "option": "ON"},\r
+          { "name": "Static",  "option": "OFF"}\r
+        ]\r
     steps:\r
       - uses: lukka/get-cmake@latest\r
 \r
@@ -27,12 +30,8 @@ jobs:
           path: libebml\r
           # minimum version we support ref: 'release-1.4.3'\r
 \r
-      - name: Configure static libebml\r
-        if: ${{ matrix.shared == 'Static' }}\r
-        run: cmake -S libebml -B libebml/_build -DBUILD_SHARED_LIBS=OFF\r
-      - name: Configure dynamic libebml\r
-        if: ${{ matrix.shared == 'Dynamic' }}\r
-        run: cmake -S libebml -B libebml/_build -DBUILD_SHARED_LIBS=ON\r
+      - name: Configure ${{ matrix.shared.name }} libebml\r
+        run: cmake -S libebml -B libebml/_build -DBUILD_SHARED_LIBS=${{ matrix.shared.option }}\r
 \r
       - name: Build libebml\r
         run: cmake --build libebml/_build --config ${{ matrix.config }} --parallel\r
@@ -40,12 +39,8 @@ jobs:
       - name: Install libebml\r
         run: cmake --install libebml/_build --config ${{ matrix.config }} --prefix ${GITHUB_WORKSPACE}/_built\r
 \r
-      - name: Configure static library\r
-        if: ${{ matrix.shared == 'Static' }}\r
-        run: cmake -S . -B _build -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML" -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=OFF\r
-      - name: Configure dynamic library\r
-        if: ${{ matrix.shared == 'Dynamic' }}\r
-        run: cmake -S . -B _build -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML" -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON\r
+      - name: Configure ${{ matrix.shared.name }} library\r
+        run: cmake -S . -B _build -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML" -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=${{ matrix.shared.option }}\r
 \r
       - name: Build\r
         run: cmake --build _build --config ${{ matrix.config }} --parallel\r