Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
367c46a
Removing all but windows from travis steps
algojack Oct 8, 2021
2e69ccd
Adding back all but integration tests
algojack Oct 8, 2021
3292374
Merge branch 'algorand:master' into master
algojack Oct 8, 2021
bddab95
Merge remote-tracking branch 'upstream/master'
algojack Oct 11, 2021
35bd30e
Part one for moving devnet deploy from travis to circleci
algojack Oct 12, 2021
fb9f206
Part two of moving devnet deploy from travis to circleci
algojack Oct 12, 2021
7e4f23e
Enabled deploy and fixed permisions on results dir
algojack Oct 12, 2021
fd637b2
Wrapping env variables in curly braces
algojack Oct 12, 2021
a84bcfa
Fixing a typo
algojack Oct 12, 2021
fee7ee1
switching from nightly tests to normal just for testing
algojack Oct 12, 2021
8e3ffad
Checking results folder
algojack Oct 12, 2021
6d8eec0
filtering out most jobs
algojack Oct 12, 2021
ea89299
filtering out most jobs
algojack Oct 12, 2021
f69fffa
Turning off more tests and checking more folders
algojack Oct 12, 2021
95c7d3f
Turning off more tests
algojack Oct 12, 2021
38f3130
creating results files before using them
algojack Oct 12, 2021
4749685
changed relative path to absolute
algojack Oct 12, 2021
59670a1
Removed sudo from mkdir build_dir
algojack Oct 12, 2021
f0824d7
Revert "Removed sudo from mkdir build_dir"
algojack Oct 12, 2021
8e79712
removed mkdir build_dir from verification step
algojack Oct 12, 2021
b4106b3
Removing extra workspace stuff
algojack Oct 13, 2021
b0c7d2a
consolidated deploy steps and disabled all but deploy
algojack Oct 13, 2021
b91b039
Added aws context
algojack Oct 13, 2021
2a1eb01
Removed s3_release_bucket env var pass
algojack Oct 13, 2021
cf2028b
Re-enabling arm64 and mac deploys
algojack Oct 13, 2021
0984b75
disabled release_test for mac and arm64
algojack Oct 13, 2021
1e3d749
re-enabled all jobs that were commented out for testing
algojack Oct 13, 2021
9bbf989
Fixed results dir and path
algojack Oct 13, 2021
9b0c5f4
Setting trigger to rel and hotfix branches
algojack Oct 14, 2021
49975ea
Added approval buttons
algojack Oct 14, 2021
9892ce5
Adding filter to approval job
algojack Oct 14, 2021
5fd5a15
Removed hotfix deploy
algojack Oct 14, 2021
000616d
Updated naming
algojack Oct 14, 2021
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
127 changes: 100 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,33 @@ orbs:
go: circleci/go@1.7.0
slack: circleci/slack@4.4.2

parameters:
ubuntu_image:
type: string
default: "ubuntu-2004:202104-01"
build_dir:
type: string
default: "/opt/cibuild"
result_path:
type: string
default: "/tmp/build_test_results"

executors:
amd64_medium:
machine:
image: ubuntu-2004:202104-01
image: << pipeline.parameters.ubuntu_image >>
resource_class: medium
amd64_large:
machine:
image: ubuntu-2004:202104-01
image: << pipeline.parameters.ubuntu_image >>
resource_class: large
arm64_medium:
machine:
image: ubuntu-2004:202101-01
image: << pipeline.parameters.ubuntu_image >>
resource_class: arm.medium
arm64_large:
machine:
image: ubuntu-2004:202101-01
image: << pipeline.parameters.ubuntu_image >>
resource_class: arm.large
mac_amd64_medium:
macos:
Expand Down Expand Up @@ -138,6 +149,22 @@ workflows:
requires:
- << matrix.platform >>_<< matrix.job_type >>

- upload_binaries:
name: << matrix.platform >>_upload_binaries
matrix:
<<: *matrix-default
requires:
- << matrix.platform >>_test_nightly_verification
- << matrix.platform >>_integration_nightly_verification
- << matrix.platform >>_e2e_expect_nightly_verification
filters:
branches:
only:
- /rel\/.*/
context:
- slack-secrets
- aws-secrets

#- windows_x64_build

commands:
Expand All @@ -146,18 +173,20 @@ commands:
steps:
- run: |
sudo rm -rf ${HOME}/.go_workspace /usr/local/go

prepare_build_dir:
description: Set up build directory
parameters:
build_dir:
type: string
default: "/opt/cibuild"
default: << pipeline.parameters.build_dir >>
steps:
- run:
working_directory: /tmp
command: |
sudo mkdir -p << parameters.build_dir >>
sudo chown -R $USER:$GROUP << parameters.build_dir >>

