Skip to content

Commit e292058

Browse files
committed
Merge branch 'main' into freedrive_mode
2 parents f302220 + ca5fb3e commit e292058

File tree

95 files changed

+3545
-856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+3545
-856
lines changed

.github/helpers/check_urls.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
IGNORE_FILES=""
6+
IGNORE_PATTERNS=""
7+
8+
while getopts ":f:d:p:" opt; do
9+
case "${opt}" in
10+
f)
11+
IGNORE_FILES="${OPTARG}";;
12+
d)
13+
IGNORE_DIRS="${OPTARG}";;
14+
p)
15+
IGNORE_PATTERNS="${OPTARG}";;
16+
\?)
17+
echo "Invalid option -$OPTARG"
18+
exit;;
19+
esac
20+
done
21+
22+
read -r -a ignore_files <<<"$IGNORE_FILES"
23+
read -r -a ignore_dirs <<<"$IGNORE_DIRS"
24+
read -r -a ignore_patterns <<<"$IGNORE_PATTERNS"
25+
26+
IGNORE_FILES_ARG=""
27+
for item in "${ignore_files[@]}"; do
28+
IGNORE_FILES_ARG="$IGNORE_FILES_ARG --exclude=$item"
29+
done
30+
IGNORE_DIRS_ARG=""
31+
for item in "${ignore_dirs[@]}"; do
32+
IGNORE_DIRS_ARG="$IGNORE_DIRS_ARG --exclude-dir=$item"
33+
done
34+
35+
#Find URLs in code:
36+
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)
37+
38+
fail_counter=0
39+
40+
FAILED_LINKS=()
41+
for item in $urls; do
42+
# echo $item
43+
skip=0
44+
for pattern in "${ignore_patterns[@]}"; do
45+
[[ "$item" =~ $pattern ]] && skip=1
46+
done
47+
48+
if [[ $skip == 1 ]]; then
49+
echo "SKIPPING $item"
50+
continue
51+
fi
52+
53+
filename=$(echo "$item" | cut -d':' -f1)
54+
url=$(echo "$item" | cut -d':' -f2-)
55+
echo -n "Checking $url from file $filename"
56+
if ! curl --head --silent --fail "$url" 2>&1 > /dev/null; then
57+
echo -e " \033[0;31mNOT FOUND\033[32m\n"
58+
FAILED_LINKS+=("$url from file $filename")
59+
((fail_counter=fail_counter+1))
60+
else
61+
printf " \033[32mok\033[0m\n"
62+
fi
63+
done
64+
65+
echo "Failed files:"
66+
printf '%s\n' "${FAILED_LINKS[@]}"
67+
exit $fail_counter

.github/workflows/check_links.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check Links
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
check_links:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Check URLs
15+
run: |
16+
.github/helpers/check_urls.sh \
17+
-d ".git build CMakeModules debian" \
18+
-f "package.xml ursim_docker.rst architecture_coarse.svg" \
19+
-p "vnc\.html opensource\.org\/licenses\/BSD-3-Clause"

.github/workflows/humble-binary-main.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
name: Humble Binary Build Main
22
on:
33
workflow_dispatch:
4-
branches:
5-
- humble
64
schedule:
75
# Run every morning to detect flakiness and broken dependencies
86
- cron: '03 5 * * *'
97

10-
118
jobs:
12-
binary:
9+
humble_binary_main:
1310
uses: ./.github/workflows/reusable_ici.yml
1411
with:
1512
ros_distro: humble

.github/workflows/humble-binary-testing.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
name: Humble Binary Build Testing
22
on:
33
workflow_dispatch:
4-
branches:
5-
- humble
64
schedule:
75
# Run every morning to detect flakiness and broken dependencies
86
- cron: '03 5 * * *'
97

108

119
jobs:
12-
binary:
10+
humble_binary_testing:
1311
uses: ./.github/workflows/reusable_ici.yml
1412
with:
1513
ros_distro: humble

.github/workflows/humble-semi-binary-main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
name: Humble Semi Binary Build Main
22
on:
33
workflow_dispatch:
4-
branches:
5-
- humble
64
schedule:
75
# Run every morning to detect flakiness and broken dependencies
86
- cron: '03 5 * * *'
97

108

119
jobs:
12-
binary:
10+
humble_semi_main:
1311
uses: ./.github/workflows/reusable_ici.yml
1412
with:
1513
ros_distro: humble

.github/workflows/humble-semi-binary-testing.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
name: Humble Semi Binary Build Testing
22
on:
33
workflow_dispatch:
4-
branches:
5-
- humble
64
schedule:
75
# Run every morning to detect flakiness and broken dependencies
86
- cron: '03 5 * * *'
97

108

119
jobs:
12-
binary:
10+
humble_semi_testing:
1311
uses: ./.github/workflows/reusable_ici.yml
1412
with:
1513
ros_distro: humble

.github/workflows/iron-binary-main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Iron Binary Build Main
22
on:
33
workflow_dispatch:
4-
branches:
5-
- iron
64
pull_request:
75
branches:
86
- iron
@@ -14,7 +12,7 @@ on:
1412
- cron: '13 5 * * *'
1513

1614
jobs:
17-
binary:
15+
iron_binary_main:
1816
uses: ./.github/workflows/reusable_ici.yml
1917
with:
2018
ros_distro: iron

.github/workflows/iron-binary-testing.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Iron Binary Build Testing
22
on:
33
workflow_dispatch:
4-
branches:
5-
- iron
64
pull_request:
75
branches:
86
- iron
@@ -14,7 +12,7 @@ on:
1412
- cron: '13 5 * * *'
1513

1614
jobs:
17-
binary:
15+
iron_binary_testing:
1816
uses: ./.github/workflows/reusable_ici.yml
1917
with:
2018
ros_distro: iron

.github/workflows/iron-semi-binary-main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Iron Semi Binary Build Main
22
on:
33
workflow_dispatch:
4-
branches:
5-
- iron
64
pull_request:
75
branches:
86
- iron
@@ -14,7 +12,7 @@ on:
1412
- cron: '13 5 * * *'
1513

1614
jobs:
17-
binary:
15+
iron_semi_main:
1816
uses: ./.github/workflows/reusable_ici.yml
1917
with:
2018
ros_distro: iron

.github/workflows/iron-semi-binary-testing.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Iron Semi Binary Build Testing
22
on:
33
workflow_dispatch:
4-
branches:
5-
- iron
64
pull_request:
75
branches:
86
- iron
@@ -14,7 +12,7 @@ on:
1412
- cron: '13 5 * * *'
1513

1614
jobs:
17-
binary:
15+
iron_semi_testing:
1816
uses: ./.github/workflows/reusable_ici.yml
1917
with:
2018
ros_distro: iron

0 commit comments

Comments
 (0)