TD-312: Use valitydev/thrift v0.14.2.3 (#14)

* valitydev/rebar3_thrift_compiler v0.4
* valitydev/msgpack-proto@7e44749
* Reuse common java CI workflows
* Add Erlang CI workflow
* Mention `msgpack_proto` as dependency @ app.src
This commit is contained in:
Andrew Mayorov 2022-06-22 18:44:49 +03:00 committed by GitHub
parent 38ce3ffde5
commit 71c56878c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 58 additions and 78 deletions

View File

@ -1,29 +0,0 @@
name: Build Artifact
on:
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Install thrift
uses: valitydev/action-setup-thrift@v0.0.1
- name: Checkout Repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Maven
uses: actions/setup-java@v2
with:
java-version: '15'
distribution: 'adopt'
- name: Retrieve commit info
run: |
echo "::set-output name=COMMIT_NUMBER::$(git rev-list HEAD --count)"
echo "::set-output name=SHA_7::${GITHUB_SHA::7}"
id: commit_info
- name: Build package
run: mvn --batch-mode -Dcommit.number=${{ steps.commit_info.outputs.COMMIT_NUMBER }} -Drevision="1.${{ steps.commit_info.outputs.COMMIT_NUMBER }}-${{ steps.commit_info.outputs.SHA_7 }}" clean compile -f pom.xml

View File

@ -1,31 +0,0 @@
name: Deploy Artifact
on:
push:
branches:
- 'master'
- 'main'
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- name: Install thrift
uses: valitydev/action-setup-thrift@v0.0.1
- name: Checkout Repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Retrieve commit info
run: |
echo "::set-output name=COMMIT_NUMBER::$(git rev-list HEAD --count)"
echo "::set-output name=SHA_7::${GITHUB_SHA::7}"
id: commit_info
- name: Deploy package
uses: valitydev/action-deploy-jdk-package@v1.0.9
with:
server-username: ${{ secrets.OSSRH_USERNAME }}
server-password: ${{ secrets.OSSRH_TOKEN }}
deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
maven-args: '-Dcommit.number=${{ steps.commit_info.outputs.COMMIT_NUMBER }} -Drevision="1.${{ steps.commit_info.outputs.COMMIT_NUMBER }}-${{ steps.commit_info.outputs.SHA_7 }}"'

21
.github/workflows/erlang-checks.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Erlang CI Checks
on:
push:
branches:
- 'master'
- 'epic/**'
pull_request:
branches: ['**']
jobs:
run:
name: Run checks
uses: valitydev/erlang-workflows/.github/workflows/erlang-simple-build.yml@v1
with:
otp-version: 24
rebar-version: 3.18
thrift-version: 0.14.2.3
use-thrift: true
run-eunit: false
run-common-test: false

17
.github/workflows/java-deploy.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: Java deploy
on:
push:
branches:
- "master"
- "main"
jobs:
deploy:
uses: valitydev/java-workflow/.github/workflows/maven-thrift-deploy.yml@v1
secrets:
server-username: ${{ secrets.OSSRH_USERNAME }}
server-password: ${{ secrets.OSSRH_TOKEN }}
deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
mm-webhook-url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}

10
.github/workflows/java-pr.yml vendored Normal file
View File

@ -0,0 +1,10 @@
name: Java build
on:
pull_request:
branches:
- "*"
jobs:
build:
uses: valitydev/java-workflow/.github/workflows/maven-thrift-build.yml@v1

View File

@ -1,5 +1,5 @@
namespace java dev.vality.bender
namespace erlang bender
namespace erlang bender.bender
include "proto/msgpack.thrift"

View File

@ -1,6 +1,5 @@
%% Common project erlang options.
{erl_opts, [
% mandatory
debug_info,
warnings_as_errors,
@ -26,10 +25,7 @@
]}.
{deps, [
{msgpack_proto,
{git, "https://github.com/valitydev/msgpack-proto.git",
{branch, "master"}}
}
{msgpack_proto, {git, "https://github.com/valitydev/msgpack-proto.git", {branch, "master"}}}
]}.
%% XRef checks
@ -56,21 +52,19 @@
]}.
{plugins, [
{erlfmt, "1.0.0"},
{rebar3_thrift_compiler,
{git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {branch, "master"}}}
{git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {tag, "0.4"}}}
]}.
{provider_hooks, [
{pre, [
{compile, {thrift, compile}},
{clean , {thrift, clean }}
{clean, {thrift, clean}}
]}
]}.
{thrift_compiler_opts, [
{in_dir, "proto"},
{in_files, [
"bender.thrift"
]},
{gen, "erlang:scoped_typenames"}
{gen, "erlang:app_namespaces"}
]}.

View File

@ -1,4 +1,4 @@
[{<<"msgpack_proto">>,
{git,"https://github.com/valitydev/msgpack-proto.git",
{ref,"ec15d5e854ea60c58467373077d90c2faf6273d8"}},
{ref,"7e447496aa5df4a5f1ace7ef2e3c31248b2a3ed0"}},
0}].

View File

@ -3,9 +3,7 @@
{vsn, "1.0.0"},
{applications, [
kernel,
stdlib
]},
{maintainers, [
"Sergei Shuvatov <s.shuvatov@rbkmoney.com>"
stdlib,
msgpack_proto
]}
]}.
]}.