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

[ci] Update CI to ensure SAI spec are generated and updated. #595

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .github/workflows/dash-bmv2-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jobs:
run: make docker-bmv2-bldr
- name: Generate SAI API
run: DOCKER_FLAGS=$docker_fg_flags make sai
- name: Check if SAI spec is updated
run: DOCKER_FLAGS=$docker_fg_flags make check-sai-spec
- name: Build libsai c++ tests
run: DOCKER_FLAGS=$docker_fg_flags make test
- name: Prepare network
Expand Down
8 changes: 8 additions & 0 deletions dash-pipeline/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ sai-clean: SAI/SAI libsai-clean saithrift-server-clean
rm -rf SAI/SAI/inc SAI/SAI/experimental SAI/SAI/meta
cd SAI/SAI && git checkout -- inc experimental meta

.PHONY:check-sai-spec
check-sai-spec:
if git status | grep -q "SAI/specs"; then \
r12f marked this conversation as resolved.
Show resolved Hide resolved
echo 'SAI specs have changed, please run "make sai-headers" locally and commit the changes for review.'; \
echo ""; echo "SAI spec diff found as below:"; \
git diff SAI/specs; \
exit 1; \
fi

# Run to recreate same environment as building saithrift client & server
run-saithrift-bldr-bash:
Expand Down
Loading