diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 968ddc25b8894c..00000000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Maintenance - -on: - push: - branches: - - main - -jobs: - sync_branches: - runs-on: [self-hosted, v1] - permissions: - contents: write - actions: write - outputs: - fail: ${{ steps.assert.outputs.fail }} - warn: ${{ steps.assert.outputs.warn }} - - steps: - - uses: analogdevicesinc/doctools/checkout@v1 - - - name: update-mirror - run: | - source ./ci/maintenance.sh - sync_branches "adi-6.12.0 rpi-6.12.y" - - - name: Export labels - id: assert - run: | - source ./ci/runner_env.sh - export_labels - - assert: - runs-on: [self-hosted, v1] - needs: [sync_branches] - - steps: - - name: Assert checks - env: - job_warn_sync_main: ${{needs.sync_branches.outputs.warn}} - job_fail_sync_main: ${{needs.sync_branches.outputs.fail}} - run: | - curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -L -o runner_env.sh \ - https://raw.githubusercontent.com/${{ github.repository }}/$GITHUB_SHA/ci/runner_env.sh - source runner_env.sh - assert_labels diff --git a/.github/workflows/top-level.yml b/.github/workflows/top-level.yml index 5de53dd83bb5fb..4d3075537b60ba 100644 --- a/.github/workflows/top-level.yml +++ b/.github/workflows/top-level.yml @@ -1,7 +1,6 @@ name: Kernel build on: - workflow_dispatch: push: branches: - 'adsp-[0-9]+.[0-9]+*-y' @@ -10,8 +9,6 @@ on: - 'ci/**' - 'docs/**' pull_request: - branches: - - 'adsp-[0-9]+.[0-9]+*-y' paths-ignore: - '.github/**' - 'ci/**' @@ -54,6 +51,7 @@ jobs: build_gcc_arm: uses: analogdevicesinc/linux/.github/workflows/build.yml@ci needs: [checks] + if: needs.checks.outputs.fatal != 'true' secrets: inherit with: compiler: "gcc" @@ -84,7 +82,7 @@ jobs: job_fail_build_gcc_arm: ${{needs.build_gcc_arm.outputs.fail}} run: | curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -L -o runner_env.sh \ - https://raw.githubusercontent.com/${{ github.repository }}/ci/ci/runner_env.sh + https://raw.githubusercontent.com/analogdevicesinc/linux/ci/ci/runner_env.sh source ./runner_env.sh assert_labels build_gcc_arm_sc573-ezkit_defconfig: @@ -141,7 +139,19 @@ jobs: arch: "arm64" defconfig: "sc598-som-ezlite_defconfig" auto_from_range: false - assert_build_adsp: + compile_devicetrees: + needs: [assert_checks] + uses: analogdevicesinc/linux/.github/workflows/compile-devicetrees.yml@ci + secrets: inherit + with: + compiler: "gcc" + archs: "arm arm64" + dts_files: > + arch/arm/boot/dts/adi/sc573-*.dts + arch/arm/boot/dts/adi/sc589-*.dts + arch/arm/boot/dts/adi/sc594-*.dts + arch/arm64/boot/dts/adi/sc598-*.dts + assert_build: runs-on: [self-hosted, v1] needs: - build_gcc_arm_sc573-ezkit_defconfig @@ -150,6 +160,7 @@ jobs: - build_gcc_arm_sc594-som-ezlite_defconfig - build_gcc_aarch64_sc598-som-ezkit_defconfig - build_gcc_aarch64_sc598-som-ezlite_defconfig + - compile_devicetrees steps: - name: Assert env: @@ -159,14 +170,16 @@ jobs: job_warn_build_gcc_arm_sc594-som-ezlite_defconfig: ${{needs.build_gcc_arm_sc594-som-ezlite_defconfig.outputs.warn}} job_warn_build_gcc_aarch64_sc598-som-ezkit_defconfig: ${{needs.build_gcc_aarch64_sc598-som-ezkit_defconfig.outputs.warn}} job_warn_build_gcc_aarch64_sc598-som-ezlite_defconfig: ${{needs.build_gcc_aarch64_sc598-som-ezlite_defconfig.outputs.warn}} + job_warn_compile_devicetrees: ${{needs.compile_devicetrees.outputs.warn}} job_fail_build_gcc_arm_sc573-ezkit_defconfig: ${{needs.build_gcc_arm_sc573-ezkit_defconfig.outputs.fail}} job_fail_build_gcc_arm_sc589-mini_defconfig: ${{needs.build_gcc_arm_sc589-mini_defconfig.outputs.fail}} job_fail_build_gcc_arm_sc594-som-ezkit_defconfig: ${{needs.build_gcc_arm_sc594-som-ezkit_defconfig.outputs.fail}} job_fail_build_gcc_arm_sc594-som-ezlite_defconfig: ${{needs.build_gcc_arm_sc594-som-ezlite_defconfig.outputs.fail}} job_fail_build_gcc_aarch64_sc598-som-ezkit_defconfig: ${{needs.build_gcc_aarch64_sc598-som-ezkit_defconfig.outputs.fail}} job_fail_build_gcc_aarch64_sc598-som-ezlite_defconfig: ${{needs.build_gcc_aarch64_sc598-som-ezlite_defconfig.outputs.fail}} + job_fail_compile_devicetrees: ${{needs.compile_devicetrees.outputs.fail}} run: | curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -L -o runner_env.sh \ - https://raw.githubusercontent.com/${{ github.repository }}/ci/ci/runner_env.sh + https://raw.githubusercontent.com/analogdevicesinc/linux/ci/ci/runner_env.sh source ./runner_env.sh assert_labels diff --git a/ci/Containerfile b/ci/Containerfile deleted file mode 100644 index 848ca3d7bbe31c..00000000000000 --- a/ci/Containerfile +++ /dev/null @@ -1,50 +0,0 @@ -FROM opensuse/leap:15.6 - -ENV runner_labels=v1 -ARG runner_version=2.323.0 -ARG runner_version_sha=f1533c606d724c6f157335b1921fdff17f52ff57f22907f0b77f82862e9900f0 -ARG bashrc=https://raw.githubusercontent.com/analogdevicesinc/doctools/refs/heads/main/ci/bashrc -ARG entrypoint_sh=https://raw.githubusercontent.com/analogdevicesinc/doctools/refs/heads/main/ci/entrypoint.sh - -RUN zypper install -y --no-recommends \ - tar gzip curl jq libicu coreutils sha3sum - -RUN useradd -m runner - -USER runner -RUN mkdir -p /home/runner/actions-runner -WORKDIR /home/runner/actions-runner - -RUN curl -o actions-runner.tar.gz -L https://github.com/actions/runner/releases/download/v${runner_version}/actions-runner-linux-x64-${runner_version}.tar.gz && \ - echo "${runner_version_sha} actions-runner.tar.gz" | sha3sum -a 256 -c && \ - tar xzf actions-runner.tar.gz - -USER root -COPY install-deps.sh . -RUN chmod +x install-deps.sh ; ./install-deps.sh -COPY install-compilers.sh . -RUN chmod +x install-compilers.sh ; ./install-compilers.sh -COPY install-extra.sh . -RUN chmod +x install-extra.sh ; ./install-extra.sh - -RUN mkdir -p /usr/local/bin -WORKDIR /usr/local/bin -ADD ${entrypoint_sh} . -RUN chmod +rx entrypoint.sh - -RUN git config --add --system user.name "CSE CI" ; \ - git config --add --system user.email "cse-ci-notifications@analog.com" ; \ - git config --add --system init.defaultBranch "__runner_init_branch" ; \ - git config --add --system advice.mergeConflict false ; \ - git config --add --system advice.detachedHead false ; \ - git config --add --system fetch.prune true ; \ - git config --add --system fetch.pruneTags true ; \ - git config --add --system safe.directory '*' - -USER runner -WORKDIR /home/runner -RUN curl -o .bashrc -L ${bashrc} ; \ - chmod +x .bashrc - -ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] - diff --git a/ci/build.sh b/ci/build.sh deleted file mode 100644 index d3baa25a1d1c57..00000000000000 --- a/ci/build.sh +++ /dev/null @@ -1,1042 +0,0 @@ -if [[ -z "$run_id" ]]; then - export run_id=$(uuidgen) -fi - -if [[ "$GITHUB_ACTIONS" == "true" ]]; then - export _n='%0A' - export _c='%2C' -else - export _n=$'\n' - export _c=$',' - export _color='--color' -fi - -_fmt() { - msg=$(echo "$1" | tr -d '\t') - if [[ ! "$_n" == $'\n' ]]; then - msg=$(printf "$msg" | sed ':a;N;$!ba;s/\n/'"$_n"'/g') - fi - printf "%s\n" "$msg" -} - -_file () { - $(echo "$1" | sed 's/,/'"$_c"'/g') -} - -check_checkpatch() { - export step_name="checkpatch" - local mail= - local fail=0 - local warn=0 - - echo "$step_name on range $base_sha..$head_sha" - - python3.11 -m venv ~/venv - source ~/venv/bin/activate - pip3.11 install ply GitPython --upgrade - - # The output is not properly captured with --git - for commit in $(git rev-list $base_sha..$head_sha --reverse); do - git --no-pager show --format="%h %s" "$commit" --name-only - # Skip empty commits, assume cover letter - # and those only touching non-upstream directories .github ci and docs - # A treeless (--filter=tree:0) fetch could be done to fetch - # full commit message history before running checkpatch, but - # that may mess-up the cache and is only useful for checking - # SHA references in the commit message, with may not even apply - # if the commit is from upstream. Instead, just delegate to the - # user to double check the referenced SHA. - local files=$(git diff --diff-filter=ACM --no-renames --name-only $commit~..$commit | grep -v ^ci | grep -v ^.github | grep -v ^docs || true) - if [[ -z "$files" ]]; then - echo "empty, skipped" - continue - fi - mail=$(scripts/checkpatch.pl --git "$commit" \ - --strict \ - --ignore FILE_PATH_CHANGES \ - --ignore LONG_LINE \ - --ignore LONG_LINE_STRING \ - --ignore LONG_LINE_COMMENT \ - --ignore PARENTHESIS_ALIGNMENT \ - --ignore CAMELCASE \ - --ignore UNDOCUMENTED_DT_STRING) - - found=0 - msg= - - while read -r row - do - if [[ "$row" =~ ^total: ]]; then - echo -e "\e[1m$row\e[0m" - break - fi - - # Additional parsing is needed - if [[ "$found" == "1" ]]; then - - # The row is started with "#" - if [[ "$row" =~ ^\# ]]; then - # Split the string using ':' separator - IFS=':' read -r -a list <<< "$row" - - # Get file-name after removing spaces. - file=$(echo ${list[2]} | xargs) - - # Get line-number - line=${list[3]} - echo $row - else - msg=${msg}${row}$_n - if [[ -z $row ]]; then - if [[ -z $file ]]; then - # If no file, add to file 0 of first file on list. - file=$(git show --name-only --pretty=format: $commit | head -n 1) - echo "::$type file=$(_file "$file"),line=0::$step_name: $msg" - else - echo "::$type file=$(_file "$file"),line=$line::$step_name: $msg" - fi - found=0 - file= - line= - fi - fi - fi - - if [[ "$row" =~ ^ERROR: ]]; then - type="error" - fail=1 - elif [[ "$row" =~ ^WARNING: ]]; then - type="warning" - warn=1 - elif [[ "$row" =~ ^CHECK: ]]; then - type="warning" - fi - if [[ "$row" =~ ^(CHECK|WARNING|ERROR): ]]; then - msg=$(echo "$row" | sed -E 's/^(CHECK|WARNING|ERROR): //')$_n - # Suppress some cases: - if [[ "$row" =~ ^"WARNING: Unknown commit id" ]]; then - # Checkpatch may want to look back beyond fetched commits. - echo $row - else - found=1 - fi - file= - line= - else - if [[ "$found" == "0" ]]; then - echo $row - fi - fi - - done <<< "$mail" - done - - _set_step_warn $warn - return $fail -} - -check_dt_binding_check() { - export step_name="dt_binding_check" - local files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha -- 'Documentation/devicetree/bindings/**/*.yaml') - local fail=0 - - echo "$step_name on range $base_sha..$head_sha" - - python3.11 -m venv ~/venv - source ~/venv/bin/activate - pip3.11 install dtschema yamllint --upgrade - - [[ -z "$files" ]] && return 0 - while read file; do - local relative_yaml=${file#Documentation/devicetree/bindings/} - local file_ex=$(realpath ${file%.yaml}.example.dtb) - - echo "Testing devicetree binding $file" - - # The dt_binding_check rule won't exit with an error - # for schema errors, but will exit with an error for - # dts example errors. - # - # All schema files must be validated before exiting, - # so the script should not exit on error. - if ! error_txt=$(make dt_binding_check CONFIG_DTC=y DT_CHECKER_FLAGS=-m DT_SCHEMA_FILES="$relative_yaml" 2>&1); then - fail=1 - fi - - echo "$error_txt" - - # file name or realpath of example appears in output if it contains errors - if echo "$error_txt" | grep -qF -e "$file" -e "$file_ex"; then - fail=1 - echo "::error file=$(_file "$file"),line=0::$step_name contain errors" - fi - done <<< "$files" - - _set_step_warn $warn - return $fail -} - -check_coccicheck() { - export step_name="coccicheck" - local files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha -- '**/*.c') - local mail= - local warn=0 - - echo "$step_name on range $base_sha..$head_sha" - - if [[ -z "$ARCH" ]]; then - ARCH=x86 - fi - - coccis=$(ls scripts/coccinelle/**/*.cocci) - [[ -z "$coccis" ]] && return 0 - [[ -z "$files" ]] && return 0 - while read file; do - echo -e "\e[1m$file\e[0m" - - while read cocci; do - - mail=$(spatch -D report --very-quiet --cocci-file $cocci --no-includes \ - --include-headers --patch . \ - -I arch/$ARCH/include -I arch/$ARCH/include/generated -I include \ - -I arch/$ARCH/include/uapi -I arch/$ARCH/include/generated/uapi \ - -I include/uapi -I include/generated/uapi \ - --include include/linux/compiler-version.h \ - --include include/linux/kconfig.h $file || true) - - msg= - - while read -r row - do - # There is no standard for cocci, so this is the best we can do - # is match common beginnings and log the rest - if [[ "$row" =~ ^$file: ]]; then - type="warning" - warn=1 - fi - - if [[ "$row" =~ ^(warning): ]]; then - # warning: line 223: should nonseekable_open be a metavariable? - # internal cocci warning, not user fault - echo $row - elif [[ "$row" =~ ^$file: ]]; then - # drivers/iio/.../adi_adrv9001_fh.c:645:67-70: duplicated argument to & or | - IFS=':' read -r -a list <<< "$row" - line=${list[1]} - msg= - for ((i=2; i<${#list[@]}; i++)); do - msg="$msg${list[$i]} " - done - echo "::$type file=$(_file "$file"),line=$line::$step_name: $msg" - else - if [[ "$row" ]]; then - echo $row - fi - fi - - done <<< "$mail" - - done <<< "$coccis" - - done <<< "$files" - - _set_step_warn $warn - return 0 -} - -_bad_licence_error() { - local license_error=" - File is being added to Analog Devices Linux tree. - Analog Devices code is being marked dual-licensed... Make sure this is really intended! - If not intended, change MODULE_LICENSE() or the SPDX-License-Identifier accordingly. - This is not as simple as one thinks and upstream might require a lawyer to sign the patches!" - _fmt "::warning file=$1::$step_name: $license_error" -} - -check_license() { - export step_name="check_license" - local fail=0 - - echo "$step_name on range $base_sha..$head_sha" - - local added_files=$(git diff --diff-filter=A --name-only "$base_sha..$head_sha") - - # Get list of new files in the commit range - for file in $added_files ; do - if git diff $base_sha..$head_sha "$file" 2>/dev/null | grep "^+MODULE_LICENSE" | grep -q "Dual" ; then - _bad_licence_error "$file" - fail=1 - elif git diff $base_sha..$head_sha "$file" 2>/dev/null | grep "^+// SPDX-License-Identifier:" | grep -qi " OR " ; then - # The below might catch bad licenses in header files and also helps to make sure dual licenses are - # not in driver (e.g.: sometimes people have MODULE_LICENSE != SPDX-License-Identifier - which is also - # wrong and maybe something to improve in this job). - # For devicetree-related files, allow dual license if GPL-2.0 is one of them. - if [[ "$file" == *.@(yaml|dts|dtsi|dtso) ]]; then - if cat "$file" | grep "^// SPDX-License-Identifier:" | grep -q "GPL-2.0" ; then - continue - fi - fi - _bad_licence_error "$file" - fail=1 - fi - done - - _set_step_warn $warn - return $fail -} - -check_assert_defconfigs() { - export step_name="check_assert_defconfigs" - local fail=0 - local arch - local defconfig - local file - local message=" - Verify if the changes are coherent, for example, the changes were not - caused by a mistakenly set Kconfig, and if so, run 'make savedefconfig', - overwrite the defconfig and commit it. - " - - echo "$step_name" - for arg in "$@"; do - arch=$(cut -d "/" -f1 <<< "$arg") - [[ "$arch" == "arm64" ]] && arch_=aarch64 || arch_=$arch - defconfig=$(cut -d "/" -f2 <<< "$arg") - file=arch/$arch/configs/$defconfig - if [[ "$defconfig" == "adi_ci_defconfig" ]]; then - # Contain subsystem symbols that are removed if no - # controller is enabled, but are required in the config - # template for when a controller is indeed inferred. - continue - fi - - if [[ -f $file ]]; then - echo $file - set_arch gcc_$arch_ 1>/dev/null - make $defconfig savedefconfig 1>/dev/null - rm .config - - mv defconfig $file - out=$(git diff $_color --exit-code $file) || { - _fmt "::error file=$file::$step_name: Defconfig '$file' changed. $message - $out" - fail=1 - } - git restore $file - fi - done - - return $fail -} - -compile_devicetree() { - export step_name="compile_devicetree" - local exceptions_file="ci/travis/dtb_build_test_exceptions" - local tmp_log_file=/dev/shm/$run_id.ci_compile_devicetree.log - local err=0 - local fail=0 - local dtb_file= - local dts_files="" - local regex0='^([[:alnum:]/._-]+)(:([0-9]+)\.([0-9]+)-([0-9]+)\.([0-9]+))?: (Warning|Error) (.*)$' - local regex1='^Error: ([[:alnum:]/._-]+)(:([0-9]+)\.([0-9]+)-([0-9]+))? (.+)$' - - if [[ -z "$ARCH" ]]; then - echo "::error ::$step_name: ARCH is not set." - return 1 - fi - - echo "compile devicetree on range $base_sha..$head_sha" - - local files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha) - local dtsi_files=$(echo "$files" | grep ^arch/$ARCH/boot/dts/ | grep dtsi$ || true) - if [[ ! -z "$dtsi_files" ]]; then - echo "collecting dts files that include dtsi" - while read file; do - echo $file - basename=$(basename $file) - dirname=$(dirname $file) - dts_files+=\ $(find "$dirname" -name "*.dts" | xargs -P "$(nproc)" -I{} \ - sh -c 'if grep -q "#include \"$(basename "$0")\"" "$1" ; then echo "$1" ; fi' "$file" {}) - done <<< "$dtsi_files" - fi - - dts_files+=\ $(echo "$files" | grep ^arch/$ARCH/boot/dts/ | grep dts$ || true) - dts_files=$(echo $dts_files | xargs) - if [[ -z "$dts_files" ]]; then - echo "no dts on range, skipped" - return $err - fi - - # Only check fpga arm & arm64 DTs, they are shipped via SD-card - hdl_dts_files=$(echo "$dts_files" | tr ' ' '\n' | grep -E 'arch/arm(64)?' | grep -E '/(socfpga|xilinx|microblaze)/' || true) - if [[ -f $exceptions_file ]]; then - hdl_dts_files=$(comm -13 <(sort $exceptions_file) <(echo $hdl_dts_files | tr ' ' '\n' | sort)) - fi - local hdl_dts_error=" - DTS does not contain 'hdl_project:' tag - Either: - 1. Create a 'hdl_project' tag for it - OR - 2. add it in file '$exceptions_file'" - for file in $hdl_dts_files; do - if ! grep -q "hdl_project:" $file ; then - _fmt "::error file=$file::$step_name: $hdl_dts_error" - fail=1 - fi - done - - echo > $tmp_log_file - dtb_files=$(for file in $dts_files; do - echo $file | sed 's/dts\//=/g' | cut -d'=' -f2 | sed 's/\.dts\>/.dtb/g' - done | sort -u) - - echo "compiling devicetrees" - - touch $tmp_log_file - make -i $dtb_files -j$(nproc) 2>&1 | \ - (while IFS= read -r row; do - echo $row - if [[ "$row" =~ $regex0 ]]; then - file=$(echo ${BASH_REMATCH[1]} | xargs) - type=$(echo ${BASH_REMATCH[7]} | xargs | tr '[:upper:]' '[:lower:]') - msg_=${BASH_REMATCH[8]} - - if [[ -z "${BASH_REMATCH[2]}" ]]; then - msg="::$type file=$file,line=0::$msg_" - else - line="${BASH_REMATCH[3]}" - col="${BASH_REMATCH[4]}" - end_line="${BASH_REMATCH[5]}" - end_col="${BASH_REMATCH[6]}" - echo "::$type file=$file,line=$line,col=$col,endLine=$end_line,endColumn=$end_col::$msg_" >> $tmp_log_file - fi - - if [[ "$type" == "warning" ]]; then - warn=1 - elif [[ "$type" == "error" ]]; then - fail=1 - fi - elif [[ "$row" =~ $regex1 ]]; then - file=$(echo ${BASH_REMATCH[1]} | xargs) - msg_="${BASH_REMATCH[6]}" - - if [[ -z "${BASH_REMATCH[2]}" ]]; then - echo "::error file=$file,line=0::$msg_" - else - line="${BASH_REMATCH[3]}" - col="${BASH_REMATCH[4]}" - end_col="${BASH_REMATCH[5]}" - echo "::error file=$file,line=$line,col=$col,endColumn=$end_col::$msg_" >> $tmp_log_file - fi - fi - done) ; err=${PIPESTATUS[1]} - - if [[ $err -ne 0 ]]; then - fail=1 - fi - - sort -u $tmp_log_file - rm $tmp_log_file - - _set_step_warn $warn - return $fail -} - -compile_many_devicetrees() { - export step_name="compile_many_devicetrees" - local exceptions_file="ci/travis/dtb_build_test_exceptions" - local err=0 - local dtb_file= - local dts_files="" - - if [[ -z "$ARCHS" ]]; then - echo "::error ::$step_name: ARCHS list is not set." - return 1 - fi - if [[ -z "$DTS_FILES" ]]; then - echo "::error ::$step_name: DTS_FILES glob rules are not set." - return 1 - fi - - dts_files=$DTS_FILES - if [[ -f $exceptions_file ]]; then - dts_files=$(comm -13 <(sort $exceptions_file) <(echo $dts_files | tr ' ' '\n' | sort)) - fi - for ARCH in $ARCHS; do - dts_files_=$(echo $dts_files | tr ' ' '\n' | grep ^arch/$ARCH/ | sed 's/dts\//=/g' | cut -d'=' -f2 | sed 's/\.dts\>/.dtb/') - ARCH=$ARCH make allnoconfig - ARCH=$ARCH make -k -j$(nproc) $dts_files_ || err=$? - done - - return $err -} - -compile_kernel() { - export step_name="kernel" - local tmp_log_file=/dev/shm/$run_id.ci_compile_kernel.log - local err=0 - local regex='^[[:alnum:]/._-]+:[[:digit:]]+:[[:digit:]]+: .*$' - local fail=0 - local warn=0 - local msg= - - # At this step, we only problem match if it exits with an error code - # because we don't want duplicated errors/warnings on sparse, - # neither warnings unrelated to the patch, but if the kernel - # does not even compile, the checkers don't run and the reason - # is at this step. - - echo "$step_name" - - echo > $tmp_log_file - yes n 2>/dev/null | \ - make -j$(nproc) 2>&1 | \ - (while IFS= read -r row; do - echo $row - if [[ "$row" =~ $regex ]]; then - if [[ "$found" == "1" ]]; then - echo $msg >> $tmp_log_file - msg= - fi - - found=0 - IFS=':' read -r -a list <<< "$row" - - file=$(echo ${list[0]} | xargs) - line=${list[1]} - col=${list[2]} - type=$(echo ${list[3]} | xargs) - msg_=${list[4]} - - if [[ "$type" == "warning" ]]; then - warn=1 - elif [[ "$type" == "error" ]]; then - fail=1 - fi - - if [[ ! "$type" == "note" ]]; then - found=1 - msg="::$type file=$file,line=$line,col=$col::$step_name: $msg_" - fi - - else - if [[ $found == "1" ]]; then - msg=${msg}$_n${row} - fi - fi - done) ; err=${PIPESTATUS[1]} - - if [[ $found == "1" ]]; then - echo $msg >> $tmp_log_file - fi - - if [[ $err -ne 0 ]]; then - while read -r line; do - echo $line - done <$tmp_log_file - fail=1 - fi - rm $tmp_log_file - - python3.11 scripts/clang-tools/gen_compile_commands.py - - _set_step_warn $warn - return $fail -} - -compile_kernel_sparse() { - export step_name="kernel_sparse" - local files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha) - local err=0 - local regex='^[[:alnum:]/._-]+:[[:digit:]]+:[[:digit:]]+: .*$' - local fail=0 - local warn=0 - - echo "$step_name (C=1)" - - [[ -z "$files" ]] && return 0 - touch $files - yes n 2>/dev/null | \ - make -j$(nproc) C=1 $EXTRA_FLAGS 2>&1 | \ - (while IFS= read -r row; do - if [[ "$row" =~ $regex ]]; then - if [[ "$found" == "1" ]]; then - echo $msg - msg= - fi - - found=0 - IFS=':' read -r -a list <<< "$row" - - file=$(echo ${list[0]} | xargs) - line=${list[1]} - col=${list[2]} - type=$(echo ${list[3]} | xargs) - msg_=${list[4]} - - if [[ "$type" == "warning" ]]; then - warn=1 - elif [[ "$type" == "error" ]]; then - fail=1 - fi - - if [[ "$type" == "note" ]]; then - echo $row - else - found=1 - msg="::$type file=$file,line=$line,col=$col::$step_name: $msg_" - fi - - else - if [[ $found == "1" ]]; then - msg=${msg}$_n${row} - else - echo $row - fi - fi - done) ; err=${PIPESTATUS[1]} - - if [[ $found == "1" ]]; then - echo $msg - fi - - if [[ $err -ne 0 ]]; then - fail=1 - fi - - _set_step_warn $warn - return $fail -} - -compile_kernel_smatch() { - export step_name="kernel_smatch" - local files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha) - local err=0 - local regex='^([[:alnum:]/._-]+):([[:digit:]]+) (.*) ([[:alpha:]]+): (.*)$' - local fail=0 - local warn=0 - - echo "$step_name (C=1)" - - [[ -z "$files" ]] && return 0 - touch $files - if ! command -v smatch 2>&1 >/dev/null ; then - if [[ ! -f /tmp/smatch/smatch ]]; then - pushd /tmp - rm -rf smatch - git clone https://repo.or.cz/smatch.git smatch --depth=1 || (smatch_error=true ; true) && ( - cd smatch - make -j$(nproc) || (smatch_error=true ; true) - ) - popd - fi - - alias smatch=/tmp/smatch/smatch - fi - - if [[ "$smatch_error" == "true" ]]; then - echo "::error ::$step_name: Fetching or compiling smatch failed, so the step was skipped." - _set_step_warn '1' - return 0; - fi - - yes n 2>/dev/null | \ - make -j$(nproc) C=1 CHECK="smatch -p=kernel" $EXTRA_FLAGS | \ - (while IFS= read -r row; do - if [[ "$row" =~ $regex ]]; then - - IFS=':' read -r -a list <<< "$row" - - file=${BASH_REMATCH[1]} - line=${BASH_REMATCH[2]} - type=${BASH_REMATCH[4]} - msg_=${BASH_REMATCH[5]} - - if [[ "$type" == "warn" ]]; then - type="warning" - warn=1 - elif [[ "$type" == "error" ]]; then - fail=1 - fi - - if [[ "$type" == "error" ]] || [[ "$type" == "warning" ]]; then - echo "::$type file=$file,line=$line::$step_name: $msg_" - else - echo $row - fi - - else - if [[ $found == "1" ]]; then - msg=${msg}$_n${row} - else - echo $row - fi - fi - done) ; err=${PIPESTATUS[1]} - - if [[ $err -ne 0 ]]; then - fail=1 - fi - - _set_step_warn $warn - return $fail -} - -compile_gcc_fanalyzer () { - export step_name="gcc_fanalyzer" - local exceptions_file="ci/travis/deadcode_exceptions" - local files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha -- '**/*.c') - local regex='^[[:alnum:]/._-]+:[[:digit:]]+:[[:digit:]]+: .*$' - local mail= - local warn=0 - - echo "recompile with gcc fanalyzer flag on range $base_sha..$head_sha" - - if [[ ! -f "compile_commands.json" ]]; then - echo "::error ::$step_name: compile_commands.json does not exist." - return 1 - fi - - if [[ -f $exceptions_file ]]; then - files=$(comm -13 <(sort $exceptions_file) <(echo $files | tr ' ' '\n' | sort)) - fi - [[ -z "$files" ]] && return 0 - while read file; do - abs_file=$(realpath .)/$file - compile_cmd=$(jq ".[] | select(.file == \"$abs_file\") | - .command" compile_commands.json | - sed 's/^"//;s/"$//g' | - sed 's/='\''\\"/=\\"/g;s/\\"'\''/\\"/g') - if [[ -z "$compile_cmd" ]]; then - echo "::error file=$file,line=0::$step_name: Failed to get compile command from compile_commands.json" - warn=1 - continue - fi - - echo -e "\e[1m$file\e[0m" - compile_cmd=$(printf "$compile_cmd -fanalyzer") - mail=$($compile_cmd 2>&1 || ( - echo "::error file=$file,line=0::$step_name: Exited with code '$?'" ; true) - ) - found=0 - msg= - - while read -r row - do - if [[ "$row" =~ $regex ]]; then - if [[ "$found" == "1" ]]; then - echo $msg - msg= - fi - - found=0 - IFS=':' read -r -a list <<< "$row" - - file=$(echo ${list[0]} | xargs) - line=${list[1]} - col=${list[2]} - type=$(echo ${list[3]} | xargs) - msg_=${list[4]} - - if [[ "$type" == "note" ]]; then - echo $row - else - warn=1 - found=1 - msg="::$type file=$file,line=$line,col=$col::gcc_fanalayzer: $msg_" - fi - - else - if [[ $found == "1" ]]; then - msg=${msg}$_n${row} - else - echo $row - fi - fi - - done <<< "$mail" - - if [[ "$found" == "1" ]]; then - echo $msg - fi - - done <<< "$files" - - _set_step_warn $warn - return 0 -} - -compile_clang_analyzer () { - export step_name="clang_analyzer" - local files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha -- '**/*.c') - local regex='^[[:alnum:]/._-]+:[[:digit:]]+:[[:digit:]]+: .*$' - local mail= - local fail=0 - local warn=0 - - echo "$step_name on range $base_sha..$head_sha" - - if [[ ! -f "compile_commands.json" ]]; then - echo "::error ::$step_name: compile_commands.json does not exist." - return 1 - fi - [[ -z "$files" ]] && return 0 - while read file; do - abs_file=$(realpath .)/$file - compile_cmd=$(jq ".[] | select(.file == \"$abs_file\") | - .command" compile_commands.json | - sed 's/^"//;s/"$//g' | - sed 's/='\''\\"/=\\"/g;s/\\"'\''/\\"/g') - if [[ -z "$compile_cmd" ]]; then - echo "::error file=$file,line=0::$step_name: Failed to get compile command from compile_commands.json" - fail=1 - continue - fi - - echo -e "\e[1m$file\e[0m" - compile_cmd=$(printf "$compile_cmd --analyze -Xanalyzer -analyzer-output=text") - mail=$($compile_cmd 2>&1 || ( - echo "::error file=$file,line=0::$step_name: Exited with code '$?'" ; true) - ) - found=0 - msg= - - while read -r row - do - if [[ "$row" =~ $regex ]]; then - if [[ "$found" == "1" ]]; then - echo $msg - msg= - fi - - found=0 - IFS=':' read -r -a list <<< "$row" - - file=$(echo ${list[0]} | xargs) - line=${list[1]} - col=${list[2]} - type=$(echo ${list[3]} | xargs) - msg_=${list[4]} - - if [[ "$type" == "note" ]]; then - echo $row - else - if [[ "$type" == "error" ]]; then - fail=1 - else - warn=1 - fi - found=1 - msg="::$type file=$file,line=$line,col=$col::clang_analyzer: $msg_" - fi - - else - if [[ $found == "1" ]]; then - msg=${msg}$_n${row} - else - echo $row - fi - fi - - done <<< "$mail" - - if [[ "$found" == "1" ]]; then - echo $msg - fi - - done <<< "$files" - - _set_step_warn $warn - return $fail -} - -assert_compiled () { - export step_name="assert_compiled" - local exceptions_file="ci/travis/deadcode_exceptions" - local files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha -- '**/*.c') - local fail=0 - local error=" - At least one file was not compiled during kernel compilation - Either: - 1. ensure the Kconfig is able to enable it/them - OR - 2. remove deadcode - OR - 3. add it/them in file '$exceptions_file'" - - echo "$step_name were compiled on range $base_sha..$head_sha" - - if [[ ! -f "compile_commands.json" ]]; then - echo "::error ::$step_name: compile_commands.json does not exist." - return 1 - fi - - # Allows deadcode - if [[ -f $exceptions_file ]]; then - files=$(comm -13 <(sort $exceptions_file) <(echo $files | tr ' ' '\n' | sort)) - fi - [[ -z "$files" ]] && return 0 - while read file; do - echo -e "\e[1m$file\e[0m" - abs_file=$(realpath .)/$file - compile_cmd=$(jq ".[] | select(.file == \"$abs_file\") | - .command" compile_commands.json) - if [[ -z "$compile_cmd" ]]; then - echo "::error file=$file,line=0::$step_name: Was not compiled during kernel compilation." - fail=1 - fi - - done <<< "$files" - - if [[ "$fail" == "true" ]]; then - _fmt "::error ::$step_name: $error" - fi - - return $fail -} - -apply_prerun() { - export step_name="apply_prerun" - # Run cocci and bash scripts from ci/prerun - # e.g. manipulate the source code depending on run conditons or target. - local coccis=$(ls ci/prerun/*.cocci 2>/dev/null) - local bashes=$(ls ci/prerun/*.sh 2>/dev/null) - local files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha -- '**/*.c') - - echo "$step_name on range $base_sha..$head_sha" - [[ -z "$files" ]] && return 0 - if [[ ! -z "$coccis" ]]; then - while read cocci; do - echo "apply $cocci" - while read file; do - echo -e "\e[1m$cocci $file\e[0m" - spatch --sp-file $cocci --in-place $file - done <<< "$files" - done <<< "$coccis" - fi - - if [[ ! -z "$bashes" ]]; then - while read bashs; do - echo "apply $bashs" - while read file; do - echo -e "\e[1m$bashs $file\e[0m" - $bashs $file - done <<< "$files" - done <<< "$bashes" - fi -} - -auto_set_kconfig() { - export step_name="auto_set_kconfig" - local c_files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha -- '**/*.c') - local k_blocks=$(git show --diff-filter=ACM --no-renames $base_sha..$head_sha -- '**/Kconfig' '**/Kconfig.*') - declare -a o_files - - echo "$step_name on range $base_sha..$head_sha" - - while read file; do - o_files+=("$(echo $file | sed 's/c$/o/')") - done <<< "$c_files" - - local k_symbols=$(echo "$k_blocks" | awk -f ci/touched_kconfig.awk) - symbols=$(python3.11 ci/symbols_depend.py ${k_symbols[@]} "${o_files[@]}") - for sym in $symbols; do - scripts/config -e $sym - done - make yes2modconfig - - # Some drivers have known issues as modules - declare -a no_module_config=( - "CONFIG_UIO" - "CONFIG_FPGA" - "CONFIG_FPGA_MGR_ZYNQ_FPGA" - ) - for i in "${no_module_config[@]}"; do - sed -i "s/^$i=m/$i=y/" .config - done - - # We collect warnings and assert as the last ci step. - scripts/config -d WERROR - - return 0 -} - -set_arch () { - local version_gcc=14 - local version_llvm=19 - local arch_gcc=("gcc_arm" "gcc_aarch64" "gcc_x86") - local arch_llvm=("llvm_x86") - local arch=( "${arch_llvm[@]}" "${arch_gcc[@]}") - local fail=false - arch_="\<${1}\>" - if [[ -z "$1" ]]; then - printf "missing architecture" - fail=true - elif [[ "${arch[@]}" =~ $arch_ ]]; then - unset CXX - unset LLVM - unset ARCH - unset CROSS_COMPILE - - if [[ "${arch_gcc[@]}" =~ $arch_ ]]; then - export CXX=gcc-$version_gcc - case $1 in - gcc_arm) - export CROSS_COMPILE=arm-suse-linux-gnueabi- - export ARCH=arm - ;; - gcc_aarch64) - export CROSS_COMPILE=aarch64-suse-linux- - export ARCH=arm64 - ;; - gcc_x86) - export ARCH=x86 - ;; - esac - which ${CROSS_COMPILE}${CXX} 1>/dev/null - elif [[ "${arch_llvm[@]}" =~ $arch_ ]]; then - export LLVM=-$version_llvm - case $1 in - llvm_x86) - export ARCH=x86 - ;; - esac - which ${CROSS_COMPILE}clang${LLVM} 1>/dev/null - fi - else - printf "unknown architecture '$1'" - fail=true - fi - - if [[ "$fail" == "true" ]]; then - printf ", usage:\n" - echo " set_arch " - echo "available architectures: " - echo " ${arch[@]}" - else - printenv | grep -i '^LLVM=\|^CXX=\|^ARCH=\|^CROSS_COMPILE=' - fi -} - -set_step_warn () { - echo ; echo "step_warn_$1=true" >> "$GITHUB_ENV" -} - -set_step_fail () { - echo ; echo "step_fail_$1=true" >> "$GITHUB_ENV" -} - -_set_step_warn () { - if [[ "$1" == "1" ]]; then - set_step_warn "$step_name" - fi -} - -_set_step_fail () { - if [[ ! -z "$step_name" ]]; then - set_step_fail "$step_name" - unset step_name - fi -} - -trap '_set_step_fail' ERR diff --git a/ci/install-compilers.sh b/ci/install-compilers.sh deleted file mode 100644 index 39654f74fd3f91..00000000000000 --- a/ci/install-compilers.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -e - -zypper addrepo -c http://download.opensuse.org/distribution/leap/16.0/repo/oss leap-16.0-repo-oss -zypper refresh - -#core, linux, linux gcc, linux clang, arm, aarch64, linux checks -zypper install -y --no-recommends \ - git \ - libncurses6 swig bc u-boot-tools flex bison tar kmod xz gawk diffutils \ - gcc14 libelf1 libelf-devel \ - clang19 llvm19 lld19 \ - cross-arm-gcc14 \ - cross-aarch64-gcc14-bootstrap \ - sparse coccinelle ocaml ocaml-findlib cppcheck python311 python311-pip python311-devel - -update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 50 -update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-14 50 diff --git a/ci/install-deps.sh b/ci/install-deps.sh deleted file mode 100644 index e6d88477d31345..00000000000000 --- a/ci/install-deps.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -e - -#core, gh-actions -zypper install -y --no-recommends \ - update-alternatives \ - which wget make openssl openssl-devel ca-certificates ca-certificates-mozilla \ - nodejs npm-default - -update-ca-certificates diff --git a/ci/install-extra.sh b/ci/install-extra.sh deleted file mode 100644 index 89b94d288d4f1e..00000000000000 --- a/ci/install-extra.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# for: build-doc-* - -set -e - -# linux checks -zypper install -y --no-recommends \ - sqlite3-devel - -git clone https://repo.or.cz/smatch.git smatch --depth=1 -cd smatch -make -j$(nproc) - -ln -s $(realpath smatch) /usr/local/bin/smatch diff --git a/ci/maintenance.sh b/ci/maintenance.sh deleted file mode 100644 index 69a01b494ec663..00000000000000 --- a/ci/maintenance.sh +++ /dev/null @@ -1,53 +0,0 @@ -sync_branches () { - local fail_ - local fail=0 - local initial_branch= - - echo "sync_branches_with_main on range $base_sha..$head_sha" - - if [[ "$fetch_depth_fallback" ]]; then - echo "cannot sync from force push" - set_step_fail "sync_branches" - return - fi - initial_branch=$(git rev-parse --abbrev-ref @) - for branch in $@ ; do - echo "patching branch $branch" - git switch -d - git fetch origin $branch:$branch --depth=1 -f || continue # skip on missing ref - git switch $branch - - range=$(($(git rev-list --count $base_sha..$head_sha) - 1 )) - for (( iter=$range; iter >= 0; iter-- )); do - fail_=0 - commit=$(git rev-parse $head_sha~$iter) - # check if merge commit, and choose parent if so - git rev-parse $commit^2 2>/dev/null && - merge="-m 1"|| merge="" - git cherry-pick --allow-empty --empty=keep $merge $commit 1>/dev/null || fail_=1 - if [[ "$fail_" == "1" ]]; then - git cherry-pick --abort - break - fi - done - if [[ "$fail_" == "1" ]]; then - printf "failed to cherry-pick at $commit" - fail=1 - break - fi - git push origin HEAD:$branch - done - git switch $initial_branch - - if [[ "$fail" == "1" ]]; then - set_step_fail "sync_branches" - fi -} - -set_step_warn () { - echo ; echo "step_warn_$1=true" >> "$GITHUB_ENV" -} - -set_step_fail () { - echo ; echo "step_fail_$1=true" >> "$GITHUB_ENV" -} diff --git a/ci/runner_env.sh b/ci/runner_env.sh deleted file mode 100644 index a00deb59ade53f..00000000000000 --- a/ci/runner_env.sh +++ /dev/null @@ -1,26 +0,0 @@ -export_labels () { - echo "warn=$(printenv | grep ^step_warn_ | grep -v =$ | tr '\n' ',' | sed 's/,$//')" >> "$GITHUB_OUTPUT" - echo "fail=$(printenv | grep ^step_fail_ | grep -v =$ | tr '\n' ',' | sed 's/,$//')" >> "$GITHUB_OUTPUT" -} - -assert_labels () { - local msg="Errors and warnings are annotated on the changed files, in each job step, as well as aggregated on the Summary page.%0ASome messages may not cause the step to fail, but still need to be checked." - warn=$(printenv | grep ^job_warn_ | grep -v =$ | tr '\n' ';' | \ - sed -E -e 's/;/%0A/g' -e 's/\=true(,)?/%0A /g' -e 's/=/:%0A /g' -e 's/(job|step)_(fail|warn)_//g') - fail=$(printenv | grep ^job_fail_ | grep -v =$ | tr '\n' ';' | \ - sed -E -e 's/;/%0A/g' -e 's/\=true(,)?/%0A /g' -e 's/=/:%0A /g' -e 's/(job|step)_(fail|warn)_//g') - - if [[ ! -z "$fail" ]]; then - if [[ ! -z "$warn" ]]; then - echo "::error::Some jobs didn't pass strict checks:%0A$fail%0AAnd non-strict checks:%0A$warn%0A$msg" - else - echo "::error::Some jobs didn't pass strict checks:%0A$fail%0A$msg" - fi - exit 1 - else - if [[ ! -z "$warn" ]]; then - warn=%0A$(echo $warn | tr '\n' ';' | sed 's/;/%0A/g') - echo "::warning::Some jobs didn't pass non-strict checks:%0A$warn" - fi - fi -} diff --git a/ci/symbols_depend.py b/ci/symbols_depend.py deleted file mode 100644 index ea85e1ad63398f..00000000000000 --- a/ci/symbols_depend.py +++ /dev/null @@ -1,405 +0,0 @@ -#!/usr/bin/env python3 -# SPDX-License-Identifier: GPL-2.0-only -# -# Copyright (C) 2025 Analog Devices Inc. - -from sys import argv, stderr -from os import path, getcwd -from glob import glob -import re - -debug = False -debug_blocks = False - -symbols_ = set() -deps_ = set() -map_ = {} -max_recursion = 500 - - -def generate_map(): - """ - Build a map with all symbols. - """ - glob_ = path.join('**', 'Kconfig') - kconfig = glob(glob_, recursive=True) - for k in kconfig: - stack = [] - with open(k) as f: - lines = f.readlines() - for line in lines: - line = line.strip() - if line.startswith('config '): - stack.append(line[7:].strip()) - elif line.startswith('menuconfig '): - stack.append(line[11:].strip()) - - map_[path.dirname(k)] = set(stack) - - -def get_all_parent_kconfigs(start_dir): - """ - Walk directory tree after Kconfig files. - """ - kconfig = path.abspath(start_dir) - kconfigs = [] - while True: - kconfig_path = path.join(kconfig, 'Kconfig') - if path.isfile(kconfig_path): - kconfigs.append(kconfig_path) - new_path = path.dirname(kconfig) - if new_path == kconfig: - break - kconfig = new_path - return kconfigs - - -def track_if_blocks(symbol, target_kconfig): - """ - Looks for the symbol or the source kconfig that includes the symbol. - Return list of 'if' that hides symbol. - """ - if_blocks = [] - target_abs = path.abspath(target_kconfig) - - for kconfig in get_all_parent_kconfigs(path.dirname(target_kconfig)): - if debug: - print(f"{target_kconfig}: Tracking if blocks at '{kconfig}' for symbol '{symbol}'", - file=stderr) - with open(kconfig, 'r') as f: - lines = f.readlines() - - stack = [] - for line in lines: - line_ = line.strip() - if line.startswith('if '): - stack.append(line[3:].strip()) - elif line_.startswith('endif'): - if stack: - stack.pop() - elif line_.startswith('source') and line_.endswith('Kconfig"'): - m = re.search(r'"([^"]+)"', line) - if m: - src_path = path.normpath(path.join(getcwd(), m.group(1))) - if path.abspath(src_path) == target_abs: - if_blocks += stack - break - elif re.match(rf'(menu)?config\s+{symbol}\b', line.strip()): - if_blocks += stack - break - - return if_blocks - - -def find_symbol_block(symbol, kconfig_path): - if debug: - print(f"{kconfig_path}: Looking for symbol '{symbol}'", file=stderr) - with open(kconfig_path) as f: - lines = f.readlines() - - block = [] - in_block = False - for line in lines: - if in_block: - if not re.match(r'^(?:\s+|\s*$)', line): - break - block.append(line) - elif re.match(rf'(menu)?config\s+{symbol}\b', line.strip()): - in_block = True - block = [line] - if debug: - print(f"{kconfig_path}: Found '{symbol}'", file=stderr) - return ''.join(block) if block else None - - -def filter_symbols(symbols): - """ - Remove architecture symbols. - """ - archs = ['ARM', 'ARM64', 'M68K', 'RISCV', 'SUPERH', 'X86', 'X86_32', - 'XTENSA'] - return {sym - for sym in symbols - if not sym.startswith('ARCH_') and sym not in archs - and not sym.startswith('CPU_')} - - -def extract_tristate(kconfig_path, symbol, symbol_block): - """ - If a symbol is a tristate, look for symbols that selects it in the same - kconfig. - """ - tristate = re.findall(r'tristate', symbol_block) - if not tristate: - return [] - - if debug: - print(f"{kconfig_path}: Looking for block that selects '{symbol}'", - file=stderr) - with open(kconfig_path) as f: - lines = f.readlines() - - deps = [] - block = [] - in_block = False - c_symbol = None - for line in lines: - if in_block: - if not re.match(r'^(?:\s+|\s*$)', line): - in_block = False - block = [] - else: - match = re.match(rf'select\s+{symbol}\b', line.strip()) - if match: - if debug: - print(f"{kconfig_path}: {c_symbol} selects {symbol}", - file=stderr) - deps.append(c_symbol) - block.append(line) - else: - match = re.match(r'(?:menu)?config\s+(.+)\b', line.strip()) - if match: - c_symbol = match.group(1) - in_block = True - block = [line] - - return deps - - -def extract_dependencies(symbol_block, if_blocks): - depends = re.findall(r'depends on\s+(.+)', symbol_block) - all_conds = depends + if_blocks - joined = ' && '.join(all_conds) - if joined == '': - return [] - deps = sorted(set(re.split(r'\s*(?:&&|\|\|)\s*', joined))) - deps = {sym.replace('(', '').replace(')', '') for sym in deps} - deps = {sym[:-2] if sym.endswith('=y') else sym - for sym in deps - if not sym.endswith('=n') and not sym.startswith('!')} - return deps - - -def get_symbol_dependencies(symbol, path_to_kconfig_dir): - kconfig_file = path.join(path_to_kconfig_dir, 'Kconfig') - if_blocks = track_if_blocks(symbol, kconfig_file) - block = find_symbol_block(symbol, kconfig_file) - if not block: - print(f"Symbol {symbol} not found in {kconfig_file}", file=stderr) - return [] - if debug and debug_blocks: - print(block, file=stderr) - deps = [] - deps.extend(extract_tristate(kconfig_file, symbol, block)) - deps.extend(extract_dependencies(block, if_blocks)) - return filter_symbols(deps) - - -def get_top_level_kconfig(symbol): - found = False - for kconfig in map_: - if symbol in map_[kconfig]: - found = True - break - if not found: - print(f"Failed to find kconfig with {symbol}", file=stderr) - return kconfig if found else None - - -def resolve_tree(symbol, path): - global max_recursion - - max_recursion = max_recursion - 1 - deps = get_symbol_dependencies(symbol, path) - for s in deps: - if s not in deps_: - kconfig = get_top_level_kconfig(s) - if kconfig: - if max_recursion: - resolve_tree(s, kconfig) - deps_.add(s) - - -def get_top_level_symbol_for(mk): - """ - From a obj-y, lib-y, at - linux/drivers/pinctrl/Makefile - - Look at linux/drivers/Makefile for - pinctrl/ - """ - obj = f"{path.basename(path.dirname(mk))}/" - mk = path.join(path.dirname(path.dirname(mk)), "Makefile") - if not path.isfile(mk): - return (None, None) - - with open(mk, "r") as file: - lines = file.readlines() - file_ = [] - buffer = "" - for line in lines: - buffer += line.rstrip('\n') - if line.endswith('\\\n'): - continue - file_.append(buffer) - buffer = "" - - for line in file_: - if obj not in line: - continue - - # obj-$(CONFIG_SYMBOL) - match = re.search(r'obj-\$\(([^)]+)\)\s*[+:]?=', line) - if match: - return (match.group(1), None) - - return (None, None) - - -def get_makefile_symbol_and_obj(mk, obj, l_obj): - """ - Get Kconfig symbol and obj, example: - - driver-y += devices/driver/public/src/driver_extra.o - driver-objs += some_obj.o - driver-$(CONFIG_OF) += driver_of.o - obj-$(CONFIG_DRIVER) += driver.o - - Resolution: - - driver_of.o -> ("CONFIG_OF", "driver") - driver_extra.o -> (None, "driver") - driver.o -> ("CONFIG_DRIVER", None) - - """ - if obj == l_obj: - print(f"{mk}: Infinite recursion for '{obj}' detected", file=stderr) - return (None, None) - if debug: - print(f"{mk}: Looking for '{obj}'", file=stderr) - - with open(mk, "r") as file: - lines = file.readlines() - file_ = [] - buffer = "" - for line in lines: - buffer += line.rstrip('\n') - if line.endswith('\\\n'): - continue - file_.append(buffer) - buffer = "" - - for line in file_: - if obj not in line: - continue - - # obj-$(CONFIG_SYMBOL) - match = re.search(r'obj-\$\(([^)]+)\)\s*[+:]?=', line) - if match: - return (match.group(1), None) - - # obj-y - match = re.search(r'(obj|lib)-y\s*[+:]?=', line) - if match: - return get_top_level_symbol_for(mk) - - # driver-$(CONFIG_SYMBOL) - match = re.search(r'([-\w\d]+)-\$\(([^)]+)\)\s*[+:]?=', line) - if match: - return (match.group(2), match.group(1)) - - # driver-y - match = re.search(r'([-\w\d]+)-(y|objs)\s*[+:]?=', line) - if match: - if match.group(1) == obj[:-2]: - # mconf-objs := mconf.o - return (None, None) - else: - return (None, match.group(1)) - - return (None, None) - - -def _get_symbols_from_mk(mk, obj, l_obj): - """ - Exhaust Makefile until no object and no symbol. - If returns False, the parent method will proceed to search on ../Makefile, - if True, the obj was fully resolved into symbols - """ - global symbols_ - - l_obj_ = obj - symbol, obj = get_makefile_symbol_and_obj(mk, obj, l_obj) - if not symbol and not obj: - return False - if symbol: - if not symbol.startswith("CONFIG_"): - print(f"Symbol '{symbol}' does not start with 'CONFIG_' at 'mk'", - file=stderr) - symbols_.add(symbol[7:]) - if not obj: - return True - - return _get_symbols_from_mk(mk, f"{obj}.o", l_obj_) - - -def get_symbols(files): - """ - Resolve the base symbols for .o targets. - If it is a symbol already, just add it. - """ - global symbols_ - - for f in files: - if f == "": - continue - if not f.endswith(".o"): - symbols_.add(f) - continue - - found = False - base = path.basename(f) - ldir = path.dirname(f) - rdir = "" - while ldir != "": - mk = path.join(ldir, "Makefile") - if path.isfile(mk): - if _get_symbols_from_mk(mk, path.join(rdir, base), None): - found = True - break - - rdir = path.join(path.basename(ldir), rdir) - ldir = path.dirname(ldir) - if not found: - print(f"Failed to find Makefile targeting {f}", file=stderr) - - -def main(): - """ - Resolve dependencies of a symbol based on symbols and .o target. - usage: - - symbols=$(ci/symbols_depend.py [SYMBOLS] [O_FILES]) - - """ - argv.pop(0) - get_symbols(set(argv)) - print("Symbols of touched files:", file=stderr) - print(symbols_, file=stderr) - generate_map() - for s in symbols_: - if s not in deps_: - kconfig = get_top_level_kconfig(s) - if kconfig and max_recursion: - resolve_tree(s, kconfig) - deps_.add(s) - - if not max_recursion: - print("Max allowed recursion call reached", file=stderr) - symbols__ = filter_symbols(deps_) - print("Resolved symbols:", file=stderr) - print(symbols__, file=stderr) - print(' '.join(symbols__)) - - -main() diff --git a/ci/touched_kconfig.awk b/ci/touched_kconfig.awk deleted file mode 100644 index 3b2e5869247f8f..00000000000000 --- a/ci/touched_kconfig.awk +++ /dev/null @@ -1,61 +0,0 @@ -function push(sym){ - if(!(sym in seen)){ - seen[sym]=1 - order[++n]=sym - } -} - -BEGIN{ - inK=0 - curr="" -} - -/^diff --git /{ - inK=0 - curr="" - next -} - -/^\+\+\+ b\//{ - path=substr($0,7) - inK=1 - curr="" - next -} - -!inK { next } - -/^@@ /{ - curr="" - if (match($0, /config[ \t]+([A-Za-z0-9_]+)/, m)) { - curr=m[1] - } - next -} - -{ - line=$0 - prefix=substr(line,1,1) - text=substr(line,2) - - if (prefix==" " || prefix=="+" || prefix=="-") { - # (menu)?config - if (match(text, /^[ \t]*(menu)?config[ \t]+([A-Za-z0-9_]+)/, m)) { - curr=m[2] - if (prefix=="+") { push(curr) } - next - } - # internal to config block - if ((prefix=="+" || prefix=="-") && curr!="") { - push(curr) - next - } - } -} - -END{ - for (i=1; i<=n; i++) { - printf "%s%s", order[i], (i/dev/null 2>&1 -} - -ensure_command_exists() { - local cmd="$1" - local package="$2" - [ -n "$cmd" ] || return 1 - [ -n "$package" ] || package="$cmd" - ! command_exists "$cmd" || return 0 - # go through known package managers - for pacman in apt-get brew yum ; do - command_exists $pacman || continue - $pacman install -y $package || { - # Try an update if install doesn't work the first time - $pacman -y update && \ - $pacman install -y $package - } - return $? - done - return 1 -} - -ensure_command_exists wget -ensure_command_exists sudo - -LOCAL_BUILD_DIR="patches-build" -FULL_BUILD_DIR="${TRAVIS_BUILD_DIR}/${LOCAL_BUILD_DIR}" - -# Get the common stuff from libiio -[ -f "${FULL_BUILD_DIR}/lib.sh" ] || { - mkdir -p "${FULL_BUILD_DIR}" - wget https://raw.githubusercontent.com/analogdevicesinc/libiio/main/CI/travis/lib.sh \ - -O "${FULL_BUILD_DIR}/lib.sh" -} - -. "${FULL_BUILD_DIR}/lib.sh" diff --git a/ci/travis/prepare_artifacts.sh b/ci/travis/prepare_artifacts.sh deleted file mode 100755 index 7fe2052808b134..00000000000000 --- a/ci/travis/prepare_artifacts.sh +++ /dev/null @@ -1,125 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -#!/bin/bash -e - -TIMESTAMP=$(date +%Y_%m_%d-%H_%M_%S) -# For PRs, Azure makes a merge commit (HEAD) because of the shallow copy option -# (which we want). So, GIT_SHA in this case is the actual correct commit inside -# the PR, and MERGE_COMMIT is the commit made by Azure (which we extract the date -# from) -echo "$SYSTEM_PULLREQUEST_TARGETBRANCH" -if [[ "$SYSTEM_PULLREQUEST_SOURCECOMMITID" != "" ]]; then - GIT_SHA=$SYSTEM_PULLREQUEST_SOURCECOMMITID -else - GIT_SHA=$BUILD_SOURCEVERSION -fi -MERGE_COMMIT_SHA=$(git rev-parse --short HEAD) -GIT_SHA_DATE=$(git show -s --format=%cd --date=format:'%Y-%m-%d %H:%M' ${MERGE_COMMIT_SHA} | sed -e "s/ \|\:/-/g") -SERVER_PATH="linux/" -if [ "$SYSTEM_PULLREQUEST_TARGETBRANCH" != "" ]; then - BRANCH_NAME="$SYSTEM_PULLREQUEST_TARGETBRANCH" - SERVER_PATH+="PRs/" -else - BRANCH_NAME="$(echo $BUILD_SOURCEBRANCH | awk -F'/' '{print $NF}')" -fi - -set_artifactory_path() { - if [ "$SYSTEM_PULLREQUEST_TARGETBRANCH" != "" ]; then - SERVER_PATH+="$BRANCH_NAME/pr_$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER" - else - if [ "$BRANCH_NAME" == "main" ]; then - SERVER_PATH+="main" - else - SERVER_PATH+="releases/$BRANCH_NAME" - fi - fi -} - -create_extlinux() { - local platform=$1 - - touch extlinux.conf - if [ "${platform}" == "arria10" ]; then - dtb_name="socfpga_arria10_socdk_sdmmc.dtb" - else - dtb_name="socfpga.dtb" - fi - - echo "LABEL Linux Default" > extlinux.conf - echo " KERNEL ../zImage" >> extlinux.conf - echo " FDT ../${dtb_name}" >> extlinux.conf - echo " APPEND root=/dev/mmcblk0p2 rw rootwait earlyprintk console=ttyS0,115200n8" >> extlinux.conf -} - -# Prepare the structure of the folder containing artifacts -artifacts_structure() { - cd ${SOURCE_DIRECTORY} - - # Create folder to be uploaded - mkdir ${TIMESTAMP} - - # Generate properties file - echo "git_branch=${BUILD_SOURCEBRANCHNAME}" >> ${TIMESTAMP}/git_properties.txt - echo "git_sha=${GIT_SHA}" >> ${TIMESTAMP}/git_properties.txt - echo "git_sha_date=${GIT_SHA_DATE}" >> ${TIMESTAMP}/git_properties.txt - - declare -A typeARCH - typeARCH=( ["arm"]="arria10 cyclone5 zynq" - ["arm64"]="versal zynqmp" - ["microblaze"]="kc705 kcu105 vc707 vcu118 vcu128" ) - - declare -A image_to_copy - image_to_copy=( ["arria10"]="socfpga_adi_defconfig/zImage" - ["cyclone5"]="socfpga_adi_defconfig/zImage" - ["zynq"]="zynq_xcomm_adv7511_defconfig/uImage" - ["versal"]="adi_versal_defconfig/Image" - ["zynqmp"]="adi_zynqmp_defconfig/Image" ) - - for arch in "${!typeARCH[@]}"; do - mkdir ${TIMESTAMP}/${arch} - for platform in ${typeARCH[$arch]}; do - # First copy kernels and make extlinux files. - if [ "${arch}" != "microblaze" ]; then - image_location="${TIMESTAMP}/${arch}/${platform}" - mkdir ${image_location} - if [ "${platform}" == "arria10" ] || [ "${platform}" == "cyclone5" ]; then - create_extlinux ${platform} - cp ./extlinux.conf ${image_location} - fi - echo "IMAGE: ${image_to_copy[${platform}]}!" - cp ${image_to_copy[${platform}]} ${image_location} - fi - - if [ "${arch}" == "microblaze" ]; then - dtbs_to_copy=$(ls -d -1 Microblaze/*) - else - dtbs_to_copy=$(ls -d -1 DTBs/* | grep "${platform}[-|_]") - fi - - # Copy DTBs to the correct location - for dtb in ${dtbs_to_copy}; do - cp ${dtb} "${TIMESTAMP}/${arch}" - done - done - done -} - -#### Start -artifacts_structure -set_artifactory_path -python3 ../ci/travis/upload_to_artifactory.py \ - --base_path="${ARTIFACTORY_PATH}" \ - --server_path="${SERVER_PATH}" \ - --local_path="${TIMESTAMP}" \ - --props_level="2" \ - --properties="git_sha=${GIT_SHA};commit_date=${TIMESTAMP}" \ - --token="${ARTIFACTORY_TOKEN}" \ - --log_file="upload_to_artifactory.log" - -# Set these Azure env vars to be used later in the pipeline -echo "##vso[task.setvariable variable=TIMESTAMP;isOutput=true]${TIMESTAMP}" -echo "##vso[task.setvariable variable=BRANCH;isOutput=true]${BRANCH_NAME}" -if [ "$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER" != "" ]; then - echo "##vso[task.setvariable variable=PR_ID;isOutput=true]$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER" -else - echo "##vso[task.setvariable variable=PR_ID;isOutput=true]commit" -fi diff --git a/ci/travis/prepare_artifacts_rpi.sh b/ci/travis/prepare_artifacts_rpi.sh deleted file mode 100755 index 604aeb6562f0e9..00000000000000 --- a/ci/travis/prepare_artifacts_rpi.sh +++ /dev/null @@ -1,121 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -#!/bin/bash -e - -timestamp=$(date +%Y_%m_%d-%H_%M) -GIT_SHA=$(git rev-parse --short HEAD) -GIT_SHA_DATE=$(git show -s --format=%cd --date=format:'%Y-%m-%d %H:%M' ${GIT_SHA} | sed -e "s/ \|\:/-/g") - -#create version file found in the boot partition -create_version_file() { - mkdir -p ${timestamp}/${1} - echo -e "RPI Boot Files: ${BUILD_SOURCEBRANCH} ${GIT_SHA_DATE}\n" > ${SOURCE_DIRECTORY}/${timestamp}/${1}/version_rpi.txt - echo -e " Linux repository: https://github.com/analogdevicesinc/linux" >> ${SOURCE_DIRECTORY}/${timestamp}/${1}/version_rpi.txt - echo -e " Linux branch: ${BUILD_SOURCEBRANCHNAME}" >> ${SOURCE_DIRECTORY}/${timestamp}/${1}/version_rpi.txt - echo -e " Linux git sha: ${GIT_SHA}\n" >> ${SOURCE_DIRECTORY}/${timestamp}/${1}/version_rpi.txt - echo -e "Supported RaspberryPi platforms:\n" >> ${SOURCE_DIRECTORY}/${timestamp}/${1}/version_rpi.txt - list=($2) - for platform in "${list[@]}"; do - echo " ${platform}" >> ${SOURCE_DIRECTORY}/${timestamp}/${1}/version_rpi.txt - done -} - -#prepare the structure of the folder containing artifacts -artifacts_structure() { - cd ${SOURCE_DIRECTORY} - mkdir ${timestamp} - - typeBCM_32bit=( "bcm2709" "bcm2711" "bcmrpi" ) - typeKERNEL_32bit=( "kernel7" "kernel7l" "kernel" ) - typeBCM_64bit=( "bcm2711" "bcm2712" ) - typeKERNEL_64bit=( "kernel8" "kernel_2712" ) - - mkdir ${timestamp}/32bit - create_version_file 32bit "${typeBCM_32bit[*]}" - for index in "${!typeBCM_32bit[@]}"; do - cd adi_"${typeBCM_32bit[$index]}"_arm_defconfig - mkdir modules - tar -xf rpi_modules.tar.gz -C modules - rm rpi_modules.tar.gz - mv ./zImage ./"${typeKERNEL_32bit[$index]}".img - cd ../ - cp -r ./adi_"${typeBCM_32bit[$index]}"_arm_defconfig/* ./${timestamp}/32bit - done - if [ -z "$(ls ${SOURCE_DIRECTORY}/${timestamp}/32bit/*.dtb 2>/dev/null)" ] || [ -z "$(ls ${SOURCE_DIRECTORY}/${timestamp}/32bit/overlays/*.dtb* 2>/dev/null)" ]; then - echo "Missing one or more required files from the 32bit artifacts." - exit 1 - fi - tar -C ${SOURCE_DIRECTORY}/${timestamp}/32bit/modules -czvf ${SOURCE_DIRECTORY}/${timestamp}/32bit/rpi_modules_32bit.tar.gz . - rm -r ${SOURCE_DIRECTORY}/${timestamp}/32bit/modules - - mkdir ${timestamp}/64bit - create_version_file 64bit "${typeBCM_64bit[*]}" - for index in "${!typeBCM_64bit[@]}"; do - cd adi_"${typeBCM_64bit[$index]}"_arm64_defconfig - mkdir modules - tar -xf rpi_modules.tar.gz -C modules - rm rpi_modules.tar.gz - mv ./Image ./"${typeKERNEL_64bit[$index]}".img - cd ../ - cp -r ./adi_"${typeBCM_64bit[$index]}"_arm64_defconfig/* ./${timestamp}/64bit - done - if [ -z "$(ls ${SOURCE_DIRECTORY}/${timestamp}/64bit/*.dtb 2>/dev/null)" ] || [ -z "$(ls ${SOURCE_DIRECTORY}/${timestamp}/64bit/overlays/*.dtb* 2>/dev/null)" ]; then - echo "Missing one or more required files from the 64bit artifacts." - exit 1 - fi - tar -C ${SOURCE_DIRECTORY}/${timestamp}/64bit/modules -czvf ${SOURCE_DIRECTORY}/${timestamp}/64bit/rpi_modules_64bit.tar.gz . - rm -r ${SOURCE_DIRECTORY}/${timestamp}/64bit/modules -} - -#upload artifacts to Artifactory -artifacts_artifactory() { - artifacts_structure - cd ${SOURCE_DIRECTORY} - python ../ci/travis/upload_to_artifactory.py --base_path="${ARTIFACTORY_PATH}" \ - --server_path="linux_rpi/${BUILD_SOURCEBRANCHNAME}" --local_path="${timestamp}" \ - --token="${ARTIFACTORY_TOKEN}" --log_file="upload_to_artifactory.log" \ - --properties="git_branch=$BUILD_SOURCEBRANCHNAME;git_sha=$GIT_SHA;git_sha_date=$GIT_SHA_DATE;" \ - --props_level=3 -} - -#archive artifacts and upload to SWDownloads -artifacts_swdownloads() { - artifacts_structure - chmod 600 ${KEY_FILE} - - cd ${SOURCE_DIRECTORY}/${timestamp}/32bit || exit 1 - scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss \ - -i ${KEY_FILE} -r *.tar.gz ${DEST_SERVER}/${BUILD_SOURCEBRANCHNAME} - md5_modules_32bit=($(md5sum rpi_modules_32bit.tar.gz| cut -d ' ' -f 1)) - rm rpi_modules_32bit.tar.gz - tar -C ${PWD} -czvf rpi_latest_boot_32bit.tar.gz * - md5_boot_32bit=($(md5sum rpi_latest_boot_32bit.tar.gz| cut -d ' ' -f 1)) - scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss \ - -i ${KEY_FILE} -r rpi_latest_boot_32bit.tar.gz ${DEST_SERVER}/${BUILD_SOURCEBRANCHNAME} - - cd ${SOURCE_DIRECTORY}/${timestamp}/64bit || exit 1 - scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss \ - -i ${KEY_FILE} -r *.tar.gz ${DEST_SERVER}/${BUILD_SOURCEBRANCHNAME} - md5_modules_64bit=($(md5sum rpi_modules_64bit.tar.gz| cut -d ' ' -f 1)) - rm rpi_modules_64bit.tar.gz - tar -C ${PWD} -czvf rpi_latest_boot_64bit.tar.gz * - md5_boot_64bit=($(md5sum rpi_latest_boot_64bit.tar.gz| cut -d ' ' -f 1)) - scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss \ - -i ${KEY_FILE} -r rpi_latest_boot_64bit.tar.gz ${DEST_SERVER}/${BUILD_SOURCEBRANCHNAME} - - echo "git_branch=${BUILD_SOURCEBRANCHNAME}" >> rpi_archives_properties.txt - echo "https://swdownloads.analog.com/cse/linux_rpi/${BUILD_SOURCEBRANCHNAME}/rpi_modules_32bit.tar.gz" >> rpi_archives_properties.txt - echo "https://swdownloads.analog.com/cse/linux_rpi/${BUILD_SOURCEBRANCHNAME}/rpi_latest_boot_32bit.tar.gz" >> rpi_archives_properties.txt - echo "checksum_modules_32bit=${md5_modules_32bit}" >> rpi_archives_properties.txt - echo "checksum_boot_files_32bit=${md5_boot_32bit}" >> rpi_archives_properties.txt - echo "https://swdownloads.analog.com/cse/linux_rpi/${BUILD_SOURCEBRANCHNAME}/rpi_modules_64bit.tar.gz" >> rpi_archives_properties.txt - echo "https://swdownloads.analog.com/cse/linux_rpi/${BUILD_SOURCEBRANCHNAME}/rpi_latest_boot_64bit.tar.gz" >> rpi_archives_properties.txt - echo "checksum_modules_64bit=${md5_modules_64bit}" >> rpi_archives_properties.txt - echo "checksum_boot_files_64bit=${md5_boot_64bit}" >> rpi_archives_properties.txt - echo "git_sha=${GIT_SHA}" >> rpi_archives_properties.txt - echo "git_sha_date=${GIT_SHA_DATE}" >> rpi_archives_properties.txt - - scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss \ - -i ${KEY_FILE} -r rpi_archives_properties.txt ${DEST_SERVER}/${BUILD_SOURCEBRANCHNAME} -} - -artifacts_${1} diff --git a/ci/travis/run-build-docker.sh b/ci/travis/run-build-docker.sh deleted file mode 100755 index 724315a0cab932..00000000000000 --- a/ci/travis/run-build-docker.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -set -e - -. ./ci/travis/lib.sh - -ENV_VARS="BUILD_TYPE DEFCONFIG ARCH CROSS_COMPILE DTS_FILES IMAGE BUILD_SOURCEBRANCH SYSTEM_PULLREQUEST_TARGETBRANCH" -ENV_VARS="$ENV_VARS TRAVIS_COMMIT TRAVIS_PULL_REQUEST CHECK_ALL_ADI_DRIVERS_HAVE_BEEN_BUILT" - -if [ "$DO_NOT_DOCKERIZE" = "1" ] ; then - . ./ci/travis/run-build.sh -else - cat /dev/null > "${FULL_BUILD_DIR}/env" - BUILD_TYPE=${BUILD_TYPE:-default} - for env in $ENV_VARS ; do - val="$(eval echo "\$${env}")" - if [ -n "$val" ] ; then - echo "export ${env}=${val}" >> "${FULL_BUILD_DIR}/env" - fi - done - export OS_TYPE=ubuntu - export OS_VERSION=24.04 - prepare_docker_image - run_docker_script run-build.sh -fi diff --git a/ci/travis/run-build.sh b/ci/travis/run-build.sh deleted file mode 100755 index 4c5b300a10c4c1..00000000000000 --- a/ci/travis/run-build.sh +++ /dev/null @@ -1,391 +0,0 @@ -#!/bin/bash -set -e - -# cd to docker build dir if it exists -if [ -d /docker_build_dir ] ; then - cd /docker_build_dir -fi - -[ "${LOCAL_BUILD}" == "y" ] || . ./ci/travis/lib.sh - -__echo_green() { - [ "${LOCAL_BUILD}" == "y" ] && echo $@ || echo_green $@ -} - -__echo_red() { - [ "${LOCAL_BUILD}" == "y" ] && echo $@ || echo_red $@ -} - -MAIN_BRANCH=${MAIN_BRANCH:-main} - -if [ -f "${FULL_BUILD_DIR}/env" ] && [ -z "${LOCAL_BUILD}" ]; then - echo_blue "Loading environment variables" - cat "${FULL_BUILD_DIR}/env" - . "${FULL_BUILD_DIR}/env" -fi - -# Run once for the entire script -[ "${LOCAL_BUILD}" == "y" ] || sudo apt-get -qq update - -apt_install() { - [ "${LOCAL_BUILD}" == "y" ] || sudo apt-get install -y $@ -} - -if [ -z "$NUM_JOBS" ] ; then - NUM_JOBS=$(getconf _NPROCESSORS_ONLN) - NUM_JOBS=${NUM_JOBS:-1} -fi - -KCFLAGS="-Werror" -# FIXME: remove the line below once Talise & Mykonos APIs -# dont't use 1024 bytes on stack -KCFLAGS="$KCFLAGS -Wno-error=frame-larger-than=" -export KCFLAGS - -# FIXME: remove this function once kernel gets upgrade and -# GCC doesn't report these warnings anymore -adjust_kcflags_against_gcc() { - GCC="${CROSS_COMPILE}gcc" - if [ "$($GCC -dumpversion | cut -d. -f1)" -ge "8" ]; then - KCFLAGS="$KCFLAGS -Wno-error=stringop-truncation" - KCFLAGS="$KCFLAGS -Wno-error=packed-not-aligned" - KCFLAGS="$KCFLAGS -Wno-error=stringop-overflow= -Wno-error=sizeof-pointer-memaccess" - KCFLAGS="$KCFLAGS -Wno-error=missing-attributes" - fi - - if [ "$($GCC -dumpversion | cut -d. -f1)" -ge "9" ]; then - KCFLAGS="$KCFLAGS -Wno-error=address-of-packed-member -Wno-error=attribute-alias=" - KCFLAGS="$KCFLAGS -Wno-error=stringop-truncation" - fi - if [ "$($GCC -dumpversion | cut -d. -f1)" -ge "10" ]; then - KCFLAGS="$KCFLAGS -Wno-error=maybe-uninitialized -Wno-error=restrict" - KCFLAGS="$KCFLAGS -Wno-error=zero-length-bounds" - fi - export KCFLAGS -} - -APT_LIST="make bc u-boot-tools flex bison libssl-dev tar kmod xz-utils" - -if [ "$ARCH" = "arm64" ] ; then - if [ -z "$CROSS_COMPILE" ] ; then - CROSS_COMPILE=aarch64-linux-gnu- - export CROSS_COMPILE - fi - - APT_LIST="$APT_LIST gcc-aarch64-linux-gnu" -fi - -if [ "$ARCH" = "arm" ] ; then - if [ -z "$CROSS_COMPILE" ] ; then - CROSS_COMPILE=arm-linux-gnueabi- - export CROSS_COMPILE - fi - - APT_LIST="$APT_LIST gcc-arm-linux-gnueabi" -fi - -apt_update_install() { - apt_install $@ - adjust_kcflags_against_gcc -} - -__get_all_c_files() { - git grep -i "$@" | cut -d: -f1 | sort | uniq | grep "\.c" -} - -__exceptions_file() { - [ ! -f "$1" ] && return 1 - grep -q "$2" "$1" && return 0 || return 1 -} - -check_all_adi_files_have_been_built() { - # Collect all .c files that contain the 'Analog Devices' string/name - local c_files=$(__get_all_c_files "Analog Devices") - local ltc_c_files=$(__get_all_c_files "Linear Technology") - local o_files - local exceptions_file="ci/travis/${DEFCONFIG}_compile_exceptions" - local ret=0 - - c_files="drivers/misc/mathworks/*.c $c_files $ltc_c_files" - - # Convert them to .o files via sed, and extract only the filenames - for file in $c_files ; do - file1=$(echo $file | sed 's/\.c/\.o/g') - if __exceptions_file "$exceptions_file" "$file1"; then - continue - fi - - if [ ! -f "$file1" ] ; then - if [ "$ret" = "0" ] ; then - echo - __echo_red "The following files need to be built OR" - __echo_green " added to '$exceptions_file'" - - echo - - __echo_green " If adding the '$exceptions_file', please make sure" - __echo_green " to check if it's better to add the correct Kconfig symbol" - __echo_green " to one of the following files:" - - for file in $(find -name Kconfig.adi) ; do - __echo_green " $file" - done - - echo - fi - __echo_red "File '$file1' has not been compiled" - ret=1 - fi - done - - return $ret -} - -get_ref_branch() { - if [ -n "$TARGET_BRANCH" ] ; then - echo -n "$TARGET_BRANCH" - elif [ -n "$TRAVIS_BRANCH" ] ; then - echo -n "$TRAVIS_BRANCH" - elif [ -n "$GITHUB_BASE_REF" ] ; then - echo -n "$GITHUB_BASE_REF" - else - echo -n "HEAD~5" - fi -} - -__setup_dummy_git_account() { - [ "${LOCAL_BUILD}" == "y" ] && return 0 - # setup an email account so that we can cherry-pick stuff - git config user.name "CSE CI" - git config user.email "cse-ci-notifications@analog.com" -} - -build_default() { - [ -n "$DEFCONFIG" ] || { - __echo_red "No DEFCONFIG provided" - return 1 - } - - [ -n "$ARCH" ] || { - __echo_red "No ARCH provided" - return 1 - } - - APT_LIST="$APT_LIST git" - - apt_update_install $APT_LIST - - # make sure git does not complain about unsafe repositories when - # building inside docker. - [ -d /docker_build_dir ] && git config --global --add safe.directory /docker_build_dir - - make ${DEFCONFIG} - if [[ "${SYSTEM_PULLREQUEST_TARGETBRANCH}" =~ ^rpi-.* || "${BUILD_SOURCEBRANCH}" =~ ^refs/heads/rpi-.* \ - || "${BUILD_SOURCEBRANCH}" =~ ^refs/heads/staging-rpi ]]; then - echo "Rpi build" - make -j$NUM_JOBS $IMAGE modules dtbs - make INSTALL_MOD_PATH="${PWD}/modules" modules_install - else - echo "Normal build" - make -j$NUM_JOBS $IMAGE UIMAGE_LOADADDR=0x8000 - fi - - if [ "$CHECK_ALL_ADI_DRIVERS_HAVE_BEEN_BUILT" = "1" ] ; then - check_all_adi_files_have_been_built - fi - - make savedefconfig - mv defconfig arch/$ARCH/configs/$DEFCONFIG - - git diff --exit-code || { - __echo_red "Defconfig file should be updated: 'arch/$ARCH/configs/$DEFCONFIG'" - __echo_red "Run 'make savedefconfig', overwrite it and commit it" - return 1 - } -} - -build_allmodconfig() { - APT_LIST="$APT_LIST git" - - apt_update_install $APT_LIST - make allmodconfig - make -j$NUM_JOBS -} - -build_microblaze() { - local exceptions_file="ci/travis/dtb_build_test_exceptions" - local err=0 - - # Setup standalone compiler - wget -q --show-progress "${DOWNLOAD_URL}/microblaze_compiler/microblazeel-xilinx-elf.tar.gz" - mkdir -p /opt/microblazeel-xilinx-elf - tar -xvzf microblazeel-xilinx-elf.tar.gz -C /opt/microblazeel-xilinx-elf - export PATH=$PATH:/opt/microblazeel-xilinx-elf/bin - sudo apt install u-boot-tools - microblazeel-xilinx-elf-gcc --version - - for file in $DTS_FILES; do - if __exceptions_file "$exceptions_file" "$file"; then - continue - fi - - if ! grep -q "hdl_project:" $file ; then - __echo_red "'$file' doesn't contain an 'hdl_project:' tag" - hdl_project_tag_err=1 - fi - done - - if [ "$hdl_project_tag_err" = "1" ] ; then - echo - echo - __echo_green "Some DTs have been found that do not contain an 'hdl_project:' tag" - __echo_green " Either:" - __echo_green " 1. Create a 'hdl_project' tag for it" - __echo_green " OR" - __echo_green " 1. add it in file '$exceptions_file'" - fi - - export CROSS_COMPILE=/opt/microblazeel-xilinx-elf/bin/microblazeel-xilinx-elf- - ARCH=microblaze make adi_mb_defconfig - for file in $DTS_FILES; do - if __exceptions_file "$exceptions_file" "$file"; then - continue - fi - - dtb_file="simpleImage." - dtb_file+=$(echo $file | sed 's/dts\//=/g' | cut -d'=' -f2 | sed 's\.dts\\g') - - echo "######### Building: $dtb_file" - ARCH=microblaze make ${dtb_file} -j$NUM_JOBS || err=1 - done - - if [ "$err" = "0" ] ; then - __echo_green "Microblaze build tests passed" - return 0 - fi - - return $err -} - -build_dtb_build_test() { - local exceptions_file="ci/travis/dtb_build_test_exceptions" - local err=0 - local defconfig - local last_defconfig - - for file in $DTS_FILES; do - arch=$(echo $file | cut -d'/' -f2) - # a bit hard-coding for now; only check arm & arm64 DTs; - # they are shipped via SD-card - if [ "$arch" != "arm" ] && [ "$arch" != "arm64" ] ; then - continue - fi - - if __exceptions_file "$exceptions_file" "$file"; then - continue - fi - - if ! grep -q "hdl_project:" $file ; then - __echo_red "'$file' doesn't contain an 'hdl_project:' tag" - err=1 - hdl_project_tag_err=1 - fi - done - - if [ "$hdl_project_tag_err" = "1" ] ; then - echo - echo - __echo_green "Some DTs have been found that do not contain an 'hdl_project:' tag" - __echo_green " Either:" - __echo_green " 1. Create a 'hdl_project' tag for it" - __echo_green " OR" - __echo_green " 1. add it in file '$exceptions_file'" - return 1 - fi - - for file in $DTS_FILES; do - if __exceptions_file "$exceptions_file" "$file"; then - continue - fi - - dtb_file=$(echo $file | sed 's/dts\//=/g' | cut -d'=' -f2 | sed 's\dts\dtb\g') - arch=$(echo $file | cut -d'/' -f2) - - case "$(echo ${file} | grep -Eo 'zynq|zynqmp|socfpga|versal' || echo '')" in - zynq) - defconfig="zynq_xcomm_adv7511_defconfig" - ;; - zynqmp) - defconfig="adi_zynqmp_defconfig" - ;; - socfpga) - defconfig="socfpga_adi_defconfig" - ;; - versal) - defconfig="adi_versal_defconfig" - ;; - *) - echo "Default defconfig will be used." - defconfig="defconfig" - ;; - esac - - # Check if new defconfig nneds to be built - if [ "$last_defconfig" != "$defconfig" ] ; then - ARCH=$arch make ${defconfig} - last_defconfig=$defconfig - fi - # XXX: hack for nios2, which doesn't have `arch/nios2/boot/dts/Makefile` - # but even an empty one is fine - if [ ! -f arch/$arch/boot/dts/Makefile ] ; then - touch arch/$arch/boot/dts/Makefile - fi - ARCH=$arch make ${dtb_file} -j$NUM_JOBS || err=1 - done - - if [ "$err" = "0" ] ; then - __echo_green "DTB build tests passed" - return 0 - fi - - return $err -} - -branch_contains_commit() { - local commit="$1" - local branch="$2" - git merge-base --is-ancestor $commit $branch &> /dev/null -} - -__update_git_ref() { - local ref="$1" - local local_ref="$2" - local depth - - [ "${LOCAL_BUILD}" == "y" ] && return 0 - - [ "$GIT_FETCH_DEPTH" = "disabled" ] || { - depth="--depth=${GIT_FETCH_DEPTH:-50}" - } - if [ -n "$local_ref" ] ; then - git fetch $depth $ORIGIN +refs/heads/${ref}:${local_ref} - else - git fetch $depth $ORIGIN +refs/heads/${ref} - fi -} - -__push_back_to_github() { - local dst_branch="$1" - - git push --quiet -u $ORIGIN "HEAD:$dst_branch" || { - __echo_red "Failed to push back '$dst_branch'" - return 1 - } -} - -ORIGIN=${ORIGIN:-origin} - -BUILD_TYPE=${BUILD_TYPE:-${1}} -BUILD_TYPE=${BUILD_TYPE:-default} - -build_${BUILD_TYPE} diff --git a/ci/travis/socfpga_adi_defconfig_compile_exceptions b/ci/travis/socfpga_adi_defconfig_compile_exceptions deleted file mode 100644 index 0f7d6bab9dd591..00000000000000 --- a/ci/travis/socfpga_adi_defconfig_compile_exceptions +++ /dev/null @@ -1,74 +0,0 @@ -drivers/mtd/maps/physmap-core.o -sound/hda/hdac_device.o -sound/isa/ad1816a/ad1816a.o -sound/isa/ad1816a/ad1816a_lib.o -sound/isa/ad1848/ad1848.o -sound/pci/ac97/ac97_patch.o -sound/pci/ad1889.o -sound/pci/hda/patch_analog.o -sound/soc/codecs/wm8782.o -drivers/gpu/drm/bridge/adv7511/adv7511_debugfs.o -drivers/gpu/drm/tegra/fb.o -drivers/media/i2c/adv7511-v4l2.o -drivers/iio/adc/adi-axi-adc.o -drivers/iio/industrialio-backend.o -drivers/iio/adc/navassa/adrv9002_debugfs.o -drivers/gpu/drm/i2c/adv7511_audio.o -drivers/gpu/drm/i2c/adv7511_core.o -drivers/iio/adc/max1027.o -drivers/input/misc/adxl34x.o -drivers/input/misc/adxl34x-i2c.o -drivers/input/misc/adxl34x-spi.o -drivers/net/wireless/marvell/libertas/if_spi.o -drivers/iio/jesd204/altera_a10_atx_pll.o -drivers/iio/jesd204/altera_a10_cdr_pll.o -drivers/misc/jesd204b/xilinx_jesd204b.o -drivers/misc/mathworks/mathworks_generic_pci.o -drivers/iio/adc/mykonos/mykonos_debug/mykonos_dbgjesd.o -drivers/iio/adc/mykonos/mykonosMmap.o -drivers/usb/gadget/function/f_midi.o -drivers/usb/gadget/function/f_uac1.o -drivers/usb/gadget/function/f_uac1_legacy.o -drivers/usb/gadget/function/u_uac1_legacy.o -drivers/usb/gadget/legacy/audio.o -drivers/usb/gadget/udc/net2272.o -drivers/comedi/drivers/rti800.o -drivers/comedi/drivers/rti802.o -drivers/mtd/maps/gpio-addr-flash.o -drivers/mtd/maps/latch-addr-flash.o -drivers/iio/adc/ti-ads7950.o -drivers/iio/adc/ina2xx-adc.o -drivers/media/i2c/vs6624.o -drivers/misc/xilinx_lcd.o -sound/pci/ac97/ac97_codec.o -sound/pci/ac97/ac97_proc.o -sound/soc/codecs/ad1980.o -drivers/iio/adc/adm1177.o -drivers/hwmon/jc42.o -drivers/hwmon/lm87.o -drivers/hwmon/lm90.o -drivers/iio/adc/xilinx-xadc-core.o -drivers/iio/adc/xilinx-xadc-events.o -drivers/iio/jesd204/axi_jesd204b_gt.o -drivers/iio/jesd204/axi_jesd204b_v51.o -drivers/media/platform/adi/imageon-bridge.o -drivers/media/i2c/mt9m114.o -drivers/spi/spi-xcomm.o -drivers/clk/clk-axi-clkgen.o -drivers/misc/mathworks/mathworks_generic_of.o -drivers/misc/mathworks/mathworks_ip_common.o -drivers/misc/mathworks/mathworks_ipcore.o -drivers/misc/mathworks/mw_sharedmem_iio_channel.o -drivers/misc/mathworks/mw_mm_iio_channel.o -drivers/misc/mathworks/mw_stream_channel.o -drivers/misc/mathworks/mw_stream_iio_channel.o -drivers/iio/adc/adrv902x/devices/adrv9025/private/src/adrv9025_dfe.o -drivers/iio/adc/adrv902x/devices/adrv9025/private/src/adrv9025_dynamic_slicer.o -drivers/iio/adc/adrv902x/devices/adrv9025/public/src/adi_adrv9025_dfe.o -drivers/iio/adc/adrv902x/devices/adrv9025/public/src/adi_adrv9025_dynamic_slicer.o -drivers/iio/adc/adrv902x/platforms/adi_platform.o -drivers/gpu/drm/tegra/fbdev.o -drivers/pci/controller/pcie-rcar-host.o -sound/soc/codecs/max98363.o -sound/soc/codecs/ssm3515.o - diff --git a/ci/travis/upload_to_artifactory.py b/ci/travis/upload_to_artifactory.py deleted file mode 100644 index e15cfece6c43a7..00000000000000 --- a/ci/travis/upload_to_artifactory.py +++ /dev/null @@ -1,147 +0,0 @@ -# SPDX-License-Identifier: (GPL-1.0-only OR BSD-2-Clause) - -######################################################################## -# -# File name: upload_to_artifactory.py -# Author: Raus Stefan -# -# This script is used to upload files to ADI internal artifactory server -# -# Copyright (C) 2019-2024 Analog Devices Inc. -# -####################################################################### - -#!/usr/bin/python3.6 - -import os -import argparse -import glob -import shutil -import sys -from glob import glob - -LOCAL_PATHS_LIST = [] -# If you try to upload files in a different folder than the ones in below list, there will be printed a message and files won't be uploaded -SERVER_FOLDERS_LIST = ["linux", "linux_rpi"] - -########### Define arguments and help section ################# - -parser = argparse.ArgumentParser( - description='This script is uploading files or folders to artifactory server.Parameter order doesn\'t matter.', \ - formatter_class=argparse.RawDescriptionHelpFormatter, - epilog='Examples: '\ - + '\n-> "./upload_to_artifactory.py --server_path="hdl/main/2020_12_12/pluto" --local_path="../projects/pluto/log_file.txt"'\ - + ' --properties="git_sha=928ggraf;git_commmit_date=2020_12_12" --no_rel_path" will upload file "log_file.txt" to '\ - + ' /hdl/main/2020_12_12/pluto/log_file.txt and add properties git_sha=928ggraf and git_commit_date=2010_12_12 on it.'\ - + '\n-> "./upload_to_artifactory.py --server_path="linux" --local_path="main/2020_11_25/arm/zynq_zed_adv7511.dtb"" will upload dtb'\ - + ' file to /linux/main/2020_11_25/arm/zynq_zed_adv7511.dtb') -parser.add_argument("--base_path", help="Artifactory Base Path - Internal ADI Artifactory server and development folder") -parser.add_argument("--server_path", help="Artifactory folder where the files/folders will be saved, for example 'hdl' or 'linux'.") -parser.add_argument("--local_path", help="Local path to file/folder to upload. It can be relative or absolute.") -parser.add_argument("--properties", help="Properties to be added to file/folder. If multiple ones, split them by ';'.") -parser.add_argument("--no_rel_path", help="If this exists, the relative path until local file will be appended to artifactory path", action="store_true") -parser.add_argument("--props_level", help="Set for how many levels of folders to set specified properties, by default just on file.") -parser.add_argument("--token", help="Artifactory authentication token. Otherwise you can export API_TOKEN in terminal before calling this script.") -parser.add_argument("--log_file", help="Local file where to save the logs from curl command, if no file is specified the logs will be printed in terminal") -args = parser.parse_args() -parser.parse_args() - -########## Check if required and optional arguments are set ################# -if args.token: - API_TOKEN = args.token -else: - if "API_TOKEN" in os.environ: - API_TOKEN = os.environ['API_TOKEN'] - else: - print('\nError:Parameter "--token" is not set. This is Artifactory Authentication Token and can be set even using parameter "--token" on upload command, even by exporting API_TOKEN variable in terminal, before calling upload script.') - exit(1) - -if args.base_path: - UPLOAD_BASE_PATH = args.base_path -else: - if "UPLOAD_BASE_PATH" in os.environ: - UPLOAD_BASE_PATH = os.environ['UPLOAD_BASE_PATH'] - else: - print('\nError:Parameter "--base_path" is not set. This is ADI Internal Artifactory Server plus first level of folders. It can be set even using parameter "--base_path" on upload command, even by exporting UPLOAD_BASE_PATH variable in terminal, before calling upload script.') - exit(1) - - -if args.server_path: - # take first folder from server path and check if matches with folders from artifactory server (hdl, linux, SD_card_image etc) - SERVER_PATH = args.server_path - SERVER_PATH = SERVER_PATH[1:] if SERVER_PATH.startswith('/') else SERVER_PATH - SERVER_FOLDER = SERVER_PATH.split("/", 1)[0] - if SERVER_FOLDER not in SERVER_FOLDERS_LIST: - print('\nError:Parameter "--server_path" must contain an already existing folder, for example "hdl", "linux", "SD_card_image" etc.' + - 'If you want to add new folders, please edit "upload_to_artifactory.py" or contact script owner.') - exit(1) -else: - print('\nError:Parameter "--server_path" is required. It should be set to server location where the files/folder will be uploaded. Check help section.') - exit(1) - -if args.local_path: - LOCAL_PATH = os.path.abspath(args.local_path) if '../' in args.local_path else args.local_path - # if there was given a dir as local_path parameter, get all the files inside it in a list - if os.path.isdir(LOCAL_PATH): - print('IS DIR') - for dpath, dnames, fnames in os.walk(LOCAL_PATH): - for i, FILE_NAME in enumerate([os.path.join(dpath, fname) for fname in fnames]): - print(FILE_NAME) - LOCAL_PATHS_LIST.append(str(FILE_NAME)) - elif os.path.isfile(LOCAL_PATH): - LOCAL_PATHS_LIST = [LOCAL_PATH] - print('IS FILE' + LOCAL_PATHS_LIST) - else: - print('\nError:It looks that parameter "--local_path" is wrong defined/does not exists. Plese check: ' + LOCAL_PATH) - exit(1) -else: - print('\nParameter "--local_path" is required. It should point to local file/folder to upload.') - exit(1) - -if args.properties: - PROPS = args.properties -else: - PROPS = '' - -if args.no_rel_path: - NO_REL_PATH = True -else: - NO_REL_PATH = False - -if args.props_level: - PROP_LEVEL = int(args.props_level) -else: - PROP_LEVEL = 0 - -if args.log_file: - LOG_FILE = ">> " + args.log_file -else: - LOG_FILE = '' - -########## Upload files ########## -# If files with same name already exists at specified server path, they will be overwritten - -for FILE in LOCAL_PATHS_LIST: - if NO_REL_PATH: - FILE_NAME = os.path.basename(FILE) - ART_PATH = UPLOAD_BASE_PATH + "/" + SERVER_PATH + "/" + FILE_NAME - else: - ART_PATH = UPLOAD_BASE_PATH + "/" + SERVER_PATH + "/" + FILE - upload_cmd = "curl -H \"X-JFrog-Art-Api:" + API_TOKEN + "\" -X PUT \"" + ART_PATH + ";" + PROPS + "\" -T \"" + FILE + "\" " + LOG_FILE - os.system(upload_cmd) - -########## Upload properties on folders ######### - -if NO_REL_PATH: - ART_PATH = UPLOAD_BASE_PATH + "/" + SERVER_PATH -else: - ART_PATH = UPLOAD_BASE_PATH + "/" + SERVER_PATH + "/" + os.path.split(LOCAL_PATHS_LIST[0])[0] - -i = 0 -while ( i < int(PROP_LEVEL)): - set_folder_props_cmd = "curl -H \"X-JFrog-Art-Api:" + API_TOKEN + "\" -X PUT \"" + ART_PATH + "/;" + PROPS + "\" " + LOG_FILE - os.system(set_folder_props_cmd) - i = i + 1 - ART_PATH = os.path.split(ART_PATH)[0] - -################################################# diff --git a/ci/travis/zynq_xcomm_adv7511_defconfig_compile_exceptions b/ci/travis/zynq_xcomm_adv7511_defconfig_compile_exceptions deleted file mode 100644 index 45a22671b27160..00000000000000 --- a/ci/travis/zynq_xcomm_adv7511_defconfig_compile_exceptions +++ /dev/null @@ -1,56 +0,0 @@ -sound/hda/hdac_device.o -sound/isa/ad1816a/ad1816a.o -sound/isa/ad1816a/ad1816a_lib.o -sound/isa/ad1848/ad1848.o -sound/pci/ac97/ac97_patch.o -sound/pci/ad1889.o -sound/pci/hda/patch_analog.o -sound/soc/codecs/wm8782.o -drivers/gpu/drm/tegra/fb.o -drivers/media/platform/adi/imageon-bridge.o -drivers/media/i2c/adv7511-v4l2.o -drivers/iio/adc/adi-axi-adc.o -drivers/iio/industrialio-backend.o -drivers/iio/adc/max1027.o -drivers/input/misc/adxl34x.o -drivers/input/misc/adxl34x-i2c.o -drivers/input/misc/adxl34x-spi.o -drivers/net/wireless/marvell/libertas/if_spi.o -drivers/iio/jesd204/altera_a10_atx_pll.o -drivers/iio/jesd204/altera_a10_cdr_pll.o -drivers/iio/jesd204/altera_adxcvr.o -drivers/misc/jesd204b/xilinx_jesd204b.o -drivers/misc/mathworks/mathworks_generic_pci.o -drivers/clk/clk-altera-a10-fpll.o -drivers/clk/clk-altera-c5-fpll.o -drivers/iio/adc/mykonos/mykonos_debug/mykonos_dbgjesd.o -drivers/iio/adc/mykonos/mykonosMmap.o -drivers/usb/gadget/function/f_midi.o -drivers/usb/gadget/function/f_uac1.o -drivers/usb/gadget/function/f_uac1_legacy.o -drivers/usb/gadget/function/u_uac1_legacy.o -drivers/usb/gadget/legacy/audio.o -drivers/usb/gadget/udc/net2272.o -drivers/pci/controller/pcie-rcar-host.o -drivers/comedi/drivers/rti800.o -drivers/comedi/drivers/rti802.o -drivers/mtd/maps/gpio-addr-flash.o -drivers/mtd/maps/latch-addr-flash.o -drivers/iio/adc/ti-ads7950.o -drivers/iio/adc/ina2xx-adc.o -drivers/media/i2c/vs6624.o -drivers/media/i2c/mt9m114.o -drivers/misc/xilinx_lcd.o -sound/pci/ac97/ac97_codec.o -sound/pci/ac97/ac97_proc.o -sound/soc/codecs/ad1980.o -drivers/iio/adc/adm1177.o -drivers/iio/adc/adrv902x/devices/adrv9025/private/src/adrv9025_dfe.o -drivers/iio/adc/adrv902x/devices/adrv9025/private/src/adrv9025_dynamic_slicer.o -drivers/iio/adc/adrv902x/devices/adrv9025/public/src/adi_adrv9025_dfe.o -drivers/iio/adc/adrv902x/devices/adrv9025/public/src/adi_adrv9025_dynamic_slicer.o -drivers/iio/adc/adrv902x/platforms/adi_platform.o -drivers/gpu/drm/tegra/fbdev.o -sound/soc/codecs/max98363.o -sound/soc/codecs/ssm3515.o -