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

build: allow building without scion-ci #4449

Merged
merged 1 commit into from
Nov 27, 2023
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: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ steps:
- label: "E2E: default :docker: (ping)"
command:
- echo "--- build"
- make build docker-images
- make build-dev docker-images
- echo "--- start topology"
- ./scion.sh topology -d
- ./scion.sh run
Expand Down
21 changes: 12 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
.PHONY: all antlr bazel clean docker-images gazelle go.mod licenses mocks protobuf scion-topo test test-integration write_all_source_files
.PHONY: all build build-dev antlr clean docker-images gazelle go.mod licenses mocks protobuf scion-topo test test-integration write_all_source_files

build: bazel
build-dev:
rm -f bin/*
bazel build //:scion //:scion-ci
tar -kxf bazel-bin/scion.tar -C bin
tar -kxf bazel-bin/scion-ci.tar -C bin

build:
rm -f bin/*
bazel build //:scion
tar -kxf bazel-bin/scion.tar -C bin

# all: performs the code-generation steps and then builds; the generated code
# is git controlled, and therefore this is only necessary when changing the
# sources for the code generation.
# Use NOTPARALLEL to force correct order.
# Note: From GNU make 4.4, this still allows building any other targets (e.g. lint) in parallel.
.NOTPARALLEL: all
all: go_deps.bzl protobuf mocks gazelle build antlr write_all_source_files licenses
all: go_deps.bzl protobuf mocks gazelle build-dev antlr write_all_source_files licenses

clean:
bazel clean
Expand All @@ -18,12 +27,6 @@ scrub:
bazel clean --expunge
rm -f bin/*

bazel:
rm -f bin/*
bazel build //:scion //:scion-ci
tar -kxf bazel-bin/scion.tar -C bin
tar -kxf bazel-bin/scion-ci.tar -C bin

test:
bazel test --config=unit_all

Expand Down
3 changes: 3 additions & 0 deletions doc/dev/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ Bazel

make

.. hint:: This builds tools for tests in addition to the main SCION services (e.g., `end2end`);
if you don't require those, you can only build the SCION services by running ``make build``.

#. Finally, check that tests run correctly:

.. code-block:: bash
Expand Down
Loading