Skip to content

Commit

Permalink
build: allow building only main services (no scion-ci)
Browse files Browse the repository at this point in the history
The default target remains unchanged but is renamed to `build-dev`.
The target `build` now only builds the main SCION services.
  • Loading branch information
mlegner committed Nov 27, 2023
1 parent 799ed12 commit 1938a94
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
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

0 comments on commit 1938a94

Please sign in to comment.