From ef76961a191bc522c2ae751de91e2d2cd97f1d38 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 13:16:45 +0200 Subject: [PATCH 01/27] chore: pin protolint on macOS --- .github/workflows/main_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 1d8bc63c52..63108d0c68 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -280,7 +280,7 @@ jobs: unzip protoc-24.3-osx-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc brew tap yoheimuta/protolint - brew install protolint + brew install protolint@0.50.2 # install ipfs curl -O https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz From 11e61eeb9259e7a96d304125c2f438090640a43a Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 13:18:53 +0200 Subject: [PATCH 02/27] temp!: skip checks --- .github/workflows/main_workflow.yml | 351 ++++++++++++++-------------- 1 file changed, 173 insertions(+), 178 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 63108d0c68..6d479eac4e 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -11,187 +11,182 @@ env: TENDERMINT_IMAGE_VERSION: latest jobs: - lock_check: - continue-on-error: False - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ ubuntu-latest, macos-12, windows-latest ] - python-version: ["3.10.9"] - - timeout-minutes: 18 - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@master - with: - python-version: ${{ matrix.python-version }} - - if: matrix.os != 'windows-latest' - name: Pipenv install requirements and check it can be locked - run: | - pip install pipenv==2023.7.23 - pipenv --clear - time pipenv install --verbose --dev --skip-lock - time pipenv run pip install -e .[all] - time pipenv lock - - if: matrix.os == 'windows-latest' - name: Pipenv install requirements and check it can be locked - run: | - choco install ptime - pip install pipenv==2023.7.23 - pipenv --clear - ptime pipenv install --verbose --dev --skip-lock - ptime pipenv run pip install -e .[all] - ptime pipenv lock - - install_check: - continue-on-error: False - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ ubuntu-latest ] - python-version: ["3.10.9"] - timeout-minutes: 10 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@master - with: - python-version: ${{ matrix.python-version }} - - name: Check clean installation - run: | - pip install .[all] --no-cache - autonomy --help - - copyright_doc_and_dependencies_check: - continue-on-error: False - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest] - python-version: ["3.10.9"] - - timeout-minutes: 30 - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-python@master - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - sudo apt-get update --fix-missing - sudo apt-get autoremove - sudo apt-get autoclean - pip install tomte[tox,cli]==0.2.17 - pip install --user --upgrade setuptools - - name: Check copyright headers - run: tomte format-copyright --author valory --author fetchai - - name: License compatibility check - run: tox -e liccheck - - name: Check docs - run: tox -e check-api-docs - # - name: Check doc links - # run: tomte check-doc-links --http-skips http://host.docker.internal:8545 --http-skips http://www.fipa.org/repository/ips.php3 --url-skips "https://gateway.autonolas.tech/ipfs/," --url-skips "https://github.com/valory-xyz/open-autonomy/trunk/infrastructure" --url-skips "http://host.docker.internal:8545" --url-skips "https://github.com/valory-xyz/open-operator" - - name: Check doc IPFS hashes - run: tox -e check-doc-hashes - - name: Check dependencies - run: tox -e check-dependencies - - linter_checks: - continue-on-error: False - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest] - python-version: ["3.10.9"] - - timeout-minutes: 30 - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@master - with: - python-version: ${{ matrix.python-version }} - - uses: actions/setup-go@v3 - with: - go-version: "1.17.7" - - name: Install dependencies - run: | - sudo apt-get update --fix-missing - sudo apt-get autoremove - sudo apt-get autoclean - pip install tomte[tox]==0.2.17 - pip install --user --upgrade setuptools - # install Protobuf compiler - wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip - unzip protoc-24.3-linux-x86_64.zip -d protoc - sudo mv protoc/bin/protoc /usr/local/bin/protoc - # install IPFS - sudo apt-get install -y wget - sudo npm install -g markdown-spellcheck - wget -O ./go-ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz - tar xvfz go-ipfs.tar.gz - sudo mv go-ipfs/ipfs /usr/local/bin/ipfs - ipfs init - make protolint_install - - name: Check generate protocols - run: tox -e check-generate-all-protocols - - name: Security checks - run: | - tox -e bandit - tox -e safety - - name: Check packages - run: tox -e check-packages - - name: Check hash - run: tox -e check-hash - - name: Code style check - run: | - tox -e black-check - tox -e isort-check - tox -e flake8 - tox -e vulture - tox -e darglint - - name: Static type check - run: tox -e mypy - - name: Pylint - run: tox -e pylint - - name: Check spelling - run: tox -e spell-check - - name: AbciApp consistency checks - run: | - tox -e check-abci-docstrings - tox -e check-abciapp-specs - tox -e check-handlers - tox -e check-dialogues - - scan: - name: gitleaks - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: actions/setup-go@v3 - with: - go-version: "1.17.7" - - run: | - wget https://github.com/zricethezav/gitleaks/releases/download/v8.10.1/gitleaks_8.10.1_linux_x64.tar.gz && \ - tar -xzf gitleaks_8.10.1_linux_x64.tar.gz && \ - sudo install gitleaks /usr/bin && \ - gitleaks detect --report-format json --report-path leak_report -v +# lock_check: +# continue-on-error: False +# runs-on: ${{ matrix.os }} +# +# strategy: +# matrix: +# os: [ ubuntu-latest, macos-12, windows-latest ] +# python-version: ["3.10.9"] +# +# timeout-minutes: 18 +# +# steps: +# - uses: actions/checkout@v2 +# - uses: actions/setup-python@master +# with: +# python-version: ${{ matrix.python-version }} +# - if: matrix.os != 'windows-latest' +# name: Pipenv install requirements and check it can be locked +# run: | +# pip install pipenv==2023.7.23 +# pipenv --clear +# time pipenv install --verbose --dev --skip-lock +# time pipenv run pip install -e .[all] +# time pipenv lock +# - if: matrix.os == 'windows-latest' +# name: Pipenv install requirements and check it can be locked +# run: | +# choco install ptime +# pip install pipenv==2023.7.23 +# pipenv --clear +# ptime pipenv install --verbose --dev --skip-lock +# ptime pipenv run pip install -e .[all] +# ptime pipenv lock +# +# install_check: +# continue-on-error: False +# runs-on: ${{ matrix.os }} +# strategy: +# matrix: +# os: [ ubuntu-latest ] +# python-version: ["3.10.9"] +# timeout-minutes: 10 +# steps: +# - uses: actions/checkout@v2 +# - uses: actions/setup-python@master +# with: +# python-version: ${{ matrix.python-version }} +# - name: Check clean installation +# run: | +# pip install .[all] --no-cache +# autonomy --help +# +# copyright_doc_and_dependencies_check: +# continue-on-error: False +# runs-on: ${{ matrix.os }} +# +# strategy: +# matrix: +# os: [ubuntu-latest] +# python-version: ["3.10.9"] +# +# timeout-minutes: 30 +# +# steps: +# - uses: actions/checkout@v2 +# with: +# fetch-depth: 0 +# - uses: actions/setup-python@master +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install dependencies +# run: | +# sudo apt-get update --fix-missing +# sudo apt-get autoremove +# sudo apt-get autoclean +# pip install tomte[tox,cli]==0.2.17 +# pip install --user --upgrade setuptools +# - name: Check copyright headers +# run: tomte format-copyright --author valory --author fetchai +# - name: License compatibility check +# run: tox -e liccheck +# - name: Check docs +# run: tox -e check-api-docs +# # - name: Check doc links +# # run: tomte check-doc-links --http-skips http://host.docker.internal:8545 --http-skips http://www.fipa.org/repository/ips.php3 --url-skips "https://gateway.autonolas.tech/ipfs/," --url-skips "https://github.com/valory-xyz/open-autonomy/trunk/infrastructure" --url-skips "http://host.docker.internal:8545" --url-skips "https://github.com/valory-xyz/open-operator" +# - name: Check doc IPFS hashes +# run: tox -e check-doc-hashes +# - name: Check dependencies +# run: tox -e check-dependencies +# +# linter_checks: +# continue-on-error: False +# runs-on: ${{ matrix.os }} +# +# strategy: +# matrix: +# os: [ubuntu-latest] +# python-version: ["3.10.9"] +# +# timeout-minutes: 30 +# +# steps: +# - uses: actions/checkout@v2 +# - uses: actions/setup-python@master +# with: +# python-version: ${{ matrix.python-version }} +# - uses: actions/setup-go@v3 +# with: +# go-version: "1.17.7" +# - name: Install dependencies +# run: | +# sudo apt-get update --fix-missing +# sudo apt-get autoremove +# sudo apt-get autoclean +# pip install tomte[tox]==0.2.17 +# pip install --user --upgrade setuptools +# # install Protobuf compiler +# wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip +# unzip protoc-24.3-linux-x86_64.zip -d protoc +# sudo mv protoc/bin/protoc /usr/local/bin/protoc +# # install IPFS +# sudo apt-get install -y wget +# sudo npm install -g markdown-spellcheck +# wget -O ./go-ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz +# tar xvfz go-ipfs.tar.gz +# sudo mv go-ipfs/ipfs /usr/local/bin/ipfs +# ipfs init +# make protolint_install +# - name: Check generate protocols +# run: tox -e check-generate-all-protocols +# - name: Security checks +# run: | +# tox -e bandit +# tox -e safety +# - name: Check packages +# run: tox -e check-packages +# - name: Check hash +# run: tox -e check-hash +# - name: Code style check +# run: | +# tox -e black-check +# tox -e isort-check +# tox -e flake8 +# tox -e vulture +# tox -e darglint +# - name: Static type check +# run: tox -e mypy +# - name: Pylint +# run: tox -e pylint +# - name: Check spelling +# run: tox -e spell-check +# - name: AbciApp consistency checks +# run: | +# tox -e check-abci-docstrings +# tox -e check-abciapp-specs +# tox -e check-handlers +# tox -e check-dialogues +# +# scan: +# name: gitleaks +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 0 +# - uses: actions/setup-go@v3 +# with: +# go-version: "1.17.7" +# - run: | +# wget https://github.com/zricethezav/gitleaks/releases/download/v8.10.1/gitleaks_8.10.1_linux_x64.tar.gz && \ +# tar -xzf gitleaks_8.10.1_linux_x64.tar.gz && \ +# sudo install gitleaks /usr/bin && \ +# gitleaks detect --report-format json --report-path leak_report -v test: continue-on-error: True - needs: - - lock_check - - install_check - - copyright_doc_and_dependencies_check - - linter_checks runs-on: ${{ matrix.os }} strategy: From 12a4d03c319fa8107d087ca0a36d30542f85bbb7 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 13:20:39 +0200 Subject: [PATCH 03/27] temp!: skip e2e checks --- .github/workflows/main_workflow.yml | 134 ++++++++++++++-------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 6d479eac4e..834450b991 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -372,70 +372,70 @@ jobs: name: codecov-umbrella fail_ci_if_error: false - e2e: - continue-on-error: True - needs: - - lock_check - - install_check - - copyright_doc_and_dependencies_check - - linter_checks - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ ubuntu-latest ] - python-version: [ "3.10.9" ] - - timeout-minutes: 150 - - steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - uses: actions/setup-python@master - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - sudo apt-get update --fix-missing - sudo apt-get autoremove - sudo apt-get autoclean - pip install tomte[tox]==0.2.17 - pip install --user --upgrade setuptools - - # install Protobuf compiler - wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip - unzip protoc-24.3-linux-x86_64.zip -d protoc - sudo mv protoc/bin/protoc /usr/local/bin/protoc - - # install IPFS - sudo apt-get install -y wget - wget -O ./go-ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz - tar xvfz go-ipfs.tar.gz - sudo mv go-ipfs/ipfs /usr/local/bin/ipfs - ipfs init - - # install Tendermint - wget -O tendermint.tar.gz https://github.com/tendermint/tendermint/releases/download/v0.34.19/tendermint_0.34.19_linux_amd64.tar.gz - tar -xf tendermint.tar.gz - sudo mv tendermint /usr/local/bin/tendermint - - # install Skaffold needed in order to build the Flask with Tendermint image - curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.39.1/skaffold-linux-amd64 &&\ - sudo install skaffold /usr/local/bin/ - - # build the Flask with Tendermint image - TM_DEPLOYMENT_PATH="deployments/Dockerfiles/tendermint/" - TM_IMG_NAME="valory/open-autonomy-tendermint" - docker build $TM_DEPLOYMENT_PATH -t $TM_IMG_NAME:0.1.0 -t $TM_IMG_NAME:1.0.0 -t $TM_IMG_NAME:latest - - # pull pre-built images - docker pull valory/autonolas-registries:latest - docker pull valory/contracts-amm:latest - docker pull valory/safe-contract-net:latest - docker pull tendermint/tendermint:v0.34.19 - docker pull valory/slow-tendermint-server:0.1.0 - - - name: Unit tests - run: | - tox --develop -e e2e-py${{ matrix.python-version }}-linux -- -m 'e2e' +# e2e: +# continue-on-error: True +# needs: +# - lock_check +# - install_check +# - copyright_doc_and_dependencies_check +# - linter_checks +# runs-on: ${{ matrix.os }} +# +# strategy: +# matrix: +# os: [ ubuntu-latest ] +# python-version: [ "3.10.9" ] +# +# timeout-minutes: 150 +# +# steps: +# - uses: actions/checkout@v2 +# with: +# submodules: recursive +# - uses: actions/setup-python@master +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install dependencies +# run: | +# sudo apt-get update --fix-missing +# sudo apt-get autoremove +# sudo apt-get autoclean +# pip install tomte[tox]==0.2.17 +# pip install --user --upgrade setuptools +# +# # install Protobuf compiler +# wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip +# unzip protoc-24.3-linux-x86_64.zip -d protoc +# sudo mv protoc/bin/protoc /usr/local/bin/protoc +# +# # install IPFS +# sudo apt-get install -y wget +# wget -O ./go-ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz +# tar xvfz go-ipfs.tar.gz +# sudo mv go-ipfs/ipfs /usr/local/bin/ipfs +# ipfs init +# +# # install Tendermint +# wget -O tendermint.tar.gz https://github.com/tendermint/tendermint/releases/download/v0.34.19/tendermint_0.34.19_linux_amd64.tar.gz +# tar -xf tendermint.tar.gz +# sudo mv tendermint /usr/local/bin/tendermint +# +# # install Skaffold needed in order to build the Flask with Tendermint image +# curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.39.1/skaffold-linux-amd64 &&\ +# sudo install skaffold /usr/local/bin/ +# +# # build the Flask with Tendermint image +# TM_DEPLOYMENT_PATH="deployments/Dockerfiles/tendermint/" +# TM_IMG_NAME="valory/open-autonomy-tendermint" +# docker build $TM_DEPLOYMENT_PATH -t $TM_IMG_NAME:0.1.0 -t $TM_IMG_NAME:1.0.0 -t $TM_IMG_NAME:latest +# +# # pull pre-built images +# docker pull valory/autonolas-registries:latest +# docker pull valory/contracts-amm:latest +# docker pull valory/safe-contract-net:latest +# docker pull tendermint/tendermint:v0.34.19 +# docker pull valory/slow-tendermint-server:0.1.0 +# +# - name: Unit tests +# run: | +# tox --develop -e e2e-py${{ matrix.python-version }}-linux -- -m 'e2e' From 2e1b96543916b8a2a139ad6e00f9628c64b039cf Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 13:27:53 +0200 Subject: [PATCH 04/27] chore: manually install protolint --- .github/workflows/main_workflow.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 834450b991..5b7eeb4ac9 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -274,9 +274,13 @@ jobs: wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip unzip protoc-24.3-osx-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc - brew tap yoheimuta/protolint - brew install protolint@0.50.2 - + + # Download the binary (replace `protolint_0.50.2_darwin_amd64.tar.gz` with the appropriate file for your system) + wget https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz + tar -xzf protolint_0.50.2_darwin_amd64.tar.gz + sudo mv protolint /usr/local/bin/protolint + sudo chmod +x /usr/local/bin/protolint + # install ipfs curl -O https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz tar -xvzf go-ipfs_v0.6.0_darwin-amd64.tar.gz From b15db083ebd99561f238f9875dd0358b8dae0392 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 13:38:26 +0200 Subject: [PATCH 05/27] chore: manually install protolint --- .github/workflows/main_workflow.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 5b7eeb4ac9..9964862b15 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -274,8 +274,10 @@ jobs: wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip unzip protoc-24.3-osx-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc - - # Download the binary (replace `protolint_0.50.2_darwin_amd64.tar.gz` with the appropriate file for your system) + + tar --version + + # install protolint wget https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz tar -xzf protolint_0.50.2_darwin_amd64.tar.gz sudo mv protolint /usr/local/bin/protolint From df69a41b6b0e29d51716c69122e8916490bd6f9d Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 13:49:06 +0200 Subject: [PATCH 06/27] chore: manually install protolint --- .github/workflows/main_workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 9964862b15..aff0381212 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -278,8 +278,8 @@ jobs: tar --version # install protolint - wget https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz - tar -xzf protolint_0.50.2_darwin_amd64.tar.gz + curl -L -o protolint.tar.gz https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz + tar -xzf protolint.tar.gz sudo mv protolint /usr/local/bin/protolint sudo chmod +x /usr/local/bin/protolint From dd6e07c9319d516d03aa7717b23d56694a427eec Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 13:52:49 +0200 Subject: [PATCH 07/27] chore: manually install protolint --- .github/workflows/main_workflow.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index aff0381212..534cdad167 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -275,8 +275,6 @@ jobs: unzip protoc-24.3-osx-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc - tar --version - # install protolint curl -L -o protolint.tar.gz https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz tar -xzf protolint.tar.gz From 55f291ba2d122426b511ef13fbcbd524cfc3e20b Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 13:55:47 +0200 Subject: [PATCH 08/27] chore: manually install protolint --- .github/workflows/main_workflow.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 534cdad167..956a5a3a4d 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -274,7 +274,10 @@ jobs: wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip unzip protoc-24.3-osx-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc - + + echo "Installed protoc" + brew reinstall gnu-tar + # install protolint curl -L -o protolint.tar.gz https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz tar -xzf protolint.tar.gz From 8e72f1ff674efa52ede6cd167e2c1e5d2012b515 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 13:58:09 +0200 Subject: [PATCH 09/27] chore: manually install protolint --- .github/workflows/main_workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 956a5a3a4d..feb1c796a2 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -280,13 +280,13 @@ jobs: # install protolint curl -L -o protolint.tar.gz https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz - tar -xzf protolint.tar.gz + gtar -xzf protolint.tar.gz sudo mv protolint /usr/local/bin/protolint sudo chmod +x /usr/local/bin/protolint # install ipfs curl -O https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz - tar -xvzf go-ipfs_v0.6.0_darwin-amd64.tar.gz + gtar -xvzf go-ipfs_v0.6.0_darwin-amd64.tar.gz cd go-ipfs sudo ./install.sh cd .. @@ -295,7 +295,7 @@ jobs: # install Tendermint wget -O tendermint.tar.gz https://github.com/tendermint/tendermint/releases/download/v0.34.19/tendermint_0.34.19_darwin_amd64.tar.gz - tar -xf tendermint.tar.gz + gtar -xf tendermint.tar.gz sudo mv tendermint /usr/local/bin/tendermint # install skaffold From 3fed2ad51d8ebcbb9de1cce32b47551c06014ae0 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:00:53 +0200 Subject: [PATCH 10/27] chore: reinstall tar --- .github/workflows/main_workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index feb1c796a2..45e9ab6cbc 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -276,7 +276,8 @@ jobs: sudo mv protoc/bin/protoc /usr/local/bin/protoc echo "Installed protoc" - brew reinstall gnu-tar + brew reinstall libarchive +# echo 'PATH="/usr/local/opt/libarchive/bin:$PATH"' >> $GITHUB_ENV # install protolint curl -L -o protolint.tar.gz https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz From 24d7e56674a8bd432117c579030bc3fdc05b9a78 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:02:15 +0200 Subject: [PATCH 11/27] chore: reinstall tar --- .github/workflows/main_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 45e9ab6cbc..ef2d14c260 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -277,7 +277,7 @@ jobs: echo "Installed protoc" brew reinstall libarchive -# echo 'PATH="/usr/local/opt/libarchive/bin:$PATH"' >> $GITHUB_ENV + # echo 'PATH="/usr/local/opt/libarchive/bin:$PATH"' >> $GITHUB_ENV # install protolint curl -L -o protolint.tar.gz https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz From a1c612cb7e92ef5000bd06e8aac67af1bb900e80 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:06:11 +0200 Subject: [PATCH 12/27] chore: reinstall tar --- .github/workflows/main_workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index ef2d14c260..36bfd4b793 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -281,13 +281,13 @@ jobs: # install protolint curl -L -o protolint.tar.gz https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz - gtar -xzf protolint.tar.gz + tar -xzvf protolint.tar.gz sudo mv protolint /usr/local/bin/protolint sudo chmod +x /usr/local/bin/protolint # install ipfs curl -O https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz - gtar -xvzf go-ipfs_v0.6.0_darwin-amd64.tar.gz + tar -xvzf go-ipfs_v0.6.0_darwin-amd64.tar.gz cd go-ipfs sudo ./install.sh cd .. From 05e0ff2e1b8d43d088be4b45c416ace5a80ccf9e Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:06:23 +0200 Subject: [PATCH 13/27] chore: reinstall tar --- .github/workflows/main_workflow.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 36bfd4b793..6ab8cf7208 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -275,10 +275,6 @@ jobs: unzip protoc-24.3-osx-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc - echo "Installed protoc" - brew reinstall libarchive - # echo 'PATH="/usr/local/opt/libarchive/bin:$PATH"' >> $GITHUB_ENV - # install protolint curl -L -o protolint.tar.gz https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz tar -xzvf protolint.tar.gz From 0fc7a295a799e76b1cfbabe9f2ce593e14db33ab Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:16:37 +0200 Subject: [PATCH 14/27] chore: tar version --- .github/workflows/main_workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 6ab8cf7208..af92fcca1f 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -267,6 +267,7 @@ jobs: - if: matrix.os == 'macos-12' name: Install dependencies (macos-12) run: | + tar --version pip install tomte[tox]==0.2.17 brew install gcc # brew install protobuf From 0f0bf65b631d152fca70686538f77df444bd4787 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:18:37 +0200 Subject: [PATCH 15/27] chore: tar version --- .github/workflows/main_workflow.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index af92fcca1f..b79cb77f7e 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -268,6 +268,12 @@ jobs: name: Install dependencies (macos-12) run: | tar --version + # install protolint + curl -L -o protolint.tar.gz https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz + tar -xzvf protolint.tar.gz + sudo mv protolint /usr/local/bin/protolint + sudo chmod +x /usr/local/bin/protolint + pip install tomte[tox]==0.2.17 brew install gcc # brew install protobuf @@ -276,12 +282,6 @@ jobs: unzip protoc-24.3-osx-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc - # install protolint - curl -L -o protolint.tar.gz https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz - tar -xzvf protolint.tar.gz - sudo mv protolint /usr/local/bin/protolint - sudo chmod +x /usr/local/bin/protolint - # install ipfs curl -O https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz tar -xvzf go-ipfs_v0.6.0_darwin-amd64.tar.gz From 5547276b84a748ca9cbad89b303c257444f13ed8 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:20:22 +0200 Subject: [PATCH 16/27] chore: dont install gcc --- .github/workflows/main_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index b79cb77f7e..3022e0b5d8 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -275,7 +275,7 @@ jobs: sudo chmod +x /usr/local/bin/protolint pip install tomte[tox]==0.2.17 - brew install gcc + # brew install gcc # brew install protobuf # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip From 15e49b21af2ac2bd9f49ed64a329f7c52e8c68ee Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:22:41 +0200 Subject: [PATCH 17/27] chore: dont install gcc --- .github/workflows/main_workflow.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 3022e0b5d8..2d487cb943 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -274,14 +274,6 @@ jobs: sudo mv protolint /usr/local/bin/protolint sudo chmod +x /usr/local/bin/protolint - pip install tomte[tox]==0.2.17 - # brew install gcc - # brew install protobuf - # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb - wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip - unzip protoc-24.3-osx-x86_64.zip -d protoc - sudo mv protoc/bin/protoc /usr/local/bin/protoc - # install ipfs curl -O https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz tar -xvzf go-ipfs_v0.6.0_darwin-amd64.tar.gz @@ -302,6 +294,14 @@ jobs: sudo install skaffold /usr/local/bin/ skaffold --help + pip install tomte[tox]==0.2.17 + # brew install gcc + # brew install protobuf + # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb + wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip + unzip protoc-24.3-osx-x86_64.zip -d protoc + sudo mv protoc/bin/protoc /usr/local/bin/protoc + - if: matrix.os == 'macos-12' name: Framework unit tests macos-12 run: | From d5495532e83cf1dc7d8d3138cdfd49bc9133aa6c Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:28:57 +0200 Subject: [PATCH 18/27] chore: dont install gcc --- .github/workflows/main_workflow.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 2d487cb943..62f6caa19b 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -274,6 +274,8 @@ jobs: sudo mv protolint /usr/local/bin/protolint sudo chmod +x /usr/local/bin/protolint + echo "Installed protolint" + # install ipfs curl -O https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz tar -xvzf go-ipfs_v0.6.0_darwin-amd64.tar.gz @@ -283,9 +285,11 @@ jobs: rm -rf go-ipfs ipfs init + echo "Installed IPFS" + # install Tendermint wget -O tendermint.tar.gz https://github.com/tendermint/tendermint/releases/download/v0.34.19/tendermint_0.34.19_darwin_amd64.tar.gz - gtar -xf tendermint.tar.gz + tar -xf tendermint.tar.gz sudo mv tendermint /usr/local/bin/tendermint # install skaffold From e19b4087cc1e19fe2e226d28d3e9b6763436429a Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:30:43 +0200 Subject: [PATCH 19/27] chore: rename files --- .github/workflows/main_workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 62f6caa19b..5588e0097d 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -277,8 +277,8 @@ jobs: echo "Installed protolint" # install ipfs - curl -O https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz - tar -xvzf go-ipfs_v0.6.0_darwin-amd64.tar.gz + curl -L -o ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz + tar -xvzf ipfs.tar.gz cd go-ipfs sudo ./install.sh cd .. From 63c57e06345dae7c31acbb4efd637dfb60bfc3bf Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:37:24 +0200 Subject: [PATCH 20/27] chore: working macOS --- .github/workflows/main_workflow.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 5588e0097d..81f807268d 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -267,15 +267,19 @@ jobs: - if: matrix.os == 'macos-12' name: Install dependencies (macos-12) run: | - tar --version + pip install tomte[tox]==0.2.17 + + # brew install protobuf + # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb + wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip + unzip protoc-24.3-osx-x86_64.zip -d protoc + # install protolint curl -L -o protolint.tar.gz https://github.com/yoheimuta/protolint/releases/download/v0.50.2/protolint_0.50.2_darwin_amd64.tar.gz tar -xzvf protolint.tar.gz sudo mv protolint /usr/local/bin/protolint sudo chmod +x /usr/local/bin/protolint - - echo "Installed protolint" - + # install ipfs curl -L -o ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz tar -xvzf ipfs.tar.gz @@ -285,8 +289,6 @@ jobs: rm -rf go-ipfs ipfs init - echo "Installed IPFS" - # install Tendermint wget -O tendermint.tar.gz https://github.com/tendermint/tendermint/releases/download/v0.34.19/tendermint_0.34.19_darwin_amd64.tar.gz tar -xf tendermint.tar.gz @@ -298,14 +300,6 @@ jobs: sudo install skaffold /usr/local/bin/ skaffold --help - pip install tomte[tox]==0.2.17 - # brew install gcc - # brew install protobuf - # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb - wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip - unzip protoc-24.3-osx-x86_64.zip -d protoc - sudo mv protoc/bin/protoc /usr/local/bin/protoc - - if: matrix.os == 'macos-12' name: Framework unit tests macos-12 run: | From bd01cc95374707fbf799f50e11baad594fa8034a Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 14:56:40 +0200 Subject: [PATCH 21/27] chore: replace `dist.ipfs.io` with gh --- .github/workflows/main_workflow.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 81f807268d..2f11101bf6 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -134,7 +134,7 @@ jobs: # # install IPFS # sudo apt-get install -y wget # sudo npm install -g markdown-spellcheck -# wget -O ./go-ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz +# wget -O ./go-ipfs.tar.gz https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz # tar xvfz go-ipfs.tar.gz # sudo mv go-ipfs/ipfs /usr/local/bin/ipfs # ipfs init @@ -223,7 +223,7 @@ jobs: # install IPFS sudo apt-get install -y wget - wget -O ./go-ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz + wget -O ./go-ipfs.tar.gz https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz tar xvfz go-ipfs.tar.gz sudo mv go-ipfs/ipfs /usr/local/bin/ipfs ipfs init @@ -281,7 +281,7 @@ jobs: sudo chmod +x /usr/local/bin/protolint # install ipfs - curl -L -o ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz + curl -L -o ipfs.tar.gz https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_darwin-amd64.tar.gz tar -xvzf ipfs.tar.gz cd go-ipfs sudo ./install.sh @@ -340,7 +340,7 @@ jobs: #protolint version # install ipfs - curl https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_windows-amd64.zip -o go-ipfs_v0.6.0.zip + curl https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_windows-amd64.zip -o go-ipfs_v0.6.0.zip Expand-Archive -Path go-ipfs_v0.6.0.zip -DestinationPath ~\Apps\ cp ~\Apps\go-ipfs\ipfs.exe C:\Users\runneradmin\go\bin\ ipfs init @@ -413,7 +413,7 @@ jobs: # # # install IPFS # sudo apt-get install -y wget -# wget -O ./go-ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz +# wget -O ./go-ipfs.tar.gz https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz # tar xvfz go-ipfs.tar.gz # sudo mv go-ipfs/ipfs /usr/local/bin/ipfs # ipfs init From 21f7ef18f330f03646d856d87dc301629b69228a Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 15:06:23 +0200 Subject: [PATCH 22/27] chore: rename go-ipfs --- .github/workflows/main_workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 2f11101bf6..67cd89f983 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -340,8 +340,8 @@ jobs: #protolint version # install ipfs - curl https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_windows-amd64.zip -o go-ipfs_v0.6.0.zip - Expand-Archive -Path go-ipfs_v0.6.0.zip -DestinationPath ~\Apps\ + curl https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_windows-amd64.zip -o go-ipfs.zip + Expand-Archive -Path go-ipfs.zip -DestinationPath ~\Apps\ cp ~\Apps\go-ipfs\ipfs.exe C:\Users\runneradmin\go\bin\ ipfs init From f9bb91903d91b168ce781261455c2e1c2945544f Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 15:10:57 +0200 Subject: [PATCH 23/27] chore: skip pip install --- .github/workflows/main_workflow.yml | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 67cd89f983..9be4144e74 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -191,7 +191,7 @@ jobs: strategy: matrix: - os: [ ubuntu-latest, macos-12, windows-latest ] + os: [ windows-latest ] python-version: [ "3.8", "3.9", "3.10.9", "3.11" ] timeout-minutes: 90 @@ -315,30 +315,6 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true run: | - python -m pip install -U pip - echo "::add-path::C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64" - - choco source add -n chocolatey -s 'https://chocolatey.org/api/v2/' - choco source enable -n chocolatey - - choco install wget -y - choco install protoc --version 24.3 - choco install mingw -y - choco install make -y - # to check make was installed - make --version - pip install tomte[tox]==0.2.17 - # wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-win64.zip - # unzip protoc-24.3-win64.zip -d protoc - # sudo mv protoc/bin/protoc /usr/local/bin/protoc - - # TODO: install protolint - #echo "::set-env name=GOPATH::$(go env GOPATH)" - #echo "::add-path::$(go env GOPATH)/bin" - #make protolint_install_win - # just check protolint runs - #protolint version - # install ipfs curl https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_windows-amd64.zip -o go-ipfs.zip Expand-Archive -Path go-ipfs.zip -DestinationPath ~\Apps\ From 2a3660953e875b99b4abf152aae5bec9d8977e45 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 15:14:57 +0200 Subject: [PATCH 24/27] chore: follow redirects --- .github/workflows/main_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 9be4144e74..e080a86cff 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -316,7 +316,7 @@ jobs: ACTIONS_ALLOW_UNSECURE_COMMANDS: true run: | # install ipfs - curl https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_windows-amd64.zip -o go-ipfs.zip + curl -L -o go-ipfs.zip https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_windows-amd64.zip Expand-Archive -Path go-ipfs.zip -DestinationPath ~\Apps\ cp ~\Apps\go-ipfs\ipfs.exe C:\Users\runneradmin\go\bin\ ipfs init From 89fbdfec8bef2bb37a65f40556b2bb8cbdf0a6c6 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 15:17:22 +0200 Subject: [PATCH 25/27] chore: use curl for tm download --- .github/workflows/main_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index e080a86cff..1c883e3654 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -322,7 +322,7 @@ jobs: ipfs init # install Tendermint - wget -O tendermint.tar.gz https://github.com/tendermint/tendermint/releases/download/v0.34.19/tendermint_0.34.19_windows_amd64.tar.gz + curl -L -o tendermint.tar.gz https://github.com/tendermint/tendermint/releases/download/v0.34.19/tendermint_0.34.19_windows_amd64.tar.gz tar -xvzf tendermint.tar.gz cp tendermint.exe C:\Users\runneradmin\go\bin\ From 09d59d02d64658317f31d0fdc41fbafb439a8af8 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 15:20:34 +0200 Subject: [PATCH 26/27] chore: re-introduce windows deps --- .github/workflows/main_workflow.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 1c883e3654..41e7aa8969 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -315,6 +315,30 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true run: | + python -m pip install -U pip + echo "::add-path::C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64" + + choco source add -n chocolatey -s 'https://chocolatey.org/api/v2/' + choco source enable -n chocolatey + + choco install wget -y + choco install protoc --version 24.3 + choco install mingw -y + choco install make -y + # to check make was installed + make --version + pip install tomte[tox]==0.2.17 + # wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-win64.zip + # unzip protoc-24.3-win64.zip -d protoc + # sudo mv protoc/bin/protoc /usr/local/bin/protoc + + # TODO: install protolint + #echo "::set-env name=GOPATH::$(go env GOPATH)" + #echo "::add-path::$(go env GOPATH)/bin" + #make protolint_install_win + # just check protolint runs + #protolint version + # install ipfs curl -L -o go-ipfs.zip https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_windows-amd64.zip Expand-Archive -Path go-ipfs.zip -DestinationPath ~\Apps\ From 732977729808f275e84fcc0f924d552ebda5ee52 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 22 Jul 2024 15:21:39 +0200 Subject: [PATCH 27/27] chore: introduce all deps again --- .github/workflows/main_workflow.yml | 487 ++++++++++++++-------------- 1 file changed, 246 insertions(+), 241 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 41e7aa8969..79e0e468d7 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -11,187 +11,192 @@ env: TENDERMINT_IMAGE_VERSION: latest jobs: -# lock_check: -# continue-on-error: False -# runs-on: ${{ matrix.os }} -# -# strategy: -# matrix: -# os: [ ubuntu-latest, macos-12, windows-latest ] -# python-version: ["3.10.9"] -# -# timeout-minutes: 18 -# -# steps: -# - uses: actions/checkout@v2 -# - uses: actions/setup-python@master -# with: -# python-version: ${{ matrix.python-version }} -# - if: matrix.os != 'windows-latest' -# name: Pipenv install requirements and check it can be locked -# run: | -# pip install pipenv==2023.7.23 -# pipenv --clear -# time pipenv install --verbose --dev --skip-lock -# time pipenv run pip install -e .[all] -# time pipenv lock -# - if: matrix.os == 'windows-latest' -# name: Pipenv install requirements and check it can be locked -# run: | -# choco install ptime -# pip install pipenv==2023.7.23 -# pipenv --clear -# ptime pipenv install --verbose --dev --skip-lock -# ptime pipenv run pip install -e .[all] -# ptime pipenv lock -# -# install_check: -# continue-on-error: False -# runs-on: ${{ matrix.os }} -# strategy: -# matrix: -# os: [ ubuntu-latest ] -# python-version: ["3.10.9"] -# timeout-minutes: 10 -# steps: -# - uses: actions/checkout@v2 -# - uses: actions/setup-python@master -# with: -# python-version: ${{ matrix.python-version }} -# - name: Check clean installation -# run: | -# pip install .[all] --no-cache -# autonomy --help -# -# copyright_doc_and_dependencies_check: -# continue-on-error: False -# runs-on: ${{ matrix.os }} -# -# strategy: -# matrix: -# os: [ubuntu-latest] -# python-version: ["3.10.9"] -# -# timeout-minutes: 30 -# -# steps: -# - uses: actions/checkout@v2 -# with: -# fetch-depth: 0 -# - uses: actions/setup-python@master -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install dependencies -# run: | -# sudo apt-get update --fix-missing -# sudo apt-get autoremove -# sudo apt-get autoclean -# pip install tomte[tox,cli]==0.2.17 -# pip install --user --upgrade setuptools -# - name: Check copyright headers -# run: tomte format-copyright --author valory --author fetchai -# - name: License compatibility check -# run: tox -e liccheck -# - name: Check docs -# run: tox -e check-api-docs -# # - name: Check doc links -# # run: tomte check-doc-links --http-skips http://host.docker.internal:8545 --http-skips http://www.fipa.org/repository/ips.php3 --url-skips "https://gateway.autonolas.tech/ipfs/," --url-skips "https://github.com/valory-xyz/open-autonomy/trunk/infrastructure" --url-skips "http://host.docker.internal:8545" --url-skips "https://github.com/valory-xyz/open-operator" -# - name: Check doc IPFS hashes -# run: tox -e check-doc-hashes -# - name: Check dependencies -# run: tox -e check-dependencies -# -# linter_checks: -# continue-on-error: False -# runs-on: ${{ matrix.os }} -# -# strategy: -# matrix: -# os: [ubuntu-latest] -# python-version: ["3.10.9"] -# -# timeout-minutes: 30 -# -# steps: -# - uses: actions/checkout@v2 -# - uses: actions/setup-python@master -# with: -# python-version: ${{ matrix.python-version }} -# - uses: actions/setup-go@v3 -# with: -# go-version: "1.17.7" -# - name: Install dependencies -# run: | -# sudo apt-get update --fix-missing -# sudo apt-get autoremove -# sudo apt-get autoclean -# pip install tomte[tox]==0.2.17 -# pip install --user --upgrade setuptools -# # install Protobuf compiler -# wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip -# unzip protoc-24.3-linux-x86_64.zip -d protoc -# sudo mv protoc/bin/protoc /usr/local/bin/protoc -# # install IPFS -# sudo apt-get install -y wget -# sudo npm install -g markdown-spellcheck -# wget -O ./go-ipfs.tar.gz https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz -# tar xvfz go-ipfs.tar.gz -# sudo mv go-ipfs/ipfs /usr/local/bin/ipfs -# ipfs init -# make protolint_install -# - name: Check generate protocols -# run: tox -e check-generate-all-protocols -# - name: Security checks -# run: | -# tox -e bandit -# tox -e safety -# - name: Check packages -# run: tox -e check-packages -# - name: Check hash -# run: tox -e check-hash -# - name: Code style check -# run: | -# tox -e black-check -# tox -e isort-check -# tox -e flake8 -# tox -e vulture -# tox -e darglint -# - name: Static type check -# run: tox -e mypy -# - name: Pylint -# run: tox -e pylint -# - name: Check spelling -# run: tox -e spell-check -# - name: AbciApp consistency checks -# run: | -# tox -e check-abci-docstrings -# tox -e check-abciapp-specs -# tox -e check-handlers -# tox -e check-dialogues -# -# scan: -# name: gitleaks -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v3 -# with: -# fetch-depth: 0 -# - uses: actions/setup-go@v3 -# with: -# go-version: "1.17.7" -# - run: | -# wget https://github.com/zricethezav/gitleaks/releases/download/v8.10.1/gitleaks_8.10.1_linux_x64.tar.gz && \ -# tar -xzf gitleaks_8.10.1_linux_x64.tar.gz && \ -# sudo install gitleaks /usr/bin && \ -# gitleaks detect --report-format json --report-path leak_report -v + lock_check: + continue-on-error: False + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ ubuntu-latest, macos-12, windows-latest ] + python-version: ["3.10.9"] + + timeout-minutes: 18 + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@master + with: + python-version: ${{ matrix.python-version }} + - if: matrix.os != 'windows-latest' + name: Pipenv install requirements and check it can be locked + run: | + pip install pipenv==2023.7.23 + pipenv --clear + time pipenv install --verbose --dev --skip-lock + time pipenv run pip install -e .[all] + time pipenv lock + - if: matrix.os == 'windows-latest' + name: Pipenv install requirements and check it can be locked + run: | + choco install ptime + pip install pipenv==2023.7.23 + pipenv --clear + ptime pipenv install --verbose --dev --skip-lock + ptime pipenv run pip install -e .[all] + ptime pipenv lock + + install_check: + continue-on-error: False + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest ] + python-version: ["3.10.9"] + timeout-minutes: 10 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@master + with: + python-version: ${{ matrix.python-version }} + - name: Check clean installation + run: | + pip install .[all] --no-cache + autonomy --help + + copyright_doc_and_dependencies_check: + continue-on-error: False + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + python-version: ["3.10.9"] + + timeout-minutes: 30 + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-python@master + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + sudo apt-get update --fix-missing + sudo apt-get autoremove + sudo apt-get autoclean + pip install tomte[tox,cli]==0.2.17 + pip install --user --upgrade setuptools + - name: Check copyright headers + run: tomte format-copyright --author valory --author fetchai + - name: License compatibility check + run: tox -e liccheck + - name: Check docs + run: tox -e check-api-docs + # - name: Check doc links + # run: tomte check-doc-links --http-skips http://host.docker.internal:8545 --http-skips http://www.fipa.org/repository/ips.php3 --url-skips "https://gateway.autonolas.tech/ipfs/," --url-skips "https://github.com/valory-xyz/open-autonomy/trunk/infrastructure" --url-skips "http://host.docker.internal:8545" --url-skips "https://github.com/valory-xyz/open-operator" + - name: Check doc IPFS hashes + run: tox -e check-doc-hashes + - name: Check dependencies + run: tox -e check-dependencies + + linter_checks: + continue-on-error: False + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + python-version: ["3.10.9"] + + timeout-minutes: 30 + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@master + with: + python-version: ${{ matrix.python-version }} + - uses: actions/setup-go@v3 + with: + go-version: "1.17.7" + - name: Install dependencies + run: | + sudo apt-get update --fix-missing + sudo apt-get autoremove + sudo apt-get autoclean + pip install tomte[tox]==0.2.17 + pip install --user --upgrade setuptools + # install Protobuf compiler + wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip + unzip protoc-24.3-linux-x86_64.zip -d protoc + sudo mv protoc/bin/protoc /usr/local/bin/protoc + # install IPFS + sudo apt-get install -y wget + sudo npm install -g markdown-spellcheck + wget -O ./go-ipfs.tar.gz https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz + tar xvfz go-ipfs.tar.gz + sudo mv go-ipfs/ipfs /usr/local/bin/ipfs + ipfs init + make protolint_install + - name: Check generate protocols + run: tox -e check-generate-all-protocols + - name: Security checks + run: | + tox -e bandit + tox -e safety + - name: Check packages + run: tox -e check-packages + - name: Check hash + run: tox -e check-hash + - name: Code style check + run: | + tox -e black-check + tox -e isort-check + tox -e flake8 + tox -e vulture + tox -e darglint + - name: Static type check + run: tox -e mypy + - name: Pylint + run: tox -e pylint + - name: Check spelling + run: tox -e spell-check + - name: AbciApp consistency checks + run: | + tox -e check-abci-docstrings + tox -e check-abciapp-specs + tox -e check-handlers + tox -e check-dialogues + + scan: + name: gitleaks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-go@v3 + with: + go-version: "1.17.7" + - run: | + wget https://github.com/zricethezav/gitleaks/releases/download/v8.10.1/gitleaks_8.10.1_linux_x64.tar.gz && \ + tar -xzf gitleaks_8.10.1_linux_x64.tar.gz && \ + sudo install gitleaks /usr/bin && \ + gitleaks detect --report-format json --report-path leak_report -v test: continue-on-error: True + needs: + - lock_check + - install_check + - copyright_doc_and_dependencies_check + - linter_checks runs-on: ${{ matrix.os }} strategy: matrix: - os: [ windows-latest ] + os: [ ubuntu-latest, macos-12, windows-latest ] python-version: [ "3.8", "3.9", "3.10.9", "3.11" ] timeout-minutes: 90 @@ -375,70 +380,70 @@ jobs: name: codecov-umbrella fail_ci_if_error: false -# e2e: -# continue-on-error: True -# needs: -# - lock_check -# - install_check -# - copyright_doc_and_dependencies_check -# - linter_checks -# runs-on: ${{ matrix.os }} -# -# strategy: -# matrix: -# os: [ ubuntu-latest ] -# python-version: [ "3.10.9" ] -# -# timeout-minutes: 150 -# -# steps: -# - uses: actions/checkout@v2 -# with: -# submodules: recursive -# - uses: actions/setup-python@master -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install dependencies -# run: | -# sudo apt-get update --fix-missing -# sudo apt-get autoremove -# sudo apt-get autoclean -# pip install tomte[tox]==0.2.17 -# pip install --user --upgrade setuptools -# -# # install Protobuf compiler -# wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip -# unzip protoc-24.3-linux-x86_64.zip -d protoc -# sudo mv protoc/bin/protoc /usr/local/bin/protoc -# -# # install IPFS -# sudo apt-get install -y wget -# wget -O ./go-ipfs.tar.gz https://github.com/ipfs/kubo/releases/download/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz -# tar xvfz go-ipfs.tar.gz -# sudo mv go-ipfs/ipfs /usr/local/bin/ipfs -# ipfs init -# -# # install Tendermint -# wget -O tendermint.tar.gz https://github.com/tendermint/tendermint/releases/download/v0.34.19/tendermint_0.34.19_linux_amd64.tar.gz -# tar -xf tendermint.tar.gz -# sudo mv tendermint /usr/local/bin/tendermint -# -# # install Skaffold needed in order to build the Flask with Tendermint image -# curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.39.1/skaffold-linux-amd64 &&\ -# sudo install skaffold /usr/local/bin/ -# -# # build the Flask with Tendermint image -# TM_DEPLOYMENT_PATH="deployments/Dockerfiles/tendermint/" -# TM_IMG_NAME="valory/open-autonomy-tendermint" -# docker build $TM_DEPLOYMENT_PATH -t $TM_IMG_NAME:0.1.0 -t $TM_IMG_NAME:1.0.0 -t $TM_IMG_NAME:latest -# -# # pull pre-built images -# docker pull valory/autonolas-registries:latest -# docker pull valory/contracts-amm:latest -# docker pull valory/safe-contract-net:latest -# docker pull tendermint/tendermint:v0.34.19 -# docker pull valory/slow-tendermint-server:0.1.0 -# -# - name: Unit tests -# run: | -# tox --develop -e e2e-py${{ matrix.python-version }}-linux -- -m 'e2e' + e2e: + continue-on-error: True + needs: + - lock_check + - install_check + - copyright_doc_and_dependencies_check + - linter_checks + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ ubuntu-latest ] + python-version: [ "3.10.9" ] + + timeout-minutes: 150 + + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: actions/setup-python@master + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + sudo apt-get update --fix-missing + sudo apt-get autoremove + sudo apt-get autoclean + pip install tomte[tox]==0.2.17 + pip install --user --upgrade setuptools + + # install Protobuf compiler + wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip + unzip protoc-24.3-linux-x86_64.zip -d protoc + sudo mv protoc/bin/protoc /usr/local/bin/protoc + + # install IPFS + sudo apt-get install -y wget + wget -O ./go-ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz + tar xvfz go-ipfs.tar.gz + sudo mv go-ipfs/ipfs /usr/local/bin/ipfs + ipfs init + + # install Tendermint + wget -O tendermint.tar.gz https://github.com/tendermint/tendermint/releases/download/v0.34.19/tendermint_0.34.19_linux_amd64.tar.gz + tar -xf tendermint.tar.gz + sudo mv tendermint /usr/local/bin/tendermint + + # install Skaffold needed in order to build the Flask with Tendermint image + curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v1.39.1/skaffold-linux-amd64 &&\ + sudo install skaffold /usr/local/bin/ + + # build the Flask with Tendermint image + TM_DEPLOYMENT_PATH="deployments/Dockerfiles/tendermint/" + TM_IMG_NAME="valory/open-autonomy-tendermint" + docker build $TM_DEPLOYMENT_PATH -t $TM_IMG_NAME:0.1.0 -t $TM_IMG_NAME:1.0.0 -t $TM_IMG_NAME:latest + + # pull pre-built images + docker pull valory/autonolas-registries:latest + docker pull valory/contracts-amm:latest + docker pull valory/safe-contract-net:latest + docker pull tendermint/tendermint:v0.34.19 + docker pull valory/slow-tendermint-server:0.1.0 + + - name: Unit tests + run: | + tox --develop -e e2e-py${{ matrix.python-version }}-linux -- -m 'e2e'