Skip to content

Commit

Permalink
Merge pull request #5633 from Algo-devops-service/relstable3.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
algojohnlee authored Aug 4, 2023
2 parents cbccc6d + a0e31a7 commit f239f80
Show file tree
Hide file tree
Showing 449 changed files with 23,116 additions and 9,152 deletions.
133 changes: 65 additions & 68 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
version: 2.1

orbs:
win: circleci/windows@2.3.0
go: circleci/go@1.7.0
slack: circleci/slack@4.10.1
win: circleci/windows@5.0.0
go: circleci/go@1.7.3
slack: circleci/slack@4.12.5

parameters:
ubuntu_image:
type: string
default: "ubuntu-2004:202104-01"
default: "ubuntu-2004:2023.04.2"
build_dir:
type: string
default: "/opt/cibuild"
Expand Down Expand Up @@ -47,19 +47,20 @@ executors:
resource_class: arm.large
mac_amd64_medium:
macos:
xcode: 13.2.1
resource_class: medium
xcode: 14.2.0
resource_class: macos.x86.medium.gen2
environment:
HOMEBREW_NO_AUTO_UPDATE: "true"
mac_amd64_large:
macos:
xcode: 13.2.1
resource_class: large
xcode: 14.2.0
# Since they removed the large class for amd64, we will use medium here too.
resource_class: macos.x86.medium.gen2
environment:
HOMEBREW_NO_AUTO_UPDATE: "true"
mac_arm64: &executor-mac-arm64
machine: true
resource_class: algorand/macstadium-m1-macos11
resource_class: algorand/macstadium-m1
environment:
HOMEBREW_NO_AUTO_UPDATE: "true"
# these are required b/c jobs explicitly assign sizes to the executors
Expand All @@ -79,7 +80,7 @@ slack-fail-stop-step: &slack-fail-post-step
# ===== Workflow Definitions =====
workflows:
version: 2
"circleci_build_and_test":
nightly_build_and_test:
jobs:
- build_nightly:
name: << matrix.platform >>_build_nightly
Expand All @@ -94,19 +95,6 @@ workflows:
context: slack-secrets
<<: *slack-fail-post-step

- test:
name: << matrix.platform >>_test
matrix: &matrix-default
parameters:
platform: ["amd64", "arm64"]
filters: &filters-default
branches:
ignore:
- /rel\/.*/
- << pipeline.parameters.valid_nightly_branch >>
context: slack-secrets
<<: *slack-fail-post-step

- test_nightly:
name: << matrix.platform >>_test_nightly
matrix:
Expand All @@ -116,15 +104,6 @@ workflows:
context: slack-secrets
<<: *slack-fail-post-step

- integration:
name: << matrix.platform >>_integration
matrix:
<<: *matrix-default
filters:
<<: *filters-default
context: slack-secrets
<<: *slack-fail-post-step

- integration_nightly:
name: << matrix.platform >>_integration_nightly
matrix:
Expand All @@ -134,15 +113,6 @@ workflows:
context: slack-secrets
<<: *slack-fail-post-step

- e2e_expect:
name: << matrix.platform >>_e2e_expect
matrix:
<<: *matrix-default
filters:
<<: *filters-default
context: slack-secrets
<<: *slack-fail-post-step

- e2e_expect_nightly:
name: << matrix.platform >>_e2e_expect_nightly
matrix:
Expand All @@ -152,15 +122,6 @@ workflows:
context: slack-secrets
<<: *slack-fail-post-step

- e2e_subs:
name: << matrix.platform >>_e2e_subs
matrix:
<<: *matrix-default
filters:
<<: *filters-default
context: slack-secrets
<<: *slack-fail-post-step

- e2e_subs_nightly:
name: << matrix.platform >>_e2e_subs_nightly
matrix:
Expand All @@ -172,17 +133,6 @@ workflows:
- aws-secrets
<<: *slack-fail-post-step

- tests_verification_job:
name: << matrix.platform >>_<< matrix.job_type >>_verification
matrix:
parameters:
platform: ["amd64", "arm64"]
job_type: ["test", "integration", "e2e_expect"]
requires:
- << matrix.platform >>_<< matrix.job_type >>
context: slack-secrets
<<: *slack-fail-post-step

- tests_verification_job_nightly:
name: << matrix.platform >>_<< matrix.job_type >>_verification
matrix:
Expand All @@ -203,17 +153,63 @@ workflows:
- << matrix.platform >>_integration_nightly_verification
- << matrix.platform >>_e2e_expect_nightly_verification
- << matrix.platform >>_e2e_subs_nightly
filters:
branches:
only:
- /rel\/.*/
- << pipeline.parameters.valid_nightly_branch >>
context:
- slack-secrets
- aws-secrets
<<: *slack-fail-post-step

#- windows_x64_build
"circleci_build_and_test":
jobs:
- test:
name: << matrix.platform >>_test
matrix: &matrix-default
parameters:
platform: ["amd64"]
filters: &filters-default
branches:
ignore:
- /rel\/.*/
- << pipeline.parameters.valid_nightly_branch >>
context: slack-secrets
<<: *slack-fail-post-step

- integration:
name: << matrix.platform >>_integration
matrix:
<<: *matrix-default
filters:
<<: *filters-default
context: slack-secrets
<<: *slack-fail-post-step

- e2e_expect:
name: << matrix.platform >>_e2e_expect
matrix:
<<: *matrix-default
filters:
<<: *filters-default
context: slack-secrets
<<: *slack-fail-post-step

- e2e_subs:
name: << matrix.platform >>_e2e_subs
matrix:
<<: *matrix-default
filters:
<<: *filters-default
context: slack-secrets
<<: *slack-fail-post-step

