@@ -15,57 +15,63 @@ endif
1515# making it possible to publish resulting artifacts to a codeartifact maven repository
1616-include ric-dev-environment/codeartifact-repo.mk
1717
18- .PHONY : target
18+
1919target :
2020 $(info ${HELP_MESSAGE})
2121 @exit 0
2222
23- .PHONY : test
23+
2424test :
2525 mvn test $(EXTRA_LOAD_ARG )
2626
27- .PHONY : setup-codebuild-agent
27+
2828setup-codebuild-agent :
2929 docker build -t codebuild-agent \
3030 --build-arg ARCHITECTURE=$(ARCHITECTURE_ALIAS ) \
3131 - < test/integration/codebuild-local/Dockerfile.agent
3232
33- .PHONY : test-smoke
33+
3434test-smoke : setup-codebuild-agent
3535 CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.alpine.yml alpine 3.15 corretto11 linux/amd64
3636 CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.alpine.yml alpine 3.15 corretto11 linux/arm64/v8
3737 CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.amazoncorretto.yml amazoncorretto amazoncorretto 11 linux/amd64
3838 CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.amazoncorretto.yml amazoncorretto amazoncorretto 11 linux/arm64/v8
3939
40- .PHONY : test-integ
40+
4141test-integ : setup-codebuild-agent
4242 CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_all.sh test/integration/codebuild
4343
4444# Command to run everytime you make changes to verify everything works
45- .PHONY : dev
45+
4646dev : test
4747
4848# Verifications to run before sending a pull request
49- .PHONY : pr
49+
5050pr : test test-smoke
5151
52- .PHONY : build
52+
53+ # The default `mvn clean install` builds all 4 native .so variants (x86_64/aarch64 × glibc/musl)
54+ # and bundles them into a single jar (see build-jni-lib.sh), runs the tests for the host
55+ # environment, and updates coverage data. This is sufficient for what we want to do here.
56+ #
57+ # Running profile-specific builds (e.g., `mvn install -P linux-aarch64`) does NOT test the
58+ # cross-compiled .so — JniHelper.load() tries each .so in order and always loads the first
59+ # one matching the host platform (linux-x86_64 on GitHub Actions runners), so the other
60+ # variants are never exercised.
61+ #
62+ # Platform-specific tests are run through test-smoke via codebuild containers.
63+
5364build :
54- mvn clean install $(EXTRA_LOAD_ARG )
55- mvn install -P linux-x86_64 $(EXTRA_LOAD_ARG )
56- mvn install -P linux_musl-x86_64 $(EXTRA_LOAD_ARG )
57- mvn install -P linux-aarch64 $(EXTRA_LOAD_ARG )
58- mvn install -P linux_musl-aarch64 $(EXTRA_LOAD_ARG )
65+ mvn clean install $(EXTRA_LOAD_ARG )
5966
60- .PHONY : publish
6167publish :
6268 ./ric-dev-environment/publish_snapshot.sh
6369
64- .PHONY : publish
70+
6571test-publish :
6672 ./ric-dev-environment/test-platform-specific-jar-snapshot.sh
6773
68- .PHONY : test-rie
74+
6975test-rie :
7076 ./scripts/test-rie.sh " EchoHandler::handleRequest"
7177
@@ -80,3 +86,5 @@ TARGETS
8086 test Run the Unit tests.
8187 test-rie Build and test RIC locally with Lambda Runtime Interface Emulator. (Requires building the project first)
8288endef
89+
90+ .PHONY : target test setup-codebuild-agent test-smoke test-integ dev pr build publish publish test-rie
0 commit comments