Bump rebar plugin (#17)

* bump to version 0.4

* added msgpack as dep

* updated workflow

* updated other workflows
This commit is contained in:
Артем 2022-07-08 14:50:33 +03:00 committed by GitHub
parent 9db92d90e0
commit 68410722dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 73 additions and 128 deletions

View File

@ -1,33 +0,0 @@
name: Deploy JAR 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

View File

@ -1,39 +0,0 @@
name: Build Erlang
on:
pull_request:
branches: ['*']
push:
branches: [master]
jobs:
build:
name: Build and verify
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Install thrift
uses: valitydev/action-setup-thrift@v0.0.5
- name: Setup BEAM
uses: erlef/setup-beam@v1.10
id: beam
with:
otp-version: '24'
rebar3-version: '3.18'
- name: Restore PLT cache
uses: actions/cache@v2
id: plt-cache
with:
key: |
${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-plt
path: |
_build/default/rebar3_*_plt
- run: rebar3 compile
- run: rebar3 xref
- run: rebar3 dialyzer

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 }}

View File

@ -1,34 +1,10 @@
name: Build Java
name: Java build
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
uses: valitydev/java-workflow/.github/workflows/maven-thrift-build.yml@v1

14
.gitignore vendored
View File

@ -1,2 +1,14 @@
/_build/
*~
.tags*
*.sublime-workspace
.DS_Store
.idea
*~
\#*
.\#*
.tags*
rebar3.crashdump
include/*.hrl
src/*.erl
*.iml

View File

@ -29,6 +29,11 @@
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.vality</groupId>
<artifactId>msgpack-proto</artifactId>
<version>1.9-e8a931b</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>

View File

@ -1,7 +1,7 @@
namespace java dev.vality.damsel.binbase
namespace erlang binbase
namespace erlang binbase.binbase
include "msgpack.thrift"
include "proto/msgpack.thrift"
enum CardType {
charge_card

View File

@ -1,20 +0,0 @@
namespace java dev.vality.damsel.binbase.msgpack
namespace erlang binbase
/**
* Значение в msgpack, согласно [спецификации](https://github.com/msgpack/msgpack/blob/master/spec.md).
*/
union Value {
1: Nil nl
2: bool b
3: i64 i
4: double flt // Кроме ±Inf и NaN
5: string str
6: binary bin
7: Object obj
8: Array arr
}
struct Nil {}
typedef list<Value> Array
typedef map<Value, Value> Object

View File

@ -25,6 +25,10 @@
warn_missing_spec_all
]}.
{deps, [
{msgpack_proto, {git, "https://github.com/valitydev/msgpack-proto.git", {branch, "master"}}}
]}.
%% XRef checks
{xref_checks, [
undefined_function_calls,
@ -50,7 +54,7 @@
{plugins, [
{rebar3_thrift_compiler,
{git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {tag, "0.3.1"}}}
{git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {tag, "0.4"}}}
]}.
{provider_hooks, [
@ -62,8 +66,5 @@
{thrift_compiler_opts, [
{in_dir, "proto"},
{in_files, [
"binbase.thrift"
]},
{gen, "erlang:app_prefix=binbase,scoped_typenames"}
{gen, "erlang:app_namespaces"}
]}.

4
rebar.lock Normal file
View File

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

View File

@ -3,6 +3,7 @@
{vsn, "0.1.0"},
{applications, [
kernel,
stdlib
stdlib,
msgpack_proto
]}
]}.