mirror of
https://github.com/valitydev/binbase-proto.git
synced 2024-11-06 00:25:18 +00:00
Bump rebar plugin (#17)
* bump to version 0.4 * added msgpack as dep * updated workflow * updated other workflows
This commit is contained in:
parent
9db92d90e0
commit
68410722dc
33
.github/workflows/deploy-jar.yml
vendored
33
.github/workflows/deploy-jar.yml
vendored
@ -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
21
.github/workflows/erlang-checks.yml
vendored
Normal 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
|
39
.github/workflows/erlang-pr.yml
vendored
39
.github/workflows/erlang-pr.yml
vendored
@ -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
17
.github/workflows/java-deploy.yml
vendored
Normal 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 }}
|
30
.github/workflows/java-pr.yml
vendored
30
.github/workflows/java-pr.yml
vendored
@ -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
14
.gitignore
vendored
@ -1,2 +1,14 @@
|
||||
/_build/
|
||||
*~
|
||||
.tags*
|
||||
*.sublime-workspace
|
||||
.DS_Store
|
||||
.idea
|
||||
|
||||
*~
|
||||
\#*
|
||||
.\#*
|
||||
.tags*
|
||||
rebar3.crashdump
|
||||
include/*.hrl
|
||||
src/*.erl
|
||||
*.iml
|
||||
|
5
pom.xml
5
pom.xml
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
11
rebar.config
11
rebar.config
@ -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
4
rebar.lock
Normal file
@ -0,0 +1,4 @@
|
||||
[{<<"msgpack_proto">>,
|
||||
{git,"https://github.com/valitydev/msgpack-proto.git",
|
||||
{ref,"7e447496aa5df4a5f1ace7ef2e3c31248b2a3ed0"}},
|
||||
0}].
|
@ -3,6 +3,7 @@
|
||||
{vsn, "0.1.0"},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib
|
||||
stdlib,
|
||||
msgpack_proto
|
||||
]}
|
||||
]}.
|
||||
|
Loading…
Reference in New Issue
Block a user