Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/vm2-3.9.17
Browse files Browse the repository at this point in the history
  • Loading branch information
lvpeschke authored Jul 20, 2023
2 parents 0b9461d + 504732d commit a5c216a
Show file tree
Hide file tree
Showing 450 changed files with 5,000 additions and 26,493 deletions.
59 changes: 36 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
# and https://github.com/facebook/react-native/blob/master/.circleci/config.yml

version: 2.1

setup: true

parameters:
run-workflow-general:
type: boolean
default: false
run-workflow-npm-install:
type: boolean
default: false
run-workflow-protocol-coverage:
type: boolean
default: false
# When you need to force a rebuild of the node modules cache then bump this version
node-modules-cache-version:
type: integer
Expand Down Expand Up @@ -36,14 +45,14 @@ defaults: &defaults
contract-defaults: &contract-defaults
<<: *defaults
environment:
RELEASE_TAG: core-contracts.v8
RELEASE_TAG: core-contracts.v9

e2e-defaults: &e2e-defaults
<<: *defaults
docker:
- image: celohq/circleci:geth1.9-2
- image: us-west1-docker.pkg.dev/devopsre/celo-monorepo/circleci-geth:latest
environment:
CELO_BLOCKCHAIN_BRANCH_TO_TEST: master
CELO_BLOCKCHAIN_BRANCH_TO_TEST: release/1.7.x
general:
artifacts:
- 'protocol/coverage'
Expand Down Expand Up @@ -253,7 +262,7 @@ jobs:
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
echo "Comparing against $RELEASE_TAG"
# Github has phased out the git protocol so we ensure that we use
# Github has phased out the http protocol so we ensure that we use
# https for all git operations that yarn may perform.
git config --global url."https://github.com".insteadOf git://github.com
yarn --cwd packages/protocol test:generate-old-devchain-and-build -b $RELEASE_TAG -d .tmp/released_chain -l /dev/stdout -g scripts/truffle/releaseGoldExampleConfigs.json
Expand Down Expand Up @@ -887,10 +896,22 @@ jobs:
name: Add summary of flakey tests to GitHub Checks
command: |
node ./packages/flake-tracker/scripts/summary.js
# Dummy job for not showing CircleCI error: "Error: All Workflows have been filtered from this Pipeline"
# Check https://github.com/CircleCI-Public/circleci-cli/issues/577 for more context
noop:
docker:
- image: cimg/base:current
resource_class: small
steps:
- run: echo "noop"

workflows:
version: 2
celo-monorepo-build:
# Contitionally triggered
when:
or: [<< pipeline.parameters.run-workflow-general >>]
jobs:
- install_dependencies
- certora-test:
Expand Down Expand Up @@ -1011,30 +1032,17 @@ workflows:
- end-to-end-cip35-eth-compatibility-test
- odis-test
npm-install-testing-cron-workflow:
triggers:
- schedule:
# 7 PM in UTC = noon in PDT.
# Best for test to fail during SF afternoon, so that, someone can fix it during the day time.
cron: '0 19 * * *'
filters:
branches:
only:
- master
# Contitionally triggered
when:
or: [<< pipeline.parameters.run-workflow-npm-install >>]
jobs:
- test-typescript-npm-package-install
- test-utils-npm-package-install
- test-contractkit-npm-package-install
- test-celocli-npm-package-install
protocol-testing-with-code-coverage-cron-workflow:
triggers:
- schedule:
# 1 PM in UTC = 6 AM in PDT.
# Best for this slow test (~3 hours) to run during SF early morning.
cron: '0 13 * * *'
filters:
branches:
only:
- master
when:
or: [<< pipeline.parameters.run-workflow-protocol-coverage >>]
jobs:
- install_dependencies
- lint-checks:
Expand All @@ -1043,3 +1051,8 @@ workflows:
- protocol-test-with-code-coverage:
requires:
- lint-checks
# Dummy job for not showing CircleCI error: "Error: All Workflows have been filtered from this Pipeline"
# Check https://github.com/CircleCI-Public/circleci-cli/issues/577 for more context
no-changes:
jobs:
- noop
2 changes: 0 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ GETH_VMODULE="consensus/*=2"
GETH_ENABLE_METRICS=false
GETH_USE_MYCELO=false

VM_BASED=false

KUBERNETES_CLUSTER_NAME="celo-networks-dev"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-networks-dev"
Expand Down
2 changes: 0 additions & 2 deletions .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ ENV_TYPE="production"

