Skip to content

Commit

Permalink
Add build_tests option to action
Browse files Browse the repository at this point in the history
  • Loading branch information
victor1234 committed Jan 19, 2025
1 parent f3bb619 commit fa855ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/actions/build-package/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: "build-package"
description: "Install package and build example"
inputs:
install:
default: "true"
description: "Install the package after build"
build_type:
description: "Type of build (e.g., cmake or conan)"
required: true
build_tests:
default: "false"
install:
default: "true"
description: "Install the package after build"
runs:
using: "composite"
steps:
Expand All @@ -25,7 +27,13 @@ runs:
echo "PRESET=conan-default" >> $GITHUB_ENV
fi
- name: Cmake configuration
- name: Cmake configuration without tests
if: ${{inputs.build_tests == "false"}}
shell: bash
run: cmake --preset $PRESET

- name: Cmake configuration with tests
if: ${{inputs.build_tests == "true"}}
shell: bash
run: cmake --preset $PRESET

Expand All @@ -42,6 +50,7 @@ runs:
if: ${{inputs.install == 'true' }}
run: sudo cmake --install build/Release
shell: bash

# - name: Build example
# if: ${{inputs.install == 'true' }}
# shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jobs:
fetch-depth: 0

- uses: ./.github/actions/build-package
with:
build_tests: true

- name: Generate license
run: echo '${{secrets.LICENSE_KEY}}' > lic.key
Expand Down

0 comments on commit fa855ef

Please sign in to comment.