Merge pull request #14034 from ethereum/migration-gitter-to-matrix

Migrate from gitter to matrix api
This commit is contained in:
Kamil Śliwak 2023-03-10 21:28:53 +01:00 committed by GitHub
commit d58c699478
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,8 +35,8 @@ orbs:
win: circleci/windows@2.2.0 win: circleci/windows@2.2.0
commands: commands:
gitter_notify_unless_pr: matrix_notify_unless_pr:
description: "Posts a notification to the main room on Gitter (if not running on a PR)." description: "Posts a notification to the solidity-dev room on Matrix (if not running on a PR)."
parameters: parameters:
event: event:
type: enum type: enum
@ -45,7 +45,7 @@ commands:
type: string type: string
steps: steps:
- run: - run:
name: "Gitter notification" name: "Matrix notification"
when: << parameters.condition >> when: << parameters.condition >>
command: | command: |
# FIXME: Checking $CIRCLE_PULL_REQUEST would be better than hard-coding branch names # FIXME: Checking $CIRCLE_PULL_REQUEST would be better than hard-coding branch names
@ -67,32 +67,32 @@ commands:
# The release notification only makes sense on tagged commits. If the commit is untagged, just bail out. # The release notification only makes sense on tagged commits. If the commit is untagged, just bail out.
[[ "<< parameters.event >>" == "release" ]] && { [[ $CIRCLE_TAG != "" ]] || { echo "Not a tagged commit - notification skipped."; exit 0; } } [[ "<< parameters.event >>" == "release" ]] && { [[ $CIRCLE_TAG != "" ]] || { echo "Not a tagged commit - notification skipped."; exit 0; } }
curl "https://api.gitter.im/v1/rooms/${GITTER_NOTIFY_ROOM_ID}/chatMessages" \ curl "https://${MATRIX_SERVER}/_matrix/client/v3/rooms/${MATRIX_NOTIFY_ROOM_ID}/send/m.room.message" \
--request POST \ --request POST \
--include \ --include \
--header "Content-Type: application/json" \ --header "Content-Type: application/json" \
--header "Accept: application/json" \ --header "Accept: application/json" \
--header "Authorization: Bearer ${GITTER_API_TOKEN}" \ --header "Authorization: Bearer ${MATRIX_ACCESS_TOKEN}" \
--data "{\"text\":\"${message}\"}" --data "{\"msgtype\":\"m.text\", \"body\":\"${message}\"}"
gitter_notify_failure_unless_pr: matrix_notify_failure_unless_pr:
description: "Posts a failure notification to the main room on Gitter (if not running on a PR)." description: "Posts a failure notification to the main room on Matrix (if not running on a PR)."
steps: steps:
- gitter_notify_unless_pr: - matrix_notify_unless_pr:
event: failure event: failure
condition: on_fail condition: on_fail
gitter_notify_success_unless_pr: matrix_notify_success_unless_pr:
description: "Posts a success notification to the main room on Gitter (if not running on a PR)." description: "Posts a success notification to the main room on Matrix (if not running on a PR)."
steps: steps:
- gitter_notify_unless_pr: - matrix_notify_unless_pr:
event: success event: success
condition: on_success condition: on_success
gitter_notify_release_unless_pr: matrix_notify_release_unless_pr:
description: "Posts a release notification to the main room on Gitter (if not running on a PR)." description: "Posts a release notification to the main room on Matrix (if not running on a PR)."
steps: steps:
- gitter_notify_unless_pr: - matrix_notify_unless_pr:
event: release event: release
condition: on_success condition: on_success
@ -117,7 +117,7 @@ commands:
paths: paths:
- bytecode-report-<< parameters.label >>-json.txt - bytecode-report-<< parameters.label >>-json.txt
- bytecode-report-<< parameters.label >>-cli.txt - bytecode-report-<< parameters.label >>-cli.txt
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
defaults: defaults:
@ -232,7 +232,7 @@ defaults:
- run: *run_soltest - run: *run_soltest
- store_test_results: *store_test_results - store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results - store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
- steps_test_lsp: &steps_test_lsp - steps_test_lsp: &steps_test_lsp
steps: steps:
@ -245,7 +245,7 @@ defaults:
- run: - run:
name: Executing solc LSP test suite name: Executing solc LSP test suite
command: ./test/lsp.py ./build/solc/solc --non-interactive command: ./test/lsp.py ./build/solc/solc --non-interactive
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
- steps_build: &steps_build - steps_build: &steps_build
steps: steps:
@ -254,7 +254,7 @@ defaults:
- store_artifacts: *artifacts_solc - store_artifacts: *artifacts_solc
- store_artifacts: *artifact_yul_phaser - store_artifacts: *artifact_yul_phaser
- persist_to_workspace: *artifacts_executables - persist_to_workspace: *artifacts_executables
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
- steps_soltest_all: &steps_soltest_all - steps_soltest_all: &steps_soltest_all
steps: steps:
@ -264,7 +264,7 @@ defaults:
- run: *run_soltest_all - run: *run_soltest_all
- store_test_results: *store_test_results - store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results - store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
- steps_cmdline_tests: &steps_cmdline_tests - steps_cmdline_tests: &steps_cmdline_tests
steps: steps:
@ -274,7 +274,7 @@ defaults:
- run: *run_cmdline_tests - run: *run_cmdline_tests
- store_test_results: *store_test_results - store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results - store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
- steps_install_dependencies_osx: &steps_install_dependencies_osx - steps_install_dependencies_osx: &steps_install_dependencies_osx
steps: steps:
@ -668,7 +668,7 @@ jobs:
- run: - run:
name: Check spelling name: Check spelling
command: ~/.local/bin/codespell --skip "*.enc,.git,Dockerfile*,LICENSE,codespell_whitelist.txt,codespell_ignored_lines.txt" --ignore-words ./scripts/codespell_whitelist.txt --exclude-file ./scripts/codespell_ignored_lines.txt command: ~/.local/bin/codespell --skip "*.enc,.git,Dockerfile*,LICENSE,codespell_whitelist.txt,codespell_ignored_lines.txt" --ignore-words ./scripts/codespell_whitelist.txt --exclude-file ./scripts/codespell_ignored_lines.txt
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
chk_docs_examples: chk_docs_examples:
<<: *base_node_small <<: *base_node_small
@ -682,7 +682,7 @@ jobs:
- run: - run:
name: Test Docs examples name: Test Docs examples
command: ./test/docsCodeStyle.sh command: ./test/docsCodeStyle.sh
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
chk_coding_style: chk_coding_style:
<<: *base_cimg_small <<: *base_cimg_small
@ -702,7 +702,7 @@ jobs:
- run: - run:
name: Check for broken symlinks name: Check for broken symlinks
command: ./scripts/check_symlinks.sh command: ./scripts/check_symlinks.sh
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
chk_errorcodes: chk_errorcodes:
<<: *base_python_small <<: *base_python_small
@ -711,7 +711,7 @@ jobs:
- run: - run:
name: Check for error codes name: Check for error codes
command: ./scripts/error_codes.py --check command: ./scripts/error_codes.py --check
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
chk_pylint: chk_pylint:
<<: *base_cimg_small <<: *base_cimg_small
@ -737,7 +737,7 @@ jobs:
- run: - run:
name: Linting Python Scripts name: Linting Python Scripts
command: ./scripts/pylint_all.py command: ./scripts/pylint_all.py
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
chk_antlr_grammar: chk_antlr_grammar:
<<: *base_cimg_small <<: *base_cimg_small
@ -751,7 +751,7 @@ jobs:
- run: - run:
name: Run tests name: Run tests
command: ./scripts/test_antlr_grammar.sh command: ./scripts/test_antlr_grammar.sh
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
chk_buglist: chk_buglist:
<<: *base_node_small <<: *base_node_small
@ -766,7 +766,7 @@ jobs:
- run: - run:
name: Test buglist name: Test buglist
command: ./test/buglistTests.js command: ./test/buglistTests.js
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
chk_proofs: chk_proofs:
<<: *base_cimg_small <<: *base_cimg_small
@ -779,14 +779,14 @@ jobs:
sudo apt-get -qy install python3-pip sudo apt-get -qy install python3-pip
pip3 install --user z3-solver pip3 install --user z3-solver
- run: *run_proofs - run: *run_proofs
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
chk_docs_pragma_min_version: chk_docs_pragma_min_version:
<<: *base_ubuntu2204_small <<: *base_ubuntu2204_small
steps: steps:
- checkout - checkout
- run: *run_docs_pragma_min_version - run: *run_docs_pragma_min_version
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_ubu_pyscripts: t_ubu_pyscripts:
<<: *base_ubuntu2204_small <<: *base_ubuntu2204_small
@ -795,7 +795,7 @@ jobs:
- run: - run:
name: Python unit tests name: Python unit tests
command: python3 test/pyscriptTests.py command: python3 test/pyscriptTests.py
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_win_pyscripts: t_win_pyscripts:
<<: *base_win_powershell <<: *base_win_powershell
@ -805,7 +805,7 @@ jobs:
- run: - run:
name: Python unit tests name: Python unit tests
command: python.exe test/pyscriptTests.py command: python.exe test/pyscriptTests.py
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
b_ubu: &b_ubu b_ubu: &b_ubu
# this runs 2x faster on xlarge but takes 4x more resources (compared to medium). # this runs 2x faster on xlarge but takes 4x more resources (compared to medium).
@ -876,7 +876,7 @@ jobs:
root: build root: build
paths: paths:
- solc/solc-static-linux - solc/solc-static-linux
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
b_ubu_codecov: b_ubu_codecov:
# Runs ~30% faster on large but we only run it nightly so efficiency matters more. # Runs ~30% faster on large but we only run it nightly so efficiency matters more.
@ -889,7 +889,7 @@ jobs:
- checkout - checkout
- run: *run_build - run: *run_build
- persist_to_workspace: *artifacts_executables - persist_to_workspace: *artifacts_executables
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_ubu_codecov: t_ubu_codecov:
<<: *base_ubuntu2204_large <<: *base_ubuntu2204_large
@ -911,7 +911,7 @@ jobs:
name: "Coverage: All" name: "Coverage: All"
command: codecov --flags all --gcov-root build command: codecov --flags all --gcov-root build
- store_artifacts: *artifacts_test_results - store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
# Builds in C++20 mode and uses debug build in order to speed up. # Builds in C++20 mode and uses debug build in order to speed up.
# Do *NOT* store any artifacts or workspace as we don't run tests on this build. # Do *NOT* store any artifacts or workspace as we don't run tests on this build.
@ -924,7 +924,7 @@ jobs:
steps: steps:
- checkout - checkout
- run: *run_build - run: *run_build
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
b_ubu_ossfuzz: &b_ubu_ossfuzz b_ubu_ossfuzz: &b_ubu_ossfuzz
<<: *base_ubuntu1604_clang <<: *base_ubuntu1604_clang
@ -933,7 +933,7 @@ jobs:
- run: *setup_prerelease_commit_hash - run: *setup_prerelease_commit_hash
- run: *run_build_ossfuzz - run: *run_build_ossfuzz
- persist_to_workspace: *artifacts_executables_ossfuzz - persist_to_workspace: *artifacts_executables_ossfuzz
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_ubu_ossfuzz: &t_ubu_ossfuzz t_ubu_ossfuzz: &t_ubu_ossfuzz
<<: *base_ubuntu1604_clang_small <<: *base_ubuntu1604_clang_small
@ -967,7 +967,7 @@ jobs:
- run: *run_build - run: *run_build
- store_artifacts: *artifacts_solc - store_artifacts: *artifacts_solc
- persist_to_workspace: *artifacts_executables - persist_to_workspace: *artifacts_executables
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
b_osx: b_osx:
<<: *base_osx_large <<: *base_osx_large
@ -989,7 +989,7 @@ jobs:
- build/solc/solc - build/solc/solc
- build/test/soltest - build/test/soltest
- build/test/tools/solfuzzer - build/test/tools/solfuzzer
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_osx_soltest: &t_osx_soltest t_osx_soltest: &t_osx_soltest
<<: *base_osx <<: *base_osx
@ -1007,7 +1007,7 @@ jobs:
- run: *run_soltest - run: *run_soltest
- store_test_results: *store_test_results - store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results - store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_osx_cli: t_osx_cli:
<<: *base_osx <<: *base_osx
@ -1020,7 +1020,7 @@ jobs:
at: . at: .
- run: *run_cmdline_tests - run: *run_cmdline_tests
- store_artifacts: *artifacts_test_results - store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
b_ems: b_ems:
<<: *base_ems_large <<: *base_ems_large
@ -1044,7 +1044,7 @@ jobs:
paths: paths:
- soljson.js - soljson.js
- version.txt - version.txt
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
b_docs: b_docs:
<<: *base_ubuntu2204_small <<: *base_ubuntu2204_small
@ -1057,7 +1057,7 @@ jobs:
- store_artifacts: - store_artifacts:
path: docs/_build/html/ path: docs/_build/html/
destination: docs-html destination: docs-html
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_ubu_soltest_all: &t_ubu_soltest_all t_ubu_soltest_all: &t_ubu_soltest_all
<<: *base_ubuntu2204_large <<: *base_ubuntu2204_large
@ -1122,7 +1122,7 @@ jobs:
apt update --assume-yes apt update --assume-yes
apt install locales-all --assume-yes --no-install-recommends apt install locales-all --assume-yes --no-install-recommends
- run: test/localeTest.sh build/solc/solc - run: test/localeTest.sh build/solc/solc
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_ubu_asan_cli: t_ubu_asan_cli:
# Runs slightly faster on medium but we only run it nightly so efficiency matters more. # Runs slightly faster on medium but we only run it nightly so efficiency matters more.
@ -1189,7 +1189,7 @@ jobs:
node --version node --version
npm --version npm --version
test/externalTests/solc-js/solc-js.sh /tmp/workspace/soljson.js $(cat /tmp/workspace/version.txt) test/externalTests/solc-js/solc-js.sh /tmp/workspace/soljson.js $(cat /tmp/workspace/version.txt)
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_ems_ext_hardhat: t_ems_ext_hardhat:
<<: *base_node_small <<: *base_node_small
@ -1217,7 +1217,7 @@ jobs:
# NOTE: This is expected to work without running `yarn build` first. # NOTE: This is expected to work without running `yarn build` first.
cd hardhat/packages/hardhat-core cd hardhat/packages/hardhat-core
yarn test yarn test
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_ems_ext: t_ems_ext:
parameters: parameters:
@ -1294,7 +1294,7 @@ jobs:
root: . root: .
paths: paths:
- reports/externalTests/ - reports/externalTests/
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
c_ext_benchmarks: c_ext_benchmarks:
<<: *base_node_small <<: *base_node_small
@ -1396,7 +1396,7 @@ jobs:
paths: paths:
- .\solc\*\solc.exe - .\solc\*\solc.exe
- .\test\*\soltest.exe - .\test\*\soltest.exe
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_win_soltest: &t_win_soltest t_win_soltest: &t_win_soltest
<<: *base_win_powershell <<: *base_win_powershell
@ -1423,7 +1423,7 @@ jobs:
command: python ./test/lsp.py .\build\solc\Release\solc.exe --non-interactive command: python ./test/lsp.py .\build\solc\Release\solc.exe --non-interactive
- store_test_results: *store_test_results - store_test_results: *store_test_results
- store_artifacts: *artifacts_test_results - store_artifacts: *artifacts_test_results
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
# Note: b_bytecode_ubu_static is required because b_ubu_static and b_ubu # Note: b_bytecode_ubu_static is required because b_ubu_static and b_ubu
# are currently built on different Ubuntu base images. # are currently built on different Ubuntu base images.
@ -1503,7 +1503,7 @@ jobs:
root: . root: .
paths: paths:
- bytecode-report-emscripten.txt - bytecode-report-emscripten.txt
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
t_bytecode_compare: t_bytecode_compare:
<<: *base_ubuntu2204_small <<: *base_ubuntu2204_small
@ -1542,7 +1542,7 @@ jobs:
# NOTE: store_artifacts does not support the 'when' attribute. # NOTE: store_artifacts does not support the 'when' attribute.
# Fortunately when the artifact does not exist it just says "No artifact files found" and ignores it. # Fortunately when the artifact does not exist it just says "No artifact files found" and ignores it.
path: all-bytecode-reports.zip path: all-bytecode-reports.zip
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
c_release_binaries: c_release_binaries:
<<: *base_ubuntu2204 <<: *base_ubuntu2204
@ -1582,8 +1582,8 @@ jobs:
tar --create --file ../solc-bin-binaries.tar * tar --create --file ../solc-bin-binaries.tar *
- store_artifacts: - store_artifacts:
path: solc-bin-binaries.tar path: solc-bin-binaries.tar
- gitter_notify_failure_unless_pr - matrix_notify_failure_unless_pr
- gitter_notify_release_unless_pr - matrix_notify_release_unless_pr
workflows: workflows:
version: 2 version: 2