Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to execute all static code analyzers (#196) #141

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions spaceros/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,13 @@ spaceros-artifacts:
END

IF [ $SPACEROS_REPO_URL = "https://github.com/space-ros/space-ros.git" ]
# run wget instead of `GIT CLONE`, because main repo's host is known + it is public
# run wget instead of `GIT CLONE`, because main repo's host is known + it is public
RUN wget https://raw.githubusercontent.com/space-ros/space-ros/${_GIT_COMMIT_HASH}/ros2.repos
RUN wget https://raw.githubusercontent.com/space-ros/space-ros/${_GIT_COMMIT_HASH}/excluded-pkgs.txt
RUN mkdir colcon_ws_config
RUN wget https://raw.githubusercontent.com/space-ros/space-ros/${_GIT_COMMIT_HASH}/colcon_ws_config/prepare_workspace.py -P colcon_ws_config
RUN wget https://raw.githubusercontent.com/space-ros/space-ros/${_GIT_COMMIT_HASH}/colcon_ws_config/spaceros_inject.cmake -P colcon_ws_config
RUN wget https://raw.githubusercontent.com/space-ros/space-ros/${_GIT_COMMIT_HASH}/colcon_ws_config/spaceros_linters_deps.yaml -P colcon_ws_config
ELSE
GIT CLONE --branch ${SPACEROS_GIT_REF} ${SPACEROS_REPO_URL} .
END
Expand All @@ -128,6 +132,7 @@ spaceros-artifacts:
SAVE ARTIFACT ros2.repos # vcs pulled from `spaceros` repo as-is
SAVE ARTIFACT exact.repos # `ros2.repos`, but with pinned versions (e.g. SHAs instead of branches)
SAVE ARTIFACT excluded-pkgs.txt
SAVE ARTIFACT colcon_ws_config

sources:
FROM +setup
Expand Down Expand Up @@ -189,7 +194,9 @@ build:

build-testing:
FROM +rosdep
RUN colcon build --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --no-warn-unused-cli
COPY +spaceros-artifacts/colcon_ws_config colcon_ws_config
RUN python3 colcon_ws_config/prepare_workspace.py # outputs spaceros-linters.meta
RUN colcon build --metas ./spaceros-linters.meta --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --no-warn-unused-cli
RUN . install/setup.sh && colcon test --retest-until-pass 2 --ctest-args -LE "(ikos|xfail)" --pytest-args -m "not xfail"
RUN . install/setup.sh && ros2 run process_sarif make_build_archive
COPY +spaceros-artifacts/exact.repos install/exact.repos
Expand Down
Loading