prepare_windows:
description: Prepare windows image
steps:
Expand All @@ -180,7 +209,7 @@ commands:
parameters:
build_dir:
type: string
default: "/opt/cibuild"
default: << pipeline.parameters.build_dir >>
steps:
- restore_libsodium
- restore_cache:
Expand Down Expand Up @@ -246,7 +275,7 @@ commands:
parameters:
build_dir:
type: string
default: "/opt/cibuild"
default: << pipeline.parameters.build_dir >>
result_subdir:
type: string
no_output_timeout:
Expand All @@ -257,11 +286,14 @@ commands:
default: ""
result_path:
type: string
default: "/tmp/results"
default: << pipeline.parameters.result_path >>
steps:
- attach_workspace:
at: << parameters.build_dir >>
- run: mkdir -p << parameters.result_path >>/<< parameters.result_subdir >>/$CIRCLE_NODE_INDEX
- run: |
mkdir -p << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}
touch << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}/results.xml
touch << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}/testresults.json
- restore_cache:
keys:
- 'go-cache-v2-{{ .Environment.CIRCLE_STAGE }}-'
Expand All @@ -284,8 +316,8 @@ commands:
scripts/buildtools/install_buildtools.sh -o "gotest.tools/gotestsum"
PACKAGES="$(go list ./... | grep -v /go-algorand/test/)"
export PACKAGE_NAMES=$(echo $PACKAGES | tr -d '\n')
export PARTITION_TOTAL=$CIRCLE_NODE_TOTAL
export PARTITION_ID=$CIRCLE_NODE_INDEX
export PARTITION_TOTAL=${CIRCLE_NODE_TOTAL}
export PARTITION_ID=${CIRCLE_NODE_INDEX}
export PARALLEL_FLAG="-p 1"
gotestsum --format testname --junitfile << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}/results.xml --jsonfile << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}/testresults.json -- --tags "sqlite_unlock_notify sqlite_omit_load_extension" << parameters.short_test_flag >> -race -timeout 1h -coverprofile=coverage.txt -covermode=atomic -p 1 $PACKAGE_NAMES
- store_artifacts:
Expand Down Expand Up @@ -316,7 +348,7 @@ commands:
parameters:
build_dir:
type: string
default: "/opt/cibuild"
default: << pipeline.parameters.build_dir >>
result_subdir:
type: string
no_output_timeout:
Expand All @@ -327,11 +359,14 @@ commands:
default: ""
result_path:
type: string
default: "/tmp/results"
default: << pipeline.parameters.result_path >>
steps:
- attach_workspace:
at: << parameters.build_dir >>
- run: mkdir -p << parameters.result_path >>/<< parameters.result_subdir >>/$CIRCLE_NODE_INDEX
- run: |
mkdir -p << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}
touch << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}/results.xml
touch << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}/testresults.json
- run:
name: Run integration tests
no_output_timeout: << parameters.no_output_timeout >>
Expand All @@ -351,9 +386,9 @@ commands:
scripts/buildtools/install_buildtools.sh -o "gotest.tools/gotestsum"
export ALGOTEST=1
export SHORTTEST=<< parameters.short_test_flag >>
export TEST_RESULTS=<< parameters.result_path >>/<< parameters.result_subdir >>/$CIRCLE_NODE_INDEX
export PARTITION_TOTAL=$CIRCLE_NODE_TOTAL
export PARTITION_ID=$CIRCLE_NODE_INDEX
export TEST_RESULTS=<< parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}
export PARTITION_TOTAL=${CIRCLE_NODE_TOTAL}
export PARTITION_ID=${CIRCLE_NODE_INDEX}
test/scripts/run_integration_tests.sh
- store_artifacts:
path: << parameters.result_path >>
Expand All @@ -370,7 +405,7 @@ commands:
parameters:
result_path:
type: string
default: "/tmp/results"
default: << pipeline.parameters.result_path >>
result_subdir:
type: string
steps:
Expand All @@ -385,6 +420,27 @@ commands:
path: << parameters.result_path >>/<< parameters.result_subdir >>
destination: << parameters.result_subdir >>/combined-test-results

upload_binaries_command:
description: save build artifacts for potential deployments
parameters:
platform:
type: string
build_dir:
type: string
default: << pipeline.parameters.build_dir >>
steps:
- run:
name: Upload binaries << parameters.platform >>
environment:
TRAVIS_BRANCH: ${CIRCLE_BRANCH}
command: |
scripts/travis/deploy_packages.sh
- when:
condition:
equal: [ "amd64", << parameters.platform >> ]
steps:
- run: scripts/travis/test_release.sh

jobs:
codegen_verification:
executor: amd64_medium
Expand All @@ -401,7 +457,7 @@ jobs:
platform:
type: string
executor: << parameters.platform >>_medium
working_directory: /opt/cibuild/project
working_directory: << pipeline.parameters.build_dir >>/project
steps:
- prepare_build_dir
- checkout
Expand All @@ -413,7 +469,7 @@ jobs:
platform:
type: string
executor: << parameters.platform >>_large
working_directory: /opt/cibuild/project
working_directory: << pipeline.parameters.build_dir >>/project
parallelism: 4
steps:
- prepare_build_dir
Expand All @@ -428,7 +484,7 @@ jobs:
platform:
type: string
executor: << parameters.platform >>_large
working_directory: /opt/cibuild/project
working_directory: << pipeline.parameters.build_dir >>/project
parallelism: 4
steps:
- prepare_build_dir
Expand All @@ -446,7 +502,7 @@ jobs:
platform:
type: string
executor: << parameters.platform >>_large
working_directory: /opt/cibuild/project
working_directory: << pipeline.parameters.build_dir >>/project
parallelism: 4
environment:
E2E_TEST_FILTER: "GO"
Expand All @@ -462,7 +518,7 @@ jobs:
platform:
type: string
executor: << parameters.platform >>_large
working_directory: /opt/cibuild/project
working_directory: << pipeline.parameters.build_dir >>/project
parallelism: 4
environment:
E2E_TEST_FILTER: "GO"
Expand All @@ -480,7 +536,7 @@ jobs:
platform:
type: string
executor: << parameters.platform >>_large
working_directory: /opt/cibuild/project
working_directory: << pipeline.parameters.build_dir >>/project
parallelism: 4
environment:
E2E_TEST_FILTER: "EXPECT"
Expand All @@ -496,7 +552,7 @@ jobs:
platform:
type: string
executor: << parameters.platform >>_large
working_directory: /opt/cibuild/project
working_directory: << pipeline.parameters.build_dir >>/project
parallelism: 4
environment:
E2E_TEST_FILTER: "EXPECT"
Expand All @@ -514,7 +570,7 @@ jobs:
platform:
type: string
executor: << parameters.platform >>_large
working_directory: /opt/cibuild/project
working_directory: << pipeline.parameters.build_dir >>/project
parallelism: 4
environment:
E2E_TEST_FILTER: "SCRIPTS"
Expand All @@ -530,7 +586,7 @@ jobs:
platform:
type: string
executor: << parameters.platform >>_large
working_directory: /opt/cibuild/project
working_directory: << pipeline.parameters.build_dir >>/project
parallelism: 4
environment:
E2E_TEST_FILTER: "SCRIPTS"
Expand Down Expand Up @@ -566,6 +622,7 @@ jobs:
docker:
- image: python:3.9.6-alpine
resource_class: small
working_directory: << pipeline.parameters.build_dir >>/project
parameters:
platform: # platform: ["amd64", "arm64", "mac_amd64"]
type: string
Expand All @@ -575,3 +632,19 @@ jobs:
- checkout
- tests_verification_command:
result_subdir: << parameters.platform >>_<< parameters.job_type >>

upload_binaries:
working_directory: << pipeline.parameters.build_dir >>/project
parameters:
platform:
type: string
executor: << parameters.platform >>_medium
steps:
- prepare_build_dir
- checkout
- prepare_go
- upload_binaries_command:
platform: << parameters.platform >>
- slack/notify: &slack-fail-event
event: fail
template: basic_fail_1
30 changes: 0 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@ stages:
if: type = pull_request
- name: build_release
if: (branch =~ /^hotfix\// OR branch =~ /^rel\//) AND type != pull_request
- name: deploy
if: branch =~ /^rel\// AND type != pull_request
- name: post_deploy
if: branch =~ /^rel\// AND type != pull_request

jobs:
allow_failures:
- name: External ARM64 Deploy
- name: External ARM Build
- name: External ARM Deploy
- name: Test Release Builds
include:
- stage: build_commit
Expand Down Expand Up @@ -95,30 +89,6 @@ jobs:
script:
- $mingw64 scripts/travis/build_test.sh

- stage: deploy
name: Ubuntu Deploy
os: linux
script:
- scripts/travis/deploy_packages.sh
- scripts/travis/test_release.sh
- # same stage, parallel job
name: MacOS Deploy
os: osx
osx_image: xcode11
script: scripts/travis/deploy_packages.sh
- # same stage, parallel job
name: External ARM64 Deploy
os: linux
env:
- BUILD_TYPE: "external_build"
- TARGET_PLATFORM: "linux-arm64"
addons:
apt:
packages:
- awscli
script:
- scripts/travis/external_build.sh ./scripts/travis/deploy_packages.sh

# Don't rebuild libsodium every time
cache:
directories:
Expand Down