Remove CircleCI and rename vsts to azure-pipelines (#301)

This commit is contained in:
Julien Maffre 2019-08-12 11:10:05 +01:00 коммит произвёл GitHub
Родитель 7593a8bfbd
Коммит 612303c786
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
13 изменённых файлов: 61 добавлений и 140 удалений

Просмотреть файл

@ -9,7 +9,7 @@ jobs:
clean: true
submodules: true
- script: doxygen
- script: doxygen
displayName: Doxgen
- script: |

Просмотреть файл

@ -13,9 +13,8 @@ trigger:
- 'THIRD_PARTY_NOTICES.txt'
- 'getting_started/'
- 'sphinx/'
- '.circleci/'
- '.github/'
- '.vsts-gh-pages.yml'
- '.azure-pipelines-gh-pages.yml'
- 'LICENSE'
pr:
@ -34,9 +33,8 @@ pr:
- 'THIRD_PARTY_NOTICES.txt'
- 'getting_started/'
- 'sphinx/'
- '.circleci/'
- '.github/'
- '.vsts-gh-pages.yml'
- '.azure-pipelines-gh-pages.yml'
- 'LICENSE'
schedules:
@ -67,7 +65,7 @@ jobs:
- script: python3.7 notice-check.py
displayName: 'Check copyright notices'
- script: ./check-format.sh src
- script: ./check-format.sh src samples
displayName: 'Check C++ code format'
- script: |
@ -78,11 +76,11 @@ jobs:
displayName: 'Check Python code format'
# Actual coverage build steps starts here
- template: .vsts-ci-templates/build.yml
- template: .azure-pipelines-templates/build.yml
parameters:
cmake_args: '-DTARGET=virtual -DBUILD_SMALLBANK=OFF -DCOVERAGE=ON'
- template: .vsts-ci-templates/test.yml
- template: .azure-pipelines-templates/test.yml
parameters:
suite_name_suffix: 'coverage'
@ -104,10 +102,10 @@ jobs:
clean: true
submodules: true
- template: .vsts-ci-templates/build.yml
- template: .azure-pipelines-templates/build.yml
parameters:
cmake_args: '-DTARGET=virtual -DBUILD_SMALLBANK=OFF -DSAN=ON'
- template: .vsts-ci-templates/test.yml
- template: .azure-pipelines-templates/test.yml
parameters:
suite_name_suffix: 'san'

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -13,9 +13,8 @@ trigger:
- 'THIRD_PARTY_NOTICES.txt'
- 'getting_started/'
- 'sphinx/'
- '.circleci/'
- '.github/'
- '.vsts-gh-pages.yml'
- '.azure-pipelines-gh-pages.yml'
- 'LICENSE'
pr:
@ -34,9 +33,8 @@ pr:
- 'THIRD_PARTY_NOTICES.txt'
- 'getting_started/'
- 'sphinx/'
- '.circleci/'
- '.github/'
- '.vsts-gh-pages.yml'
- '.azure-pipelines-gh-pages.yml'
- 'LICENSE'
schedules:
@ -54,10 +52,10 @@ jobs:
- checkout: self
clean: true
submodules: true
- template: .vsts-ci-templates/build.yml
- template: .azure-pipelines-templates/build.yml
parameters:
cmake_args: '-DBUILD_SMALLBANK=OFF'
- template: .vsts-ci-templates/publish_build.yml
- template: .azure-pipelines-templates/publish_build.yml
parameters:
artifact_name: build_results
@ -69,10 +67,10 @@ jobs:
- checkout: self
clean: true
submodules: true
- template: .vsts-ci-templates/download_build.yml
- template: .azure-pipelines-templates/download_build.yml
parameters:
artifact_name: build_results
- template: .vsts-ci-templates/test.yml
- template: .azure-pipelines-templates/test.yml
parameters:
ctest_filter: '-LE "perf|end_to_end"'
suite_name_suffix: ' SGX quick tests'
@ -85,10 +83,10 @@ jobs:
- checkout: self
clean: true
submodules: true
- template: .vsts-ci-templates/download_build.yml
- template: .azure-pipelines-templates/download_build.yml
parameters:
artifact_name: build_results
- template: .vsts-ci-templates/test.yml
- template: .azure-pipelines-templates/test.yml
parameters:
ctest_filter: '-L end_to_end -I 0,,2'
suite_name_suffix: ' SGX end to end tests A'
@ -101,10 +99,10 @@ jobs:
- checkout: self
clean: true
submodules: true
- template: .vsts-ci-templates/download_build.yml
- template: .azure-pipelines-templates/download_build.yml
parameters:
artifact_name: build_results
- template: .vsts-ci-templates/test.yml
- template: .azure-pipelines-templates/test.yml
parameters:
ctest_filter: '-L end_to_end -I 1,,2'
suite_name_suffix: ' SGX end to end tests B'
@ -115,10 +113,10 @@ jobs:
- checkout: self
clean: true
submodules: true
- template: .vsts-ci-templates/build.yml
- template: .azure-pipelines-templates/build.yml
parameters:
cmake_args: '-DBUILD_SMALLBANK=ON -DSERVICE_IDENTITY_CURVE_CHOICE=secp256k1_bitcoin'
- template: .vsts-ci-templates/publish_build.yml
- template: .azure-pipelines-templates/publish_build.yml
parameters:
artifact_name: perf_build_results
@ -130,11 +128,11 @@ jobs:
- checkout: self
clean: true
submodules: true
- template: .vsts-ci-templates/download_build.yml
- template: .azure-pipelines-templates/download_build.yml
parameters:
artifact_name: perf_build_results
- template: .vsts-ci-templates/test.yml
- template: .azure-pipelines-templates/test.yml
parameters:
suite_name_suffix: ' SGX Performance'
ctest_filter: '-L perf'
- template: .vsts-ci-templates/push_perf_data.yml
- template: .azure-pipelines-templates/push_perf_data.yml

Просмотреть файл

@ -1,92 +0,0 @@
version: 2.1
commands:
build_and_tests:
parameters:
cmake_flags:
type: string
default: ""
suite_name:
type: string
default: "coverage"
steps:
- checkout
- run:
name: Make build directory
command: mkdir build
- run:
name: CMake
command: cmake -GNinja -DTARGET=virtual -DBUILD_SMALLBANK=OFF << parameters.cmake_flags >> ..
working_directory: build
- run:
name: Ninja
command: ninja -j1
working_directory: build
- run:
name: Run tests
working_directory: build
command: ./tests.sh -VV --timeout 240 --no-compress-output -T Test
- run:
name: Extract test results
working_directory: build
command: |
mkdir -p test-results/junit
xsltproc --stringparam suiteName "<< parameters.suite_name >>" ../tests/infra/ctest_to_junit.xslt Testing/*/Test.xml > test-results/junit/results.xml
- store_test_results:
path: build/test-results
gather_and_push_coverage:
steps:
- run:
name: Push coverage
command: ../tests/coverage/generate_coverage.sh
working_directory: build
executors:
medium_1804:
resource_class: medium
docker:
- image: ccfciteam/ccf-ci-18.04:latest
jobs:
static_checks:
executor: medium_1804
steps:
- checkout
- run:
name: Shell Check
command: find . -regex ".*\.sh$" | xargs shellcheck -s bash -e SC2044,SC2002,SC1091
- run:
name: Check copyright notices
command: python3.7 notice-check.py
- run:
name: Check C++ code format
command: ./check-format.sh src
- run:
name: Check Python code format
command: |
python3.7 -m venv env
source env/bin/activate
pip install black
black --check sphinx/ tests/ notice-check.py
build_coverage:
executor: medium_1804
steps:
- build_and_tests:
cmake_flags: "-DCOVERAGE=ON"
- gather_and_push_coverage
build_san:
executor: medium_1804
steps:
- build_and_tests:
cmake_flags: "-DSAN=ON"
suite_name: "SAN"
workflows:
ci:
jobs:
- static_checks
- build_coverage
- build_san

15
.github/CONTRIBUTING.md поставляемый
Просмотреть файл

@ -10,8 +10,13 @@ to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simpl
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
All pull requests must pass a suite of CI tests before they will be merged. The test
commands are defined in `.vsts-ci.yml` and `.circleci/config.yml`, so you can locally
repeat any tests which fail. You should at least run the `static_checks` job before
creating a pull request, ensuring all of your code is correctly formatted. The test
commands will only report misformatted files - to _reformat_ the files, pass `-f`
to the `check-format.sh ...` command and remove `--check` from the `black ...` command.
commands are defined in `.azure-pipelines.yml` and `.azure-pipelines-no-sgx.yml`, so
you can locally repeat any tests which fail. You should at least run the code format
checking scripts defined in `.azure-pipelines-no-sgx.yml` before creating a pull request,
ensuring all of your code is correctly formatted. The test commands will only report
misformatted files - to _reformat_ the files, pass `-f` to the `check-format.sh ...`
command and remove `--check` from the `black ...` command.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

Просмотреть файл

@ -104,12 +104,14 @@ to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simpl
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
All pull requests must pass a suite of CI tests before they will be merged. The test
commands are defined in `.vsts-ci.yml` and `.circleci/config.yml`, so you can locally
repeat any tests which fail. You should at least run the `static_checks` job before
creating a pull request, ensuring all of your code is correctly formatted. The test
commands will only report misformatted files - to _reformat_ the files, pass `-f`
to the `check-format.sh ...` command and remove `--check` from the `black ...` command.
commands are defined in `.azure-pipelines.yml` and `.azure-pipelines-no-sgx.yml`, so
you can locally repeat any tests which fail. You should at least run the code format
checking scripts defined in `.azure-pipelines-no-sgx.yml` before creating a pull request,
ensuring all of your code is correctly formatted. The test commands will only report
misformatted files - to _reformat_ the files, pass `-f` to the `check-format.sh ...`
command and remove `--check` from the `black ...` command.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

Просмотреть файл

@ -53,7 +53,8 @@ namespace ccfapp
if (account_r.has_value())
{
return jsonrpc::error(
jsonrpc::StandardErrorCodes::INVALID_PARAMS, "Account already exists");
jsonrpc::StandardErrorCodes::INVALID_PARAMS,
"Account already exists");
}
account_view->put(name, acc_id);
@ -64,7 +65,8 @@ namespace ccfapp
if (savings_r.has_value())
{
return jsonrpc::error(
jsonrpc::StandardErrorCodes::INVALID_PARAMS, "Account already exists");
jsonrpc::StandardErrorCodes::INVALID_PARAMS,
"Account already exists");
}
savings_view->put(acc_id, savings_amt);
@ -75,7 +77,8 @@ namespace ccfapp
if (checking_r.has_value())
{
return jsonrpc::error(
jsonrpc::StandardErrorCodes::INVALID_PARAMS, "Account already exists");
jsonrpc::StandardErrorCodes::INVALID_PARAMS,
"Account already exists");
}
checking_view->put(acc_id, checking_amt);
@ -137,7 +140,8 @@ namespace ccfapp
if (!account_r.has_value())
return error(
jsonrpc::StandardErrorCodes::INVALID_PARAMS, "Account does not exist");
jsonrpc::StandardErrorCodes::INVALID_PARAMS,
"Account does not exist");
auto savings_view = tx.get_view(savingsTable);
auto savings_r = savings_view->get(account_r.value());
@ -167,14 +171,16 @@ namespace ccfapp
if (name.empty())
return error(
jsonrpc::StandardErrorCodes::INVALID_PARAMS, "A name must be specified");
jsonrpc::StandardErrorCodes::INVALID_PARAMS,
"A name must be specified");
auto account_view = tx.get_view(accountTable);
auto account_r = account_view->get(name);
if (!account_r.has_value())
return error(
jsonrpc::StandardErrorCodes::INVALID_PARAMS, "Account does not exist");
jsonrpc::StandardErrorCodes::INVALID_PARAMS,
"Account does not exist");
auto savings_view = tx.get_view(savingsTable);
auto savings_r = savings_view->get(account_r.value());
@ -204,17 +210,20 @@ namespace ccfapp
if (name.empty())
return error(
jsonrpc::StandardErrorCodes::INVALID_PARAMS, "A name must be specified");
jsonrpc::StandardErrorCodes::INVALID_PARAMS,
"A name must be specified");
if (value <= 0)
return error(jsonrpc::StandardErrorCodes::INVALID_PARAMS, "Value <= 0");
return error(
jsonrpc::StandardErrorCodes::INVALID_PARAMS, "Value <= 0");
auto account_view = tx.get_view(accountTable);
auto account_r = account_view->get(name);
if (!account_r.has_value())
return error(
jsonrpc::StandardErrorCodes::INVALID_PARAMS, "Account does not exist");
jsonrpc::StandardErrorCodes::INVALID_PARAMS,
"Account does not exist");
auto checking_view = tx.get_view(checkingTable);
auto checking_r = checking_view->get(account_r.value());
@ -291,7 +300,8 @@ namespace ccfapp
if (!account_r.has_value())
return error(
jsonrpc::StandardErrorCodes::INVALID_PARAMS, "Account does not exist");
jsonrpc::StandardErrorCodes::INVALID_PARAMS,
"Account does not exist");
auto savings_view = tx.get_view(savingsTable);
auto savings_r = savings_view->get(account_r.value());

Просмотреть файл

@ -377,7 +377,7 @@ namespace ccf
jsonrpc::error_response(
rpc_ctx.req.seq_no,
jsonrpc::StandardErrorCodes::INTERNAL_ERROR,
"An error occured while joining the network"),
"An error occurred while joining the network"),
rpc_ctx.pack.value()));
}