GETH_VERBOSITY=2

VM_BASED=false

KUBERNETES_CLUSTER_NAME="alfajores"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"
Expand Down
1 change: 0 additions & 1 deletion .env.baklava
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ENV_TYPE="production"
GETH_VERBOSITY=2
GETH_ENABLE_METRICS=true

VM_BASED=false

KUBERNETES_CLUSTER_NAME="baklavastaging"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
Expand Down
1 change: 0 additions & 1 deletion .env.oracledev
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ CLUSTER_CREATION_FLAGS="--enable-autoscaling --min-nodes 3 --max-nodes 8 --machi

# ---- VM ----

VM_BASED=false

# ---- Blockscout ----

Expand Down
3 changes: 0 additions & 3 deletions .env.rc1staging
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ ENV_TYPE="staging"
GETH_VERBOSITY=2
GETH_ENABLE_METRICS=true

# TODO: deprecated
VM_BASED=false

KUBERNETES_CLUSTER_NAME="rc1staging"
KUBERNETES_CLUSTER_ZONE="us-west1-a"
CLUSTER_DOMAIN_NAME="celo-testnet"
Expand Down
1 change: 0 additions & 1 deletion .env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ GETH_NODE_DOCKER_IMAGE_TAG="8a44c2cd92200bdffce595c7558e84a39ea2bc15"

GETH_VERBOSITY=2

VM_BASED=false

KUBERNETES_CLUSTER_NAME=celo-networks-dev
KUBERNETES_CLUSTER_ZONE="us-west1-a"
Expand Down
20 changes: 20 additions & 0 deletions .github/actions/protocol-sync-workspace/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Sync workspace for protocol tests"
description: "Sync workspace for protocol tests"
inputs:
package-json-checksum:
description: "Checksum of package.json"
required: true
runs:
using: "composite"
steps:
- name: Sync workspace
uses: ./.github/actions/sync-workspace
with:
package-json-checksum: ${{ inputs.package-json-checksum }}
- uses: actions/cache/restore@v3
id: cache_protocol
with:
path: packages/protocol/.tmp/released_chain
key: protocol-${{ github.sha }}
enableCrossOsArchive: true
fail-on-cache-miss: true
54 changes: 54 additions & 0 deletions .github/actions/sync-workspace/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "Sync workspace"
description: "Sync GitHub Action workspace using GitHub cache"
inputs:
package-json-checksum:
description: "Checksum of package.json"
required: true
rebuild-package:
description: "Rebuild package. It also disable fail-on-cache-miss"
required: false
default: 'false'
runs:
using: "composite"
steps:
- uses: actions/cache/restore@v3
id: cache_node
env:
REBUILD_PACKAGE: ${{ inputs.rebuild-package }}
with:
path: |
node_modules
packages/**/node_modules
key: node-${{ runner.os }}-${{ runner.arch }}-${{ env.NODE_MODULE_CACHE_VERSION }}-${{ hashFiles('**/yarn.lock') }}-${{ inputs.package-json-checksum }}
enableCrossOsArchive: true
fail-on-cache-miss: "!${{ fromJSON(env.REBUILD_PACKAGE) }}"
- name: Restore build artifacts cache
uses: actions/cache/restore@v3
id: cache_build_artifacts
env:
REBUILD_PACKAGE: ${{ inputs.rebuild-package }}
with:
# We need to cache all the artifacts generated by yarn install+build
# Update this list also in .github/actions/sync-workspace/action.yml with exactly the same list
path: |
packages/**/lib
packages/**/dist
packages/**/build
packages/protocol/*.js
packages/protocol/*.js.map
packages/protocol/**/*.js
packages/protocol/**/*.js.map
packages/sdk/contractkit/src/generated
key: code-${{ github.sha }}
restore-keys: |
code-${{ github.sha }}
enableCrossOsArchive: true
fail-on-cache-miss: "!${{ fromJSON(env.REBUILD_PACKAGE) }}"
- name: Rebuild package
shell: bash --login -eo pipefail {0}
env:
REBUILD_PACKAGE: ${{ inputs.rebuild-package }}
if: ${{ fromJSON(env.REBUILD_PACKAGE) }}
run: |
yarn install
yarn build --ignore docs --include-dependencies
Loading

0 comments on commit a5c216a

Please sign in to comment.