Skip to content

Commit

Permalink
provide option to skip initializing and add general build flags to su…
Browse files Browse the repository at this point in the history
…b-module build
  • Loading branch information
hellkite500 authored and madMatchstick committed Mar 20, 2024
1 parent f91e2ea commit 027b7cd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/actions/ngen-submod-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ inputs:
mod-dir:
required: true
description: 'Path to the submodule with CMakeLists.txt to build'
initialize:
description: 'Initialize the ngen submodule, default'
required: false
default: 'true'
cmake-flags:
desciption: 'Options to pass to the cmake build configuration, e.g. -D<var> defines'
required: false
default: ''
outputs:
build-dir:
description: "Directory build was performed in"
Expand All @@ -26,6 +34,7 @@ runs:
steps:
#This may be redundant
- name: Init Submodules
if: ${{ inputs.initialize == 'true' }} #not true is false, don't init
run: git submodule update --init --recursive -- ${{ inputs.mod-dir }}
shell: bash

Expand All @@ -39,7 +48,7 @@ runs:
- name: Cmake Initialization
id: cmake_init
run: |
cmake -B ${{ inputs.mod-dir}}/${{ inputs.build-dir }} -S ${{ inputs.mod-dir }}
cmake -B ${{ inputs.mod-dir}}/${{ inputs.build-dir }} -S ${{ inputs.mod-dir }} ${{ inputs.cmake-flags }}
echo "build-dir=$(echo ${{ inputs.mod-dir}}/${{ inputs.build-dir }})" >> $GITHUB_OUTPUT
shell: bash

Expand Down

0 comments on commit 027b7cd

Please sign in to comment.