Skip to content

Commit a6280c9

Browse files
Mionszko80
authored andcommitted
FIX: Fixes to the installation scripts (OpenVisualCloud#315)
* FIX: Fixes to the installation scripts FIX: Fixes to the installation scripts: - setup_ice_rdma .sh - now install most of the important things without errors on clean machine - setup_rdma_env.sh - minor fixes to the script - more issues still needs to be addressed. FIX: Add missing dependencies/headers Without this, the MCM will not build under Ubuntu 24.04 in some cases. --------- Signed-off-by: Milosz Linkiewicz <[email protected]>
1 parent 7cc52e4 commit a6280c9

File tree

11 files changed

+301
-109
lines changed

11 files changed

+301
-109
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
VALIDATE_BASH_EXEC=true
2+
VALIDATE_BASH=true
3+
VALIDATE_CPP=true
4+
VALIDATE_CLANG_FORMAT=true
5+
VALIDATE_GO=true
6+
VALIDATE_GO_MODULES=true
7+
VALIDATE_GITHUB_ACTIONS=true
8+
VALIDATE_GROOVY=true
9+
VALIDATE_JSON_PRETTIER=true
10+
VALIDATE_JSONC_PRETTIER=true
11+
VALIDATE_MARKDOWN_PRETTIER=true
12+
VALIDATE_PROTOBUF=true
13+
VALIDATE_PYTHON_BLACK=true
14+
VALIDATE_YAML_PRETTIER=true
15+
FIX_CLANG_FORMAT=true
16+
FIX_GO=true
17+
FIX_GO_MODULES=true
18+
FIX_GROOVY=true
19+
FIX_JSON_PRETTIER=true
20+
FIX_JSONC_PRETTIER=true
21+
FIX_MARKDOWN_PRETTIER=true
22+
FIX_PROTOBUF=true
23+
FIX_PYTHON_BLACK=true
24+
FIX_YAML_PRETTIER=true
25+
RUN_LOCAL=true
26+
DEFAULT_WORKSPACE=/github/workspace
27+
USE_FIND_ALGORITHM=true
Lines changed: 95 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,134 @@
11
# Source repository: https://github.com/actions/dependency-review-action
22

3-
name: scan-dependency-review
3+
name: scan-lint-and-depend-review
44
on:
55
pull_request:
66
workflow_call:
77
workflow_dispatch:
88
inputs:
99
branch:
10-
description: 'Branch to run the scans on'
11-
default: 'main'
10+
description: "Branch to run the scans on"
11+
default: "main"
1212
type: string
1313
all_codebase:
14-
description: 'Validate all codebase or changes/diff only'
15-
default: 'false'
14+
description: "[true] Validate all codebase. [false] Validate changes/diff only"
15+
default: "false"
16+
type: string
17+
fix_codebase:
18+
description: "[true] Perform scan and issues fix. [false] Perform scan only."
19+
default: "false"
1620
type: string
1721

1822
permissions:
1923
contents: read
2024
env:
21-
INPUT_BRANCH: ${{ inputs.branch || github.sha }}
22-
LINTER_RULES_PATH: .github/configs/super-linter
23-
VALIDATE_ALL_CODEBASE: ${{ inputs.all_codebase || 'false' }}
25+
INPUT_BRANCH: "${{ inputs.branch || github.sha }}"
26+
LINTER_RULES_PATH: ".github/configs/super-linter"
27+
SAVE_SUPER_LINTER_SUMMARY: "true"
28+
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: "true"
29+
SUPER_LINTER_OUTPUT_DIRECTORY_NAME: "super-linter-output"
30+
SUPER_LINTER_SUMMARY_FILE_NAME: "super-linter-summary.md"
31+
VALIDATE_ALL_CODEBASE: "${{ inputs.all_codebase || 'false' }}"
32+
PERFORM_CODEBASE_FIX: "${{ inputs.fix_codebase || 'false' }}"
2433

2534
concurrency:
2635
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
2736
cancel-in-progress: true
2837

2938
jobs:
3039
dependency-review:
31-
name: 'Super-linter: Workflow initializing'
32-
runs-on: 'ubuntu-22.04'
40+
name: "dependency-review: Workflow initializing"
41+
runs-on: "ubuntu-22.04"
3342
steps:
34-
- name: 'dependency-review: harden runner'
43+
- name: "dependency-review: harden runner"
3544
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
3645
with:
3746
egress-policy: audit
3847

39-
- name: 'dependency-review: checkout repository'
48+
- name: "dependency-review: checkout repository"
4049
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
50+
with:
51+
ref: "${{ env.INPUT_BRANCH }}"
4152

42-
- name: 'dependency-review: perform dependency-review action'
53+
- name: "dependency-review: perform dependency-review action"
4354
uses: actions/dependency-review-action@72eb03d02c7872a771aacd928f3123ac62ad6d3a # v4.3.3
4455

4556
super-linter:
46-
name: 'super-linter: Workflow initializing'
47-
runs-on: 'ubuntu-22.04'
57+
name: "super-linter: Workflow initializing"
58+
runs-on: "ubuntu-22.04"
59+
timeout-minutes: 30
4860
permissions:
49-
contents: read
61+
contents: write
5062
packages: read
51-
timeout-minutes: 90
5263
env:
53-
SUPER_LINTER_OUTPUT_DIRECTORY_NAME: super-linter-output
54-
SUPER_LINTER_SUMMARY_FILE_NAME: super-linter-summary.md
55-
SAVE_SUPER_LINTER_SUMMARY: true
56-
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY : true
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
DISABLE_ERRORS: "false"
66+
BASH_SEVERITY: "warning"
5767
steps:
58-
- name: 'super-linter: Harden Runner'
59-
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
60-
with:
61-
egress-policy: audit
68+
- name: "super-linter: Harden Runner"
69+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
70+
with:
71+
egress-policy: audit
72+
73+
- name: "super-linter: checkout repository [fetch-depth=0]"
74+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
75+
with:
76+
fetch-depth: 0
77+
ref: "${{ env.INPUT_BRANCH }}"
78+
79+
- name: "super-linter: perform super-linter scan workflow."
80+
uses: super-linter/super-linter/slim@e1cb86b6e8d119f789513668b4b30bf17fe1efe4 # v7.2.0 x-release-please-version
81+
env:
82+
FIX_GO: "${{ env.PERFORM_CODEBASE_FIX }}"
83+
FIX_GO_MODULES: "${{ env.PERFORM_CODEBASE_FIX }}"
84+
FIX_GROOVY: "${{ env.PERFORM_CODEBASE_FIX }}"
85+
FIX_JSON_PRETTIER: "${{ env.PERFORM_CODEBASE_FIX }}"
86+
FIX_JSONC_PRETTIER: "${{ env.PERFORM_CODEBASE_FIX }}"
87+
FIX_MARKDOWN_PRETTIER: "${{ env.PERFORM_CODEBASE_FIX }}"
88+
FIX_PROTOBUF: "${{ env.PERFORM_CODEBASE_FIX }}"
89+
FIX_PYTHON_BLACK: "${{ env.PERFORM_CODEBASE_FIX }}"
90+
FIX_YAML_PRETTIER: "${{ env.PERFORM_CODEBASE_FIX }}"
91+
VALIDATE_BASH_EXEC: true
92+
VALIDATE_BASH: true
93+
VALIDATE_GO: true
94+
VALIDATE_GO_MODULES: true
95+
VALIDATE_GITHUB_ACTIONS: true
96+
VALIDATE_GROOVY: true
97+
VALIDATE_JSON_PRETTIER: true
98+
VALIDATE_JSONC_PRETTIER: true
99+
VALIDATE_MARKDOWN_PRETTIER: true
100+
VALIDATE_PROTOBUF: true
101+
VALIDATE_PYTHON_BLACK: true
102+
VALIDATE_YAML_PRETTIER: true
62103

63-
- name: 'super-linter: checkout repository [fetch-depth=0]'
64-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
65-
with:
66-
fetch-depth: 0
67-
ref: ${{ inputs.branch }}
104+
- name: "super-linter: clang_format lint/fix. No error approach."
105+
uses: super-linter/super-linter/slim@e1cb86b6e8d119f789513668b4b30bf17fe1efe4 # v7.2.0 x-release-please-version
106+
env:
107+
FIX_CLANG_FORMAT: "${{ env.PERFORM_CODEBASE_FIX }}"
108+
VALIDATE_CLANG_FORMAT: true
109+
DISABLE_ERRORS: true
68110

69-
- name: 'super-linter: perform super-linter scan workflow.'
70-
uses: super-linter/super-linter/slim@e1cb86b6e8d119f789513668b4b30bf17fe1efe4 # v7.2.0 x-release-please-version
71-
env:
72-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73-
DISABLE_ERRORS: false
74-
BASH_SEVERITY: "warning"
75-
VALIDATE_PROTOBUF: true
76-
VALIDATE_MARKDOWN: true
77-
VALIDATE_JSONC: true
78-
VALIDATE_GO: true
79-
VALIDATE_GITHUB_ACTIONS: true
80-
VALIDATE_CPP: true
81-
VALIDATE_CLANG_FORMAT: true
82-
VALIDATE_BASH: true
83-
VALIDATE_BASH_EXEC: true
111+
- name: "super-linter: cpp-lint. No error approach."
112+
uses: super-linter/super-linter/slim@e1cb86b6e8d119f789513668b4b30bf17fe1efe4 # v7.2.0 x-release-please-version
113+
env:
114+
VALIDATE_CPP: true
115+
DISABLE_ERRORS: true
84116

85-
- name: 'super-linter: upload linter results as an artifact.'
86-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
87-
if: env.SAVE_SUPER_LINTER_SUMMARY == 'true' || env.ENABLE_GITHUB_ACTIONS_STEP_SUMMARY == 'true'
88-
with:
89-
name: coverity-reports
90-
path:
91-
'${{ github.workspace }}/${{ env.SUPER_LINTER_OUTPUT_DIRECTORY_NAME }}/${{ env.SUPER_LINTER_SUMMARY_FILE_NAME }}'
117+
- name: "super-linter: Commit and push linting fixes"
118+
if: >
119+
( github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ) &&
120+
github.ref_name != github.event.repository.default_branch &&
121+
env.PERFORM_CODEBASE_FIX == 'true'
122+
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
123+
with:
124+
branch: "${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}"
125+
commit_message: "super-linter: fix validation stage linting issues"
126+
commit_user_name: "sys-vsval"
127+
commit_user_email: "[email protected]"
128+
129+
- name: "super-linter: upload linter results as an artifact."
130+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
131+
if: env.SAVE_SUPER_LINTER_SUMMARY == 'true' || env.ENABLE_GITHUB_ACTIONS_STEP_SUMMARY == 'true'
132+
with:
133+
name: "super-linter-reports"
134+
path: "${{ github.workspace }}/${{ env.SUPER_LINTER_OUTPUT_DIRECTORY_NAME }}/${{ env.SUPER_LINTER_SUMMARY_FILE_NAME }}"

media-proxy/include/mesh/metrics.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <vector>
1111
#include <string>
1212
#include <variant>
13+
#include <cstdint>
1314

1415
namespace mesh::telemetry {
1516

@@ -33,7 +34,7 @@ class MetricField {
3334

3435
class Metric {
3536
public:
36-
Metric(int64_t timestamp_ms)
37+
explicit Metric(int64_t timestamp_ms)
3738
: timestamp_ms(timestamp_ms) {}
3839

3940
void addFieldString(const std::string& name, const std::string& str_value) {

media-proxy/include/mesh/proxy_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#ifndef PROXY_CONFIG_H
88
#define PROXY_CONFIG_H
99

10+
#include <cstdint>
1011
#include <string>
1112

1213
namespace mesh::config {

scripts/common.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# SPDX-License-Identifier: BSD-3-Clause
44
# Copyright 2024 Intel Corporation
55

6-
export REPO_DIR="$(readlink -f "$(dirname -- "${BASH_SOURCE[0]}")/..")"
6+
REPO_DIR="$(readlink -f "$(dirname -- "${BASH_SOURCE[0]}")/..")"
7+
export REPO_DIR
78
export BUILD_DIR="${BUILD_DIR:-${REPO_DIR}/_build}"
89
export DRIVERS_DIR="${DRIVERS_DIR:-/opt/intel/drivers}"
910
export PREFIX_DIR="${PREFIX_DIR:-${REPO_DIR}/_install}"

scripts/setup_build_env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
set -eEo pipefail
4-
53
SCRIPT_DIR="$(readlink -f "$(dirname -- "${BASH_SOURCE[0]}")")"
64
. "${SCRIPT_DIR}/common.sh"
75

@@ -40,6 +38,7 @@ function install_package_dependencies()
4038
log_warning OS reboot is required for all of the changes to take place.
4139
return 0
4240
}
41+
4342
function install_ubuntu_package_dependencies()
4443
{
4544
APT_LINUX_HEADERS="linux-headers-${KERNEL_VERSION}"
@@ -324,6 +323,7 @@ function full_build_and_install_workflow()
324323
# Allow sourcing of the script.
325324
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]
326325
then
326+
set -exEo pipefail
327327
if [ "${EUID}" != "0" ]; then
328328
log_error "Must be run as root. Try running below command:"
329329
log_error "sudo \"${BASH_SOURCE[0]}\""

0 commit comments

Comments
 (0)