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: Add cross compile and basic image test #370

Merged
merged 2 commits into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ build-macos-binary:
docker run --rm -v $(project_path):/workspace -w /workspace \
-v $(CARGO_HOME)/registry:/root/.cargo/registry \
joseluisq/rust-linux-darwin-builder:$(rust_toolchain) \
sh -c "cargo build --target x86_64-apple-darwin && cargo build --release --target x86_64-apple-darwin"
sh -c "rustup target add x86_64-apple-darwin && cargo build --target x86_64-apple-darwin && cargo build --release --target x86_64-apple-darwin"

# Build release and debug container images.
# Use IMAGE_NAME argument to specify the container registry and image name. Defaults to 'quilkin'.
Expand Down
24 changes: 23 additions & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,32 @@ steps:
- BUILD_IMAGE_ARG=--cache-from ${_BUILD_IMAGE_TAG}
- test
id: test
- name: us-docker.pkg.dev/$PROJECT_ID/ci/make-docker
dir: ./build
args:
- BUILD_IMAGE_TAG=${_BUILD_IMAGE_TAG}
- BUILD_IMAGE_ARG=--cache-from ${_BUILD_IMAGE_TAG}
- build
id: build
# Run the built images for 5 seconds to make sure that the entrypoint and default config works out of the box
- name: gcr.io/cloud-builders/docker
dir: ./build
entrypoint: bash
args:
- '-c'
- 'timeout --signal=INT --preserve-status 5s docker run --rm quilkin:$(make version)'
id: test-quilkin-debug
- name: gcr.io/cloud-builders/docker
dir: ./build
entrypoint: bash
args:
- '-c'
- 'timeout --signal=INT --preserve-status 5s docker run --rm quilkin:$(make version)-debug'
id: test-quilkin-release
options:
env:
- "CARGO_HOME=/workspace/.cargo"
machineType: E2_HIGHCPU_8
machineType: E2_HIGHCPU_32
dynamic_substitutions: true
timeout: 1800s
substitutions:
Expand Down