diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index f10a736..ed8d3bb 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -40,3 +40,20 @@ jobs: config: .github/configs/hadolint.yaml format: tty failure-threshold: warning + + + shellcheck: + name: shellcheck + runs-on: ubuntu-latest + steps: + - name: "setup: checkout repo" + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: "run shellcheck scan" + uses: ludeeus/action-shellcheck@00b27aa7cb85167568cb48a3838b75f4265f2bca # v2.0.0 + with: + severity: warning + format: tty + ignore_paths: .github .sources + env: + SHELLCHECK_OPTS: -e SC2154 diff --git a/build.sh b/build.sh index 52ce2f9..82d89ca 100755 --- a/build.sh +++ b/build.sh @@ -936,7 +936,7 @@ if ! cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null; then echo -e ${RED}[ERROR] failed change the current directory to the script directory ${NC} return 2 fi - +# shellcheck source=versions.env if ! . "${VERSIONS_ENVIRONMENT_FILE}" 2> /dev/null; then echo echo -e ${RED}[ERROR] failed to source "${VERSIONS_ENVIRONMENT_FILE}" ${NC} diff --git a/scripts/common.sh b/scripts/common.sh index acf2f28..feb4987 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -396,9 +396,9 @@ function get_and_patch_intel_drivers() git_download_strip_unpack "intel/ethernet-linux-iavf" "refs/tags/v${IAVF_VER}" "${IAVF_DIR}" git_download_strip_unpack "intel/ethernet-linux-ice" "refs/tags/v${ICE_VER}" "${ICE_DIR}" - pushd "${ICE_DIR}" + pushd "${ICE_DIR}" || return patch -p1 -i <(cat "${MTL_DIR}/patches/ice_drv/${ICE_VER}/"*.patch) - popd + popd || return set +x } @@ -407,9 +407,9 @@ function build_install_and_config_intel_drivers() set -x make -j "${NPROC}" -C "${IAVF_DIR}/src" install make -j "${NPROC}" -C "${ICE_DIR}/src" install - pushd "${IRDMA_DIR}" + pushd "${IRDMA_DIR}" || return ./build.sh - popd + popd || return config_intel_rdma_driver modprobe irdma set +x