Skip to content

Commit

Permalink
Archive C++ src on build and release
Browse files Browse the repository at this point in the history
Previously we only kept the C++ build artifacts for each build and
release, which (if my understanding of C++ is correct - which I don't
think it was a while ago) is relatively useless, unless you are on the
same OS, compiler etc.

So here we are taking a zip of the src, and keeping it, pushing it to
Cloud Storage when a PR is made, and also making sure it's in the
releases folder on release.
  • Loading branch information
markmandel committed May 25, 2018
1 parent 9ed17f6 commit 1a65bad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ do-release:
cp $(agones_path)/cmd/sdk-server/bin/agonessdk-server-$(RELEASE_VERSION).zip $(agones_path)/release
cp $(agones_path)/sdks/cpp/bin/agonessdk-$(RELEASE_VERSION)-runtime-linux-arch_64.tar.gz $(agones_path)/release
cp $(agones_path)/sdks/cpp/bin/agonessdk-$(RELEASE_VERSION)-dev-linux-arch_64.tar.gz $(agones_path)/release
cp $(agones_path)/sdks/cpp/bin/agonessdk-$(RELEASE_VERSION)-src.zip $(agones_path)/release
zip --junk-paths $(agones_path)/release/agones-$(RELEASE_VERSION).zip $(agones_path)/README.md $(agones_path)/install.yaml $(agones_path)/LICENSE
$(MAKE) gcloud-auth-docker push VERSION=$(RELEASE_VERSION)
git push -u origin release-$(RELEASE_VERSION)
Expand Down
3 changes: 3 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ steps:
- name: 'gcr.io/cloud-builders/gsutil'
dir: "sdks/cpp/bin"
args: ['cp', '*.tar.gz', 'gs://agones-artifacts/cpp-sdk']
- name: 'gcr.io/cloud-builders/gsutil'
dir: "sdks/cpp/bin"
args: ['cp', '*.zip', 'gs://agones-artifacts/cpp-sdk']
- name: 'gcr.io/cloud-builders/gsutil'
dir: "cmd/sdk-server/bin"
args: ['cp', '*.zip', 'gs://agones-artifacts/sdk-server']
Expand Down
2 changes: 2 additions & 0 deletions sdks/cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ ensure-bin:
# build dev and runtime tarballs
archive: VERSION = "dev"
archive:
-rm $(build_path)/bin/agonessdk-$(VERSION)-src.zip
-rm $(build_path)/bin/agonessdk-$(VERSION)-dev-linux-arch_64.tar.gz
-rm $(build_path)/bin/agonessdk-$(VERSION)-runtime-linux-arch_64.tar.gz
cp /usr/local/lib/libgrpc.so.5 $(build_path)/bin/
Expand All @@ -71,6 +72,7 @@ archive:
cp /usr/local/lib/libgrpc_unsecure.so.5 $(build_path)/bin/
cd $(build_path)/bin && tar cvf agonessdk-$(VERSION)-runtime-linux-arch_64.tar.gz *
cd /usr/local && tar cvf $(build_path)/bin/agonessdk-$(VERSION)-dev-linux-arch_64.tar.gz lib include
cd $(build_path) && zip ./bin/agonessdk-$(VERSION)-src.zip Makefile *.md *.cc *.h

clean:
-rm -r $(build_path)/bin
Expand Down

0 comments on commit 1a65bad

Please sign in to comment.