-
Notifications
You must be signed in to change notification settings - Fork 2
<TBBAS-2554> Add reusable CI workflows for SimpleDeviceModule #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alexadereyko
wants to merge
7
commits into
jira/TBBAS-2523_simple_device_module_ci
Choose a base branch
from
jira/TBBAS-2554_add_example_module_ci_framework
base: jira/TBBAS-2523_simple_device_module_ci
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d16f8ed
<TBBAS-2554> Create reusable workflow and composite action for module…
alexadereyko f6a1f7e
<TBBAS-2554> Replace openDAQ/actions/framewaork-download-artefact wit…
alexadereyko c467872
Replace framework-download-release with robinraju/release-downloader@v1
alexadereyko 30be552
Replace framework-install action with install-framework and remove do…
alexadereyko 7fd1c52
Remove commented code
alexadereyko 8124f76
Remove PAT token
alexadereyko ee68e9c
Add 32-bits Windows support
alexadereyko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Build and test simple device module | ||
| description: Configure, build and test simple device module with CMake | ||
|
|
||
| inputs: | ||
| enable-32bit: | ||
| description: 'Enable 32-bit build for Windows' | ||
| required: false | ||
| default: 'false' | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Set CMake generator and architecture | ||
| id: cmake-config | ||
| shell: bash | ||
| run: | | ||
| if [[ "${{ runner.os }}" == "Windows" ]]; then | ||
| echo "cmake-generator=-G \"Visual Studio 17 2022\"" >> $GITHUB_OUTPUT | ||
| if [[ "${{ inputs.enable-32bit }}" == "true" ]]; then | ||
| echo "cmake-arch=-A Win32" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "cmake-arch=" >> $GITHUB_OUTPUT | ||
| fi | ||
| else | ||
| echo "cmake-generator=-G Ninja" >> $GITHUB_OUTPUT | ||
| echo "cmake-arch=" >> $GITHUB_OUTPUT | ||
| fi | ||
| echo "cmake-build-dir=build" >> $GITHUB_OUTPUT | ||
| echo "cmake-config-name=Release" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Configure simple device module with CMake | ||
| shell: bash | ||
| run: | | ||
| cmake -B ${{ steps.cmake-config.outputs.cmake-build-dir }} -S . \ | ||
| ${{ steps.cmake-config.outputs.cmake-generator }} \ | ||
| ${{ steps.cmake-config.outputs.cmake-arch }} \ | ||
| -DCMAKE_BUILD_TYPE=${{ steps.cmake-config.outputs.cmake-config-name }} \ | ||
| -DEXAMPLE_MODULE_ENABLE_TESTS=ON | ||
|
|
||
| - name: Build simple device module with CMake | ||
| shell: bash | ||
| run: | | ||
| cmake --build ${{ steps.cmake-config.outputs.cmake-build-dir }} \ | ||
| --config ${{ steps.cmake-config.outputs.cmake-config-name }} | ||
|
|
||
| - name: Run simple device module tests with CMake | ||
| shell: bash | ||
| run: | | ||
| ctest --test-dir ${{ steps.cmake-config.outputs.cmake-build-dir }} \ | ||
| --output-on-failure \ | ||
| -C ${{ steps.cmake-config.outputs.cmake-config-name }} \ | ||
| -V |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| name: Build simple device module with openDAQ framework and run tests | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| runner: | ||
| description: "Runner label" | ||
| required: true | ||
| type: string | ||
|
|
||
| branch: | ||
| description: "Branch to checkout" | ||
| required: false | ||
| type: string | ||
| default: "" | ||
|
|
||
| artifact-run-id: | ||
| required: true | ||
| type: string | ||
|
|
||
| artifact-name: | ||
| required: true | ||
| type: string | ||
|
|
||
| file-name: | ||
| required: true | ||
| type: string | ||
|
|
||
| workflow_call: | ||
| inputs: | ||
| runner: | ||
| description: "Runner label" | ||
| required: true | ||
| type: string | ||
|
|
||
| branch: | ||
| description: "Branch to checkout" | ||
| required: false | ||
| type: string | ||
| default: "" | ||
|
|
||
| artifact-run-id: | ||
| required: true | ||
| type: string | ||
|
|
||
| artifact-name: | ||
| required: true | ||
| type: string | ||
|
|
||
| file-name: | ||
| required: true | ||
| type: string | ||
|
|
||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
|
|
||
| jobs: | ||
| test-artifact: | ||
| runs-on: ${{ inputs.runner }} | ||
|
|
||
| steps: | ||
| - name: Checkout openDAQ module repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: openDAQ/SimpleDeviceModule | ||
| ref: ${{ inputs.branch }} | ||
|
|
||
| - name: Download openDAQ framework artifact | ||
| id: download | ||
| uses: actions/download-artifact@v5 | ||
| with: | ||
| repository: openDAQ/openDAQ | ||
| github-token: ${{ github.token }} | ||
| run-id: ${{ inputs.artifact-run-id }} | ||
| name: ${{ inputs.artifact-name }} | ||
| path: ${{ runner.temp }}/artifacts | ||
|
|
||
| - name: Install openDAQ framework artifact | ||
| uses: openDAQ/actions/framework-install@jira/TBBAS-2680-opendaq-gh-actions-github-api-wrapper-unit-tests | ||
| with: | ||
| framework-filename: ${{ steps.download.outputs.download-path }}/${{ inputs.file-name }} | ||
|
|
||
| - name: Build and test simple device module | ||
| uses: ./.github/actions/module-build-test | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the target branch with main