Browse Source

Enable cmake workflow to build a specified target (#1533)

* Update action.yml

* Update build_and_test_provisioned.yml
AlexSm 1 year ago
parent
commit
161d4a47bf

+ 4 - 1
.github/actions/build/action.yml

@@ -11,6 +11,9 @@ inputs:
     required: false
     default: ""
     description: "extra compile flags will be added to the end of C_FLAGS and CXX_FLAGS"
+  ninja_target:
+    required: false
+    type: string
 
 runs:
   using: "composite"
@@ -59,7 +62,7 @@ runs:
       export CCACHE_SLOPPINESS=locale
       export CCACHE_MAXSIZE=50G
       cd ../build
-      ninja
+      ninja ${{ inputs.ninja_target }}
       ccache -s
       df -h
   - name: report Build failed

+ 7 - 0
.github/workflows/build_and_test_provisioned.yml

@@ -27,6 +27,9 @@ on:
       checkout_ref:
         required: false
         type: string
+      ninja_target:
+        required: false
+        type: string
   workflow_dispatch:
     inputs:
       runner_label:
@@ -53,6 +56,9 @@ on:
       checkout_ref:
         required: false
         type: string
+      ninja_target:
+        required: false
+        type: string
 
 jobs:
   main:
@@ -70,6 +76,7 @@ jobs:
         sanitizer: ${{ inputs.sanitizer }}
         ccache_remote_path: ${{ vars.REMOTE_CACHE_URL && format('http://{0}{1}', secrets.REMOTE_CACHE_AUTH, vars.REMOTE_CACHE_URL) || ''}}
         extra_compile_flags: ${{ inputs.extra_compile_flags }}
+        ninja_target: ${{ inputs.ninja_target }}
     - name: Run tests
       uses: ./.github/actions/test
       with: