You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by li...@apache.org on 2022/07/29 06:49:56 UTC
[rocketmq-clients] branch master updated: Add license header to rust source files (#93)
This is an automated email from the ASF dual-hosted git repository.
lizhanhui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
The following commit(s) were added to refs/heads/master by this push:
new bc5fe2d Add license header to rust source files (#93)
bc5fe2d is described below
commit bc5fe2d712aa66f51e90650fb7de604b3aba024e
Author: Zhanhui Li <li...@gmail.com>
AuthorDate: Fri Jul 29 14:49:52 2022 +0800
Add license header to rust source files (#93)
* Set up github action for rust
* Fix license issue
* Trigger on paths
---
.github/workflows/cpp_build.yml | 4 ++++
.github/workflows/csharp_build.yml | 4 ++++
.github/workflows/golang_build.yml | 4 ++++
.github/workflows/java_build.yml | 4 ++++
.github/workflows/rust.yml | 29 +++++++++++++++++++++++++++++
rust/Cargo.toml | 16 ++++++++++++++++
rust/build.rs | 16 ++++++++++++++++
rust/src/command.rs | 16 ++++++++++++++++
rust/src/producer.rs | 16 ++++++++++++++++
9 files changed, 109 insertions(+)
diff --git a/.github/workflows/cpp_build.yml b/.github/workflows/cpp_build.yml
index fbf4e7f..822c60f 100644
--- a/.github/workflows/cpp_build.yml
+++ b/.github/workflows/cpp_build.yml
@@ -2,9 +2,13 @@ name: CPP Build
on:
pull_request:
types: [opened, reopened, synchronize]
+ paths:
+ - cpp
push:
branches:
- master
+ paths:
+ - cpp
jobs:
cpp_build:
name: "CPP (${{ matrix.os }})"
diff --git a/.github/workflows/csharp_build.yml b/.github/workflows/csharp_build.yml
index b6e0fc8..507f151 100644
--- a/.github/workflows/csharp_build.yml
+++ b/.github/workflows/csharp_build.yml
@@ -2,9 +2,13 @@ name: C# Build
on:
pull_request:
types: [opened, reopened, synchronize]
+ paths:
+ - csharp
push:
branches:
- master
+ paths:
+ - csharp
jobs:
c_sharp:
name: "C# (ubuntu-18.04)"
diff --git a/.github/workflows/golang_build.yml b/.github/workflows/golang_build.yml
index 4b645ae..3c87237 100644
--- a/.github/workflows/golang_build.yml
+++ b/.github/workflows/golang_build.yml
@@ -2,9 +2,13 @@ name: Golang Build
on:
pull_request:
types: [opened, reopened, synchronize]
+ paths:
+ - golang
push:
branches:
- master
+ paths:
+ - golang
jobs:
cpp_build:
name: "Golang (${{ matrix.os }}, Go ${{ matrix.go }})"
diff --git a/.github/workflows/java_build.yml b/.github/workflows/java_build.yml
index 55cab62..72b45f5 100644
--- a/.github/workflows/java_build.yml
+++ b/.github/workflows/java_build.yml
@@ -2,9 +2,13 @@ name: Java Build
on:
pull_request:
types: [opened, reopened, synchronize]
+ paths:
+ - java
push:
branches:
- master
+ paths:
+ - java
jobs:
java_build:
name: "Java (${{ matrix.os }}, JDK-${{ matrix.jdk }})"
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
new file mode 100644
index 0000000..8d1604e
--- /dev/null
+++ b/.github/workflows/rust.yml
@@ -0,0 +1,29 @@
+name: Rust
+on:
+ pull_request:
+ types: [opened, reopened, synchronize]
+ paths:
+ - rust
+ push:
+ branches:
+ - master
+ - rust_dev
+ paths:
+ - rust
+
+jobs:
+ build_and_test:
+ name: Rust project
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ - name: Build
+ working-directory: ./rust
+ run: cargo build
+
+ - name: Unit Test
+ working-directory: ./rust
+ run: cargo test
\ No newline at end of file
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index b290d64..7c57c83 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -1,3 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
[package]
name = "rocketmq"
version = "0.1.0"
diff --git a/rust/build.rs b/rust/build.rs
index eebab8a..4cf89da 100644
--- a/rust/build.rs
+++ b/rust/build.rs
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
fn main() {
tonic_build::configure()
.build_client(true)
diff --git a/rust/src/command.rs b/rust/src/command.rs
index 5a3f3fa..0ec04da 100644
--- a/rust/src/command.rs
+++ b/rust/src/command.rs
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
use crate::client::Client;
use crate::error::ClientError;
use crate::pb::{QueryRouteRequest, QueryRouteResponse};
diff --git a/rust/src/producer.rs b/rust/src/producer.rs
index 685eb82..5c74acc 100644
--- a/rust/src/producer.rs
+++ b/rust/src/producer.rs
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
use slog::Logger;
use crate::{client, error};