- tests_verification_job:
name: << matrix.platform >>_<< matrix.job_type >>_verification
matrix:
parameters:
platform: ["amd64"]
job_type: ["test", "integration", "e2e_expect"]
requires:
- << matrix.platform >>_<< matrix.job_type >>
context: slack-secrets
<<: *slack-fail-post-step

# ===== Job Definitions =====
jobs:
Expand Down Expand Up @@ -461,7 +457,7 @@ commands:
shell: bash.exe
command: |
choco install -y msys2 pacman make wget --force
choco install -y golang --version=1.17.13 --force
choco install -y golang --version=1.20.5 --force
choco install -y python3 --version=3.7.3 --force
export msys2='cmd //C RefreshEnv.cmd '
export msys2+='& set MSYS=winsymlinks:nativestrict '
Expand Down Expand Up @@ -606,6 +602,7 @@ commands:
export PACKAGE_NAMES=$(echo $PACKAGES | tr -d '\n')
export PARTITION_TOTAL=${CIRCLE_NODE_TOTAL}
export PARTITION_ID=${CIRCLE_NODE_INDEX}
export GOEXPERIMENT="none"
gotestsum --format standard-verbose --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:
path: << parameters.result_path >>
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v3.5.3
- uses: actions/setup-go@v4.0.1
with:
go-version-file: 'go.mod'
- run: go version
Expand All @@ -29,7 +29,7 @@ jobs:
# degradation, (2) `eval` degradation. (2) suggests a broader performance
# issue.
- name: Run benchmark
run: go test ./data/transactions/logic -bench 'BenchmarkUintMath' | tee benchmark_output.txt
run: go test ./data/transactions/logic -bench 'BenchmarkUintMath' -run=^$ | tee benchmark_output.txt
- name: Push benchmark result to gh-pages branch
if: github.event_name == 'push'
uses: benchmark-action/github-action-benchmark@v1
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ jobs:
update: true
path-type: inherit
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
- name: Determine Go version
id: go_version
run: echo "GO_VERSION=$(./scripts/get_golang_version.sh)" >> $GITHUB_ENV
- name: Install golang
uses: actions/setup-go@v3
uses: actions/setup-go@v4.0.1
with:
go-version: "1.17.13"
go-version: ${{ env.GO_VERSION }}
- name: Restore libsodium from cache
id: cache-libsodium
uses: actions/cache@v3
uses: actions/cache@v3.3.1
with:
path: crypto/libs
key: libsodium-fork-v2-${{ runner.os }}-${{ hashFiles('crypto/libsodium-fork/**') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codegen_verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
path: go-algorand
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3

- name: Generate Container Metadata
id: meta
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
# if: github.ref == format('refs/heads/{0}', 'master')
# steps:
# - name: Checkout Code
# uses: actions/checkout@v3
# uses: actions/checkout@v3.5.3

# - name: Update DockerHub Repository Description
# uses: peter-evans/dockerhub-description@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-type-category.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Check PR Category and Type
steps:
- name: Checking for correct number of required github pr labels
uses: mheap/github-action-required-labels@v2
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0 # required for new-from-rev option in .golangci.yml
- name: Install libraries
run: sudo apt-get -y -q install libboost-math-dev
# move go out of the way temporarily to avoid "go list ./..." from installing modules
- name: Make libsodium.a
run: sudo mv /usr/bin/go /usr/bin/go.bak && make crypto/libs/linux/amd64/lib/libsodium.a && sudo mv /usr/bin/go.bak /usr/bin/go
- name: reviewdog-golangci-lint
uses: reviewdog/action-golangci-lint@v2
uses: reviewdog/action-golangci-lint@v2.3.1
with:
go_version_file: go.mod
golangci_lint_version: "v1.47.3"
golangci_lint_version: "v1.53.2"
golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners"
reporter: "github-pr-check"
tool_name: "Lint Errors"
Expand All @@ -34,37 +32,38 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0 # required for new-from-rev option in .golangci.yml
- name: Install libraries
run: sudo apt-get -y -q install libboost-math-dev
# move go out of the way temporarily to avoid "go list ./..." from installing modules
- name: Make libsodium.a
run: sudo mv /usr/bin/go /usr/bin/go.bak && make crypto/libs/linux/amd64/lib/libsodium.a && sudo mv /usr/bin/go.bak /usr/bin/go
- name: Add bin to PATH
run: |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
echo "$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin" >> $GITHUB_PATH
- name: Determine Go version
id: go_version
run: echo "GO_VERSION=$(./scripts/get_golang_version.sh)" >> $GITHUB_ENV
- name: Install specific golang
uses: actions/setup-go@v3
uses: actions/setup-go@v4.0.1
with:
go-version: '1.17.13'
go-version: ${{ env.GO_VERSION }}
- name: Create folders for golangci-lint
run: mkdir -p cicdtmp/golangci-lint
- name: Check if custom golangci-lint is already built
id: cache-golangci-lint
uses: actions/cache@v3
uses: actions/cache@v3.3.1
with:
path: cicdtmp/golangci-lint/golangci-lint-cgo
key: cicd-golangci-lint-cgo-v0.0.1
key: cicd-golangci-lint-cgo-v0.0.2

- name: Build custom golangci-lint with CGO_ENABLED
if: steps.cache-golangci-lint.outputs.cache-hit != 'true'
run: |
cd cicdtmp/golangci-lint
git clone https://github.com/golangci/golangci-lint.git .
git checkout tags/v1.47.3
git checkout tags/v1.53.2
CGO_ENABLED=true go build -trimpath -o golangci-lint-cgo ./cmd/golangci-lint
./golangci-lint-cgo --version
cd ../../
Expand Down
Loading

0 comments on commit f239f80

Please sign in to comment.