diff --git a/.github/helpers/check_urls.sh b/.github/helpers/check_urls.sh index 2bccc8d7d..5d3662ee2 100755 --- a/.github/helpers/check_urls.sh +++ b/.github/helpers/check_urls.sh @@ -2,14 +2,54 @@ set -e +IGNORE_FILES="" +IGNORE_PATTERNS="" + +while getopts ":f:d:p:" opt; do + case "${opt}" in + f) + IGNORE_FILES="${OPTARG}";; + d) + IGNORE_DIRS="${OPTARG}";; + p) + IGNORE_PATTERNS="${OPTARG}";; + \?) + echo "Invalid option -$OPTARG" + exit;; + esac +done + +read -r -a ignore_files <<<"$IGNORE_FILES" +read -r -a ignore_dirs <<<"$IGNORE_DIRS" +read -r -a ignore_patterns <<<"$IGNORE_PATTERNS" + +IGNORE_FILES_ARG="" +for item in "${ignore_files[@]}"; do + IGNORE_FILES_ARG="$IGNORE_FILES_ARG --exclude=$item" +done +IGNORE_DIRS_ARG="" +for item in "${ignore_dirs[@]}"; do + IGNORE_DIRS_ARG="$IGNORE_DIRS_ARG --exclude-dir=$item" +done + #Find URLs in code: -urls=$(grep -oP "(http|ftp|https):\/\/([a-zA-Z0-9_-]+(?:(?:\.[a-zA-Z0-9_-]+)+))([a-zA-Z0-9_.,@?^=%&:\/~+#-]*[a-zA-Z0-9_@?^=%&\/~+#-])?" "$@") +urls=$(grep -oP '(http|ftp|https):\/\/([a-zA-Z0-9_-]+(?:(?:\.[a-zA-Z0-9_-]+)+))([a-zA-Z0-9_.,@?^=%&:\/~+#-]*[a-zA-Z0-9_@?^=%&\/~+#-])?' -rI $IGNORE_FILES_ARG $IGNORE_DIRS_ARG) fail_counter=0 FAILED_LINKS=() for item in $urls; do -# echo $item +# echo $item + skip=0 + for pattern in "${ignore_patterns[@]}"; do + [[ "$item" =~ $pattern ]] && skip=1 + done + + if [[ $skip == 1 ]]; then + echo "SKIPPING $item" + continue + fi + filename=$(echo "$item" | cut -d':' -f1) url=$(echo "$item" | cut -d':' -f2-) echo -n "Checking $url from file $filename" @@ -24,4 +64,4 @@ done echo "Failed files:" printf '%s\n' "${FAILED_LINKS[@]}" -exit $fail_counter +exit $fail_counter \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 006f2cda7..d70ba729b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ jobs: runs-on: ubuntu-latest name: build (${{matrix.env.URSIM_VERSION}}-${{matrix.env.ROBOT_MODEL}}) strategy: + fail-fast: false matrix: env: - DOCKER_RUN_OPTS: --network ursim_net @@ -98,16 +99,10 @@ jobs: - uses: actions/checkout@v2 - name: Check URLs run: | - .github/helpers/check_urls.sh -rI \ - --exclude-dir=.git \ - --exclude-dir=build/ \ - --exclude-dir=tests \ - --exclude=package.xml \ - --exclude-dir=CMakeModules \ - --exclude=tcp_socket.cpp \ - --exclude-dir=debian \ - --exclude=dataflow.graphml \ - --exclude=start_ursim.sh + .github/helpers/check_urls.sh \ + -d ".git build CMakeModules debian" \ + -f "package.xml architecture_coarse.svg dataflow.graphml start_ursim.sh" \ + -p "vnc\.html opensource\.org\/licenses\/BSD-3-Clause kernel\.org\/pub\/linux\/kernel" rosdoc_lite_check: runs-on: ubuntu-latest diff --git a/examples/dashboard_example.cpp b/examples/dashboard_example.cpp index 9f4515b79..81eda8cbe 100644 --- a/examples/dashboard_example.cpp +++ b/examples/dashboard_example.cpp @@ -36,6 +36,7 @@ #include #include #include +#include using namespace urcl; @@ -96,6 +97,8 @@ int main(int argc, char* argv[]) return 1; } + sleep(1); + // Play loaded program if (!my_dashboard->commandPlay()) { diff --git a/src/ur/dashboard_client.cpp b/src/ur/dashboard_client.cpp index 95a26617d..8469a766c 100644 --- a/src/ur/dashboard_client.cpp +++ b/src/ur/dashboard_client.cpp @@ -156,6 +156,7 @@ bool DashboardClient::sendRequest(const std::string& command, const std::string& { URCL_LOG_DEBUG("Send Request: %s", command.c_str()); std::string response = sendAndReceive(command); + URCL_LOG_DEBUG("Got Response: %s", response.c_str()); bool ret = std::regex_match(response, std::regex(expected)); if (!ret) {