Commit Graph

18 Commits

Author SHA1 Message Date
dependabot[bot] c66d6bfa38
build(deps): bump docker/build-push-action from 2.9.0 to 2.10.0 (#3878)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.9.0 to 2.10.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.9.0...v2.10.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-15 22:35:18 +00:00
Gustavo Valverde d8d3f6407c
build(cache): do not use GHA cache for images (#3794)
GitHub's GHA cache gets invalidated at 10Gb, which is very easy to hit when we're building multiple times a day with several commits.

Instead use the registry, which won't get invalidated until a change is identified in the build process.
2022-03-10 01:12:34 +00:00
Conrado Gouvea 0d2c7154ea
build(deps): bump actions/checkout from 2.4.0 to 3.0.0 (#3806) 2022-03-09 03:38:38 +00:00
Gustavo Valverde ce0727e306
build(docker): revert supporting arm64 (#3791)
Building crates it's taking too much time and timing out on GitHub's Action.
2022-03-08 15:22:03 +00:00
dependabot[bot] cee770fe2c
build(deps): bump docker/login-action from 1.13.0 to 1.14.1 (#3761)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.13.0 to 1.14.1.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1.13.0...v1.14.1)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-08 09:14:10 +00:00
dependabot[bot] 26d6ef9aa0
build(deps): bump docker/login-action from 1.12.0 to 1.13.0 (#3570)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-05 17:34:54 +00:00
Conrado Gouvea 2f6a48bed8
fix(tests): use TEST_FAKE_ACTIVATION_HEIGHTS at runtime and fix tests (#3749)
* fix: check TEST_FAKE_ACTIVATION_HEIGHTS at runtime

* fix(tests): add TEST_FAKE_ACTIVATION_HEIGHTS variable

This variable ensures the test is activated in the `test-fake-activation-heights` step

* fix(docker): do not run specific tests by default in entrypoint.sh

* fix(test): remove extra TEST_FULL_SYNC argument

* imp(timeout): wait for an average build time

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-03-05 13:32:46 -04:00
Gustavo Valverde d9a0f9d657
fix(build, deployment): missing job key and timeout bump for build (#3744)
* fix: add missing job key

* fix(arm64): bump timeout to build without cache

* fix(deployment): apply changes made in 5004c4d3a1

* fix: remove uneeded condition

* refactor(tests):  make vm names refer the test name

This also adds a build step for full sync, as there won't be a reference image when using workflow_dispatch

* fix(deployment): testing depends on the built image
2022-03-04 15:55:32 -04:00
Gustavo Valverde 15949c8c37
refactor(test): decouple full sync from other tests (#3735)
* refactor(test): decouple full sync from other tests

As the full sync requires to be run just once and isolated, we're running this test in a separate workflow, after a PR has been approved.

* fix: revert to previous conditions in job regenerate-stateful-disks

* fix(condition): get disk sha if regeneration is not executed

* fix: typo

* Update .github/workflows/test-full-sync.yml

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>

* fix(build): bump build time for arm64

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-03-04 08:12:22 +00:00
Gustavo Valverde 5004c4d3a1
refactor(build): use OCI Image Format Specification for labels (#3728)
* refactor(build): use OCI Image Format Specification for labels

This should also fix when an image gets built multiple times using the cache, as each image differs in labels

* refactor(tags): use PR context sha and ref

Remove the needed of PR Head SHA and Ref, as those can cause conflict depending on how the branch name has been established
2022-03-04 02:33:29 -04:00
Gustavo Valverde c176e2a423
feat(build): add arm64 support with cross-compilation (#3678)
* add(actions): lightwalletd continous integrations

* refactor(actions): build lightwalletd and reuse it in zebra

- Download lightwalletd source code
- Create a new Dockerfile for lightwalletd
- Use lightwalletd binary in Zebra's image
- Create a specific step to build/update lightwalletd
- Add lightwalletd integration test to the test suite
- Remove lightwalletd.yml, as it was harder to control

* refactor(docker): organize Dockerfiles and remove unused

Fixes: #3344

* feat(build): add arrm64 support

* fix(build): do not install google-compute-engine in arm64

This package is not available for this platform

* fix(build): do not build arm64 for tests

* fix(condition): indent for better visibility

* fix(condition): wrong use of operators
2022-03-03 00:39:41 +00:00
teor 6b31f5b454
fix(ci): update CI job path triggers (#3692)
* ci(test): re-run tests when snapshot data changes

* fix(ci): rebuild state when disk format changes

* fix(ci): rebuild rust docs when code or dependencies change

* doc(ci): explain why we run jobs when files change

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-03-02 14:23:05 +00:00
Gustavo Valverde a0c451223f
feat(lightwalletd): add build and CI pipeline (#3657)
* add(actions): lightwalletd continous integrations

* refactor(actions): build lightwalletd and reuse it in zebra

- Download lightwalletd source code
- Create a new Dockerfile for lightwalletd
- Use lightwalletd binary in Zebra's image
- Create a specific step to build/update lightwalletd
- Add lightwalletd integration test to the test suite
- Remove lightwalletd.yml, as it was harder to control

* fix(build): remove extra port being exposed

* fix(lightwalletd): test should be after `--` in cargo test

* revert(lint): do not lint external code as it can be confusing

* fix(test): lightwalletd_integration test is not ignored

* docs(docker): clarify the addition of unused args

* refactor(docker): organize Dockerfiles and remove unused

Fixes: #3344

* fix(actions): activate workflows on correct path changes

* test

* revert previous commit

* feat(build): add arm64 support with cross-compilation (#3659)

* feat(build): add arrm64 support

* fix(build): do not install google-compute-engine in arm64

This package is not available for this platform

* fix(build): do not build arm64 for tests

* fix(changes): reduce changelog

* Revert "feat(build): add arm64 support with cross-compilation (#3659)"

This reverts commit 291e00c405.
2022-03-02 09:00:55 +00:00
dependabot[bot] 2cae880e3e
Bump google-github-actions/auth from 0.5.0 to 0.6.0 (#3496)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-13 12:39:18 +00:00
dependabot[bot] a471e9e3ee
Bump docker/build-push-action from 2.8.0 to 2.9.0 (#3497)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.8.0...v2.9.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-13 12:37:06 +00:00
Gustavo Valverde fd8c727c31
fix(actions): typo on paths filtering (#3516)
The keyword is `paths` and the actions were using `path`

That's the reason why most actions have been running, and there's been no impact in time savings
2022-02-11 14:05:19 +00:00
Gustavo Valverde 284aeb7106
fix: temporarily allow forked repos to run PR workflows (#3503)
* fix(zcash-params): Do not update parameters image on PR

We should not update a direct dependency of our Docker image to be writeable by a PR from anywhere, a local branch or a fork branch, before that change has been approved by a human and merged to #main

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-02-10 07:31:33 -04:00
Gustavo Valverde a872f1727a
refactor(cd): improve Docker and gcloud usage without Cloud Build (#3431)
* refactor (cd): overall pipeline improvement

- Use a more ENV configurable Dockerfile
- Remove cloudbuild dependency
- Use compute optimized machine types
- Use SSD instead of normal hard drives
- Move Sentry endpoint to secrets
- Use a single yml for auto & manual deploy
- Migrate to Google Artifact Registry

* refactor (cd): overall pipeline improvement

- Use a more ENV configurable Dockerfile
- Remove cloudbuild dependency
- Use compute optimized machine types
- Use SSD instead of normal hard drives
- Move Sentry endpoint to secrets
- Use a single yml for auto & manual deploy
- Migrate to Google Artifact Registry

* refactor (cd): use newer google auth action

* fix (cd): use newer secret as gcp credential

* fix (docker): do not create extra directories

* fix (docker): ignore .github for caching purposes

* fix (docker): use latest rust

* fix: use a better name for manual deployment

* refactor (docker): use standard directories for executable

* fix (cd): most systems expect a "latest" tag

Caching from the latest image is one of the main reasons to add this extra tag. Before this commit, the inline cache was not being used.

* fix (cd): push the build image and the cache separately

The inline cache exporter only supports `min` cache mode. To enable `max` cache mode, push the image and the cache separately by using the registry cache exporter.

This also allows for smaller release images.

* fix (cd): remove unused GHA cache

We're leveraging the registry to cache the actions, instead of using the 10GB limits from Github Actions cache storage

* refactor (cd): use cargo-chef for caching rust deps

* fix (release): use newer debian to reduce vulnerabilities

* fix (cd): use same zone, region and service accounts

* fix (cd): use same disk size and type for all deployments

* refactor (cd): activate interactive shells

Use interactive shells for manual and test deployments. This allow greater flexibility if troubleshooting is needed inside the machines

* fix (docker): do not build with different settings

Compiling might be slow because different steps are compiling the same code 2-4 times because of the variations

* fix(cd): use Mainnet instead of mainnet

* fix(docker): remove tests as a runtime dependency

* fix(cd): use default service account with cloud-platform scope

* fix(cd): keep compatibility with gcr.io

To prevent conflicts between registries, and migrate when the time is right, we'll keep pushing to both registries and use github actions cache to prevent conflicts between artifacts.

* fix(docker): do not download zcash params twice

* feat(docker): add google OS Config agent

Use a separate step to have better flexibility in case a better approach is available

* fix(docker): allow to use zebrad as a command

* feat: add an image to inherit from with zcash params

* refactor(docker): use cached zcash params from previous build

* imp(cd): add double safety measure for production
2022-02-08 20:50:13 -04:00