Skip to content

Commit 1a76636

Browse files
author
Aliaksandr Adziareika
committed
<TBBAS-2530> Add install framework action
1 parent b416117 commit 1a76636

File tree

3 files changed

+60
-20
lines changed

3 files changed

+60
-20
lines changed

.github/actions/framework-download-s3/action.yml renamed to .github/actions/framework-download/action.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
name: Download openDAQ framework package from S3
22
description: "Download a package from S3 and install it depending on OS and architecture"
33
inputs:
4-
s3_bucket:
4+
src-opendaq-framework-dev:
55
required: true
6-
description: "S3 bucket name"
7-
s3_path:
8-
required: true
9-
description: "Path to package in bucket (without OS/arch)"
10-
s3_artefact:
11-
required: true
12-
description: "Filename in the S3 bucket"
13-
download_dir:
6+
dst-opendaq-framework-dev:
147
required: false
15-
default: "."
8+
default: ${{ runner.temp }}
9+
1610
aws_access_key_id:
1711
required: true
1812
description: "AWS Access Key ID"
@@ -22,12 +16,19 @@ inputs:
2216
aws_region:
2317
required: true
2418
description: "AWS Region"
19+
2520
shell:
26-
required: true
21+
required: false
22+
default: "bash"
23+
24+
debug:
25+
required: false
26+
default: false
27+
2728
runs:
2829
using: composite
2930
steps:
30-
- name: Prepare AWS CLI for S3
31+
- name: Configure AWS
3132
uses: aws-actions/configure-aws-credentials@v4
3233
with:
3334
aws-access-key-id: ${{ inputs.aws_access_key_id }}
@@ -47,4 +48,4 @@ runs:
4748
- name: Download package from S3
4849
shell: ${{ inputs.shell }}
4950
run: |
50-
aws s3 cp "s3://${{ inputs.s3_bucket }}/${{ inputs.s3_path }}/${{ inputs.s3_artefact }}" "${{ inputs.download_dir }}"
51+
aws s3 cp "${{ inputs.src-opendaq-framework }}" "${{ inputs.dst-opendaq-framework-dev }}"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Install openDAQ framework package
2+
inputs:
3+
src-opendaq-framework:
4+
required: true
5+
6+
runs:
7+
using: composite
8+
9+
steps:
10+
- name: Install openDAQ framework package (Windows)
11+
if: runner.OS == 'Windows'
12+
shell: powershell
13+
run: ${{ inputs.src-opendaq-framework}} /S
14+
15+
- name: Install openDAQ framework package (Linux)
16+
if: ${{ runner.OS }} == 'Linux'
17+
shell: bash
18+
run: sudo dpkg -i ${{ inputs.src-opendaq-framework }}
19+
20+
- name: Unsupported runner OS
21+
if: runner.os != 'Windows' && runner.os != 'Linux'
22+
shell: bash
23+
run:
24+
echo "Install openDAQ is not supported for ${{ runner.os }}"
25+
exit 1

.github/workflows/opendaq-download-framework-aws.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ on:
66

77
env:
88
s3bucket: bb-blueberry-sdk-releases
9-
s3sdk_path: releases/main/SDK
10-
s3artefact: opendaq-3.31.0-ubuntu22.04-x86_64_01ff08d.deb
9+
# s3sdk_path: releases/main/SDK
10+
s3sdk_path: releases/v3.20.4/SDK
11+
# s3artefact: opendaq-3.31.0-ubuntu22.04-x86_64_01ff08d.deb
12+
s3artefact: opendaq-3.20.4-ubuntu22.04-x86_64.deb
1113

1214
jobs:
1315
build:
@@ -17,18 +19,30 @@ jobs:
1719
uses: actions/checkout@v4
1820

1921
- name: Download openDAQ framework
20-
uses: ./.github/actions/framework-download-s3
22+
uses: ./.github/actions/framework-download
2123
with:
22-
s3_bucket: ${{ env.s3bucket }}
23-
s3_path: ${{ env.s3sdk_path }}
24-
s3_artefact: ${{ env.s3artefact }}
24+
src-opendaq-framework-dev: "s3://${{ env.s3bucket }}/${{ env.s3sdk_path }}/${{ env.s3artefact }}"
25+
dst-opendaq-framework-dev: "${{ runner.temp }}/${{ env.s3artefact }}"
2526
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
2627
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2728
aws_region: ${{ secrets.AWS_REGION }}
28-
shell: "bash"
29+
30+
- name: Install openDAQ framework
31+
uses: ./.github/actions/framework-install
32+
with:
33+
src-opendaq-framework: "${{ runner.temp }}/${{ env.s3artefact }}"
2934

3035
- name: Uploadading artifact
3136
uses: actions/upload-artifact@v4
3237
with:
3338
name: ${{ env.s3artefact }}
3439
path: ./${{ env.s3artefact }}
40+
41+
- name: Build example device module
42+
run: cmake --build build/output --target all
43+
44+
- name: Run tests with GTest report
45+
run: |
46+
mkdir -p build/reports
47+
export GTEST_OUTPUT=xml:$(pwd)/build/reports/gtest-report.xml
48+
ctest --test-dir build/output --output-on-failure -V

0 commit comments

Comments
 (0)