From 4278d8a30726e40affde4e2fd2ad725f20ce1df0 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Tue, 25 May 2021 16:21:06 +0700 Subject: [PATCH 1/7] feat: use member properties instead of inheritance for udp socket --- .../musen/broadcaster/base_broadcaster.hpp | 17 ++++++++--- include/musen/broadcaster/broadcaster.hpp | 9 ++++-- .../musen/broadcaster/string_broadcaster.hpp | 4 ++- include/musen/listener/base_listener.hpp | 12 ++++++-- include/musen/listener/listener.hpp | 5 ++-- include/musen/listener/string_listener.hpp | 4 ++- include/musen/udp_socket.hpp | 2 ++ src/broadcaster/base_broadcaster.cpp | 28 +++++++++++++++---- src/broadcaster/string_broadcaster.cpp | 5 ++-- src/listener/base_listener.cpp | 24 ++++++++++++---- src/listener/string_listener.cpp | 5 ++-- src/udp_socket.cpp | 15 ++++++---- 12 files changed, 97 insertions(+), 33 deletions(-) diff --git a/include/musen/broadcaster/base_broadcaster.hpp b/include/musen/broadcaster/base_broadcaster.hpp index 6e37e6f..fc42e1c 100644 --- a/include/musen/broadcaster/base_broadcaster.hpp +++ b/include/musen/broadcaster/base_broadcaster.hpp @@ -23,24 +23,31 @@ #include -#include #include +#include +#include #include "../udp_socket.hpp" namespace musen { -class BaseBroadcaster : public UdpSocket +class BaseBroadcaster { public: - explicit BaseBroadcaster(const int & port); + explicit BaseBroadcaster( + const int & port, std::shared_ptr udp_socket = std::make_shared()); + + bool connect(); + bool disconnect(); - int send(const void * data, const int & length); + int send(const char * data, const int & length); void enable_broadcast(const bool & enable); void add_target_host(const std::string & host); + std::shared_ptr get_udp_socket() const; + const int & get_port() const; protected: @@ -48,6 +55,8 @@ class BaseBroadcaster : public UdpSocket std::list get_recipent_sas_from_broadcast_ifas() const; std::list get_recipent_sas_from_target_hosts() const; + std::shared_ptr udp_socket; + bool broadcast; std::list target_hosts; diff --git a/include/musen/broadcaster/broadcaster.hpp b/include/musen/broadcaster/broadcaster.hpp index a60e7e5..b1d7196 100644 --- a/include/musen/broadcaster/broadcaster.hpp +++ b/include/musen/broadcaster/broadcaster.hpp @@ -21,6 +21,8 @@ #ifndef MUSEN__BROADCASTER__BROADCASTER_HPP_ #define MUSEN__BROADCASTER__BROADCASTER_HPP_ +#include + #include "./base_broadcaster.hpp" namespace musen @@ -30,14 +32,15 @@ template class Broadcaster : public BaseBroadcaster { public: - explicit Broadcaster(const int & port) - : BaseBroadcaster(port) + explicit Broadcaster( + const int & port, std::shared_ptr udp_socket = std::make_shared()) + : BaseBroadcaster(port, udp_socket) { } int send(const T & data) { - return BaseBroadcaster::send(&data, sizeof(data)); + return BaseBroadcaster::send((const char *)&data, sizeof(data)); } }; diff --git a/include/musen/broadcaster/string_broadcaster.hpp b/include/musen/broadcaster/string_broadcaster.hpp index 66d8626..90bc994 100644 --- a/include/musen/broadcaster/string_broadcaster.hpp +++ b/include/musen/broadcaster/string_broadcaster.hpp @@ -21,6 +21,7 @@ #ifndef MUSEN__BROADCASTER__STRING_BROADCASTER_HPP_ #define MUSEN__BROADCASTER__STRING_BROADCASTER_HPP_ +#include #include #include @@ -32,7 +33,8 @@ namespace musen class StringBroadcaster : public BaseBroadcaster { public: - explicit StringBroadcaster(const int & port); + explicit StringBroadcaster( + const int & port, std::shared_ptr udp_socket = std::make_shared()); int send(const std::string & message); int send(const std::vector & messages, const std::string & delimiter = ","); diff --git a/include/musen/listener/base_listener.hpp b/include/musen/listener/base_listener.hpp index 49b1625..75f974a 100644 --- a/include/musen/listener/base_listener.hpp +++ b/include/musen/listener/base_listener.hpp @@ -21,6 +21,8 @@ #ifndef MUSEN__LISTENER__BASE_LISTENER_HPP_ #define MUSEN__LISTENER__BASE_LISTENER_HPP_ +#include + #include "../udp_socket.hpp" namespace musen @@ -29,15 +31,21 @@ namespace musen class BaseListener : public UdpSocket { public: - explicit BaseListener(const int & port); + explicit BaseListener( + const int & port, std::shared_ptr udp_socket = std::make_shared()); - bool connect() override; + bool connect(); + bool disconnect(); int receive(void * buffer, const int & length); + std::shared_ptr get_udp_socket() const; + const int & get_port() const; protected: + std::shared_ptr udp_socket; + int port; }; diff --git a/include/musen/listener/listener.hpp b/include/musen/listener/listener.hpp index a3fdbeb..a14f5ed 100644 --- a/include/musen/listener/listener.hpp +++ b/include/musen/listener/listener.hpp @@ -32,8 +32,9 @@ template class Listener : public BaseListener { public: - explicit Listener(const int & port) - : BaseListener(port) + explicit Listener( + const int & port, std::shared_ptr udp_socket = std::make_shared()) + : BaseListener(port, udp_socket) { } diff --git a/include/musen/listener/string_listener.hpp b/include/musen/listener/string_listener.hpp index 77480dd..7df1c76 100644 --- a/include/musen/listener/string_listener.hpp +++ b/include/musen/listener/string_listener.hpp @@ -21,6 +21,7 @@ #ifndef MUSEN__LISTENER__STRING_LISTENER_HPP_ #define MUSEN__LISTENER__STRING_LISTENER_HPP_ +#include #include #include @@ -32,7 +33,8 @@ namespace musen class StringListener : public BaseListener { public: - explicit StringListener(const int & port); + explicit StringListener( + const int & port, std::shared_ptr udp_socket = std::make_shared()); std::string receive(const int & length); std::vector receive(const int & length, const std::string & delimiter); diff --git a/include/musen/udp_socket.hpp b/include/musen/udp_socket.hpp index e2c818c..c915467 100644 --- a/include/musen/udp_socket.hpp +++ b/include/musen/udp_socket.hpp @@ -33,6 +33,8 @@ class UdpSocket virtual bool connect(); virtual bool disconnect(); + const int & get_sockfd() const; + bool is_connected() const; protected: diff --git a/src/broadcaster/base_broadcaster.cpp b/src/broadcaster/base_broadcaster.cpp index d712a21..2d93b61 100644 --- a/src/broadcaster/base_broadcaster.cpp +++ b/src/broadcaster/base_broadcaster.cpp @@ -25,20 +25,32 @@ #include #include #include +#include #include namespace musen { -BaseBroadcaster::BaseBroadcaster(const int & port) -: broadcast(true), +BaseBroadcaster::BaseBroadcaster(const int & port, std::shared_ptr udp_socket) +: udp_socket(udp_socket), + broadcast(true), port(port) { } -int BaseBroadcaster::send(const void * data, const int & length) +bool BaseBroadcaster::connect() { - if (!is_connected() || length <= 0) { + return udp_socket->connect(); +} + +bool BaseBroadcaster::disconnect() +{ + return udp_socket->disconnect(); +} + +int BaseBroadcaster::send(const char * data, const int & length) +{ + if (!udp_socket->is_connected() || length <= 0) { return 0; } @@ -48,7 +60,8 @@ int BaseBroadcaster::send(const void * data, const int & length) // Sent to each recipent socket addresses int lowest_sent = -1; for (const auto & sa : sas) { - int sent = sendto(sockfd, data, length, 0, (struct sockaddr *)&sa, sizeof(sa)); + int sent = sendto( + udp_socket->get_sockfd(), data, length, 0, (struct sockaddr *)&sa, sizeof(sa)); // If lowest_sent is not yet set (-1) or sent is less than lowest_sent if (lowest_sent < 0 || sent < lowest_sent) { @@ -70,6 +83,11 @@ void BaseBroadcaster::add_target_host(const std::string & target_host) target_hosts.push_back(target_host); } +std::shared_ptr BaseBroadcaster::get_udp_socket() const +{ + return udp_socket; +} + const int & BaseBroadcaster::get_port() const { return port; diff --git a/src/broadcaster/string_broadcaster.cpp b/src/broadcaster/string_broadcaster.cpp index be6e135..68193ed 100644 --- a/src/broadcaster/string_broadcaster.cpp +++ b/src/broadcaster/string_broadcaster.cpp @@ -20,14 +20,15 @@ #include +#include #include #include namespace musen { -StringBroadcaster::StringBroadcaster(const int & port) -: BaseBroadcaster(port) +StringBroadcaster::StringBroadcaster(const int & port, std::shared_ptr udp_socket) +: BaseBroadcaster(port, udp_socket) { } diff --git a/src/listener/base_listener.cpp b/src/listener/base_listener.cpp index bd8edad..195a462 100644 --- a/src/listener/base_listener.cpp +++ b/src/listener/base_listener.cpp @@ -24,18 +24,20 @@ #include #include +#include namespace musen { -BaseListener::BaseListener(const int & port) -: port(port) +BaseListener::BaseListener(const int & port, std::shared_ptr udp_socket) +: udp_socket(udp_socket), + port(port) { } bool BaseListener::connect() { - if (!UdpSocket::connect()) { + if (!udp_socket->connect()) { return false; } @@ -50,16 +52,21 @@ bool BaseListener::connect() } // Bind the socket with the recipent address - if (bind(sockfd, (struct sockaddr *)&sa, sizeof(sa)) < 0) { + if (bind(udp_socket->get_sockfd(), (struct sockaddr *)&sa, sizeof(sa)) < 0) { return false; } return true; } +bool BaseListener::disconnect() +{ + return udp_socket->disconnect(); +} + int BaseListener::receive(void * buffer, const int & length) { - if (!is_connected() || length <= 0) { + if (!udp_socket->is_connected() || length <= 0) { return 0; } @@ -67,11 +74,16 @@ int BaseListener::receive(void * buffer, const int & length) socklen_t sa_len = sizeof(sa); // Receive data - int received = recvfrom(sockfd, buffer, length, 0, &sa, &sa_len); + int received = recvfrom(udp_socket->get_sockfd(), buffer, length, 0, &sa, &sa_len); return std::max(received, 0); } +std::shared_ptr BaseListener::get_udp_socket() const +{ + return udp_socket; +} + const int & BaseListener::get_port() const { return port; diff --git a/src/listener/string_listener.cpp b/src/listener/string_listener.cpp index e722b30..d811606 100644 --- a/src/listener/string_listener.cpp +++ b/src/listener/string_listener.cpp @@ -20,14 +20,15 @@ #include +#include #include #include namespace musen { -StringListener::StringListener(const int & port) -: BaseListener(port) +StringListener::StringListener(const int & port, std::shared_ptr udp_socket) +: BaseListener(port, udp_socket) { } diff --git a/src/udp_socket.cpp b/src/udp_socket.cpp index ef4ee2a..7fe43ea 100644 --- a/src/udp_socket.cpp +++ b/src/udp_socket.cpp @@ -46,19 +46,19 @@ bool UdpSocket::connect() // Create a new socket sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (sockfd < 0) { + if (get_sockfd() < 0) { return false; } // Enable broadcast int opt = 1; setsockopt( - sockfd, SOL_SOCKET, SO_BROADCAST, reinterpret_cast(&opt), + get_sockfd(), SOL_SOCKET, SO_BROADCAST, reinterpret_cast(&opt), sizeof(opt)); // Enable non-blocking - int flags = fcntl(sockfd, F_GETFL, 0); - fcntl(sockfd, F_SETFL, flags | O_NONBLOCK); + int flags = fcntl(get_sockfd(), F_GETFL, 0); + fcntl(get_sockfd(), F_SETFL, flags | O_NONBLOCK); return true; } @@ -76,9 +76,14 @@ bool UdpSocket::disconnect() return true; } +const int & UdpSocket::get_sockfd() const +{ + return sockfd; +} + bool UdpSocket::is_connected() const { - return sockfd >= 0; + return get_sockfd() >= 0; } } // namespace musen From 7c3d9842fdf79a07cf6a4e41e5df68fd5c8b9daa Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Tue, 25 May 2021 16:32:14 +0700 Subject: [PATCH 2/7] feat: obtain recipent socked addresses outside send function --- .../musen/broadcaster/base_broadcaster.hpp | 8 +++-- src/broadcaster/base_broadcaster.cpp | 30 ++++++++++++------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/include/musen/broadcaster/base_broadcaster.hpp b/include/musen/broadcaster/base_broadcaster.hpp index fc42e1c..617f47d 100644 --- a/include/musen/broadcaster/base_broadcaster.hpp +++ b/include/musen/broadcaster/base_broadcaster.hpp @@ -51,9 +51,9 @@ class BaseBroadcaster const int & get_port() const; protected: - std::list get_recipent_sas() const; - std::list get_recipent_sas_from_broadcast_ifas() const; - std::list get_recipent_sas_from_target_hosts() const; + std::list obtain_recipent_sas() const; + std::list obtain_recipent_sas_from_broadcast_ifas() const; + std::list obtain_recipent_sas_from_target_hosts() const; std::shared_ptr udp_socket; @@ -61,6 +61,8 @@ class BaseBroadcaster std::list target_hosts; int port; + + std::list recipent_sas; }; } // namespace musen diff --git a/src/broadcaster/base_broadcaster.cpp b/src/broadcaster/base_broadcaster.cpp index 2d93b61..8e248e6 100644 --- a/src/broadcaster/base_broadcaster.cpp +++ b/src/broadcaster/base_broadcaster.cpp @@ -40,7 +40,14 @@ BaseBroadcaster::BaseBroadcaster(const int & port, std::shared_ptr ud bool BaseBroadcaster::connect() { - return udp_socket->connect(); + auto result = udp_socket->connect(); + + if (result) { + // Reobtain recipent socket addresses after connected + recipent_sas = obtain_recipent_sas(); + } + + return result; } bool BaseBroadcaster::disconnect() @@ -54,12 +61,9 @@ int BaseBroadcaster::send(const char * data, const int & length) return 0; } - // Get list of recipent socket addresses - const auto & sas = get_recipent_sas(); - // Sent to each recipent socket addresses int lowest_sent = -1; - for (const auto & sa : sas) { + for (const auto & sa : recipent_sas) { int sent = sendto( udp_socket->get_sockfd(), data, length, 0, (struct sockaddr *)&sa, sizeof(sa)); @@ -76,11 +80,17 @@ int BaseBroadcaster::send(const char * data, const int & length) void BaseBroadcaster::enable_broadcast(const bool & enable) { broadcast = enable; + + // Reobtain recipent socket addresses after broadcast changed + recipent_sas = obtain_recipent_sas(); } void BaseBroadcaster::add_target_host(const std::string & target_host) { target_hosts.push_back(target_host); + + // Reobtain recipent socket addresses after target host changed + recipent_sas = obtain_recipent_sas(); } std::shared_ptr BaseBroadcaster::get_udp_socket() const @@ -93,17 +103,17 @@ const int & BaseBroadcaster::get_port() const return port; } -std::list BaseBroadcaster::get_recipent_sas() const +std::list BaseBroadcaster::obtain_recipent_sas() const { std::list sas; - sas.splice(sas.end(), get_recipent_sas_from_broadcast_ifas()); - sas.splice(sas.end(), get_recipent_sas_from_target_hosts()); + sas.splice(sas.end(), obtain_recipent_sas_from_broadcast_ifas()); + sas.splice(sas.end(), obtain_recipent_sas_from_target_hosts()); return sas; } -std::list BaseBroadcaster::get_recipent_sas_from_broadcast_ifas() const +std::list BaseBroadcaster::obtain_recipent_sas_from_broadcast_ifas() const { std::list sas; @@ -145,7 +155,7 @@ std::list BaseBroadcaster::get_recipent_sas_from_broadcast_i return sas; } -std::list BaseBroadcaster::get_recipent_sas_from_target_hosts() const +std::list BaseBroadcaster::obtain_recipent_sas_from_target_hosts() const { std::list sas; From 319a6d44bcf82531eb0ae177767acad5ea6c84f7 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Tue, 25 May 2021 16:38:05 +0700 Subject: [PATCH 3/7] test: use different action for the build and test workflow --- .github/workflows/build-and-test.yml | 8 ++++---- README.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ec49336..9b60386 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -8,9 +8,9 @@ jobs: build-and-test: runs-on: ubuntu-latest steps: - - name: Checking out + - name: Checkout this repository uses: actions/checkout@v2.3.4 - - name: Building and testing - uses: ichiro-its/ros2-ci@v1.0.0 with: - ros2-distro: foxy + path: musen + - name: Build and test workspace + uses: ichiro-its/ros2-build-and-test-action@main diff --git a/README.md b/README.md index 6935204..63e5680 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ In this package, the broadcast communication will be handled by a Broadcaster ob ### Binary Packages - See [releases](https://github.com/ichiro-its/musen/releases) for the latest version of this package. -- Alternatively, this package is available on [ICHIRO ITS Repository](https://repository.ichiro-its.org/) as a `ros-foxy-musen` package. +- Alternatively, this package also available on [ICHIRO ITS Repository](https://repository.ichiro-its.org/) as a `ros-foxy-musen` package. ### Build From Source From c1b5f82aeeebfebd6ba2f59679d1ba7960475992 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Tue, 25 May 2021 19:44:58 +0700 Subject: [PATCH 4/7] build: add a deploy debian workflow --- .github/workflows/build-and-test.yml | 1 + .github/workflows/deploy-debian.yml | 38 ++++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy-debian.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 9b60386..c7ec95e 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -12,5 +12,6 @@ jobs: uses: actions/checkout@v2.3.4 with: path: musen + - name: Build and test workspace uses: ichiro-its/ros2-build-and-test-action@main diff --git a/.github/workflows/deploy-debian.yml b/.github/workflows/deploy-debian.yml new file mode 100644 index 0000000..ba39afc --- /dev/null +++ b/.github/workflows/deploy-debian.yml @@ -0,0 +1,38 @@ +name: Deploy Debian +on: + pull_request: + branches: [ master ] +jobs: + deploy-debian: + runs-on: ubuntu-latest + steps: + - name: Checkout this repository + uses: actions/checkout@v2.3.4 + with: + path: musen + + - name: Build Debian package + uses: ichiro-its/ros2-build-debian-action@main + + - name: Deploy Debian package to server + uses: appleboy/scp-action@master + with: + host: ${{ secrets.SSH_HOST }} + port: ${{ secrets.SSH_PORT }} + username: ${{ secrets.SSH_USER }} + password: ${{ secrets.SSH_PASS }} + source: "package/*.deb" + target: "~/temp/nightly/musen/" + rm: true + + - name: Prepare Debian package in the server + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SSH_HOST }} + port: ${{ secrets.SSH_PORT }} + username: ${{ secrets.SSH_USER }} + password: ${{ secrets.SSH_PASS }} + script: | + cd ~/repository/debian + reprepro includedeb nightly ~/temp/nightly/musen/package/*.deb + rm -rf ~/temp/nightly/musen/ diff --git a/README.md b/README.md index 63e5680..a532333 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ In this package, the broadcast communication will be handled by a Broadcaster ob ### Binary Packages - See [releases](https://github.com/ichiro-its/musen/releases) for the latest version of this package. -- Alternatively, this package also available on [ICHIRO ITS Repository](https://repository.ichiro-its.org/) as a `ros-foxy-musen` package. +- Alternatively, this package also available on [ICHIRO ITS Repository](https://repository.ichiro-its.org/) as `ros-foxy-musen` package. ### Build From Source From 4ae3c4149be4e8a7cf641be106cf207c3de8adfa Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Tue, 25 May 2021 20:18:27 +0700 Subject: [PATCH 5/7] build: separate the deploy debian worklflow into nightly and stable --- ...y-debian.yml => deploy-debian-nightly.yml} | 14 ++++--- .github/workflows/deploy-debian-stable.yml | 38 +++++++++++++++++++ 2 files changed, 46 insertions(+), 6 deletions(-) rename .github/workflows/{deploy-debian.yml => deploy-debian-nightly.yml} (78%) create mode 100644 .github/workflows/deploy-debian-stable.yml diff --git a/.github/workflows/deploy-debian.yml b/.github/workflows/deploy-debian-nightly.yml similarity index 78% rename from .github/workflows/deploy-debian.yml rename to .github/workflows/deploy-debian-nightly.yml index ba39afc..8d468b8 100644 --- a/.github/workflows/deploy-debian.yml +++ b/.github/workflows/deploy-debian-nightly.yml @@ -1,9 +1,9 @@ -name: Deploy Debian +name: Deploy Debian Nightly on: - pull_request: + push: branches: [ master ] jobs: - deploy-debian: + deploy-debian-nightly: runs-on: ubuntu-latest steps: - name: Checkout this repository @@ -11,10 +11,12 @@ jobs: with: path: musen - - name: Build Debian package + - name: Build nightly Debian package uses: ichiro-its/ros2-build-debian-action@main + with: + unique-version: true - - name: Deploy Debian package to server + - name: Deploy nightly Debian package to server uses: appleboy/scp-action@master with: host: ${{ secrets.SSH_HOST }} @@ -25,7 +27,7 @@ jobs: target: "~/temp/nightly/musen/" rm: true - - name: Prepare Debian package in the server + - name: Prepare nightly Debian package in the server uses: appleboy/ssh-action@master with: host: ${{ secrets.SSH_HOST }} diff --git a/.github/workflows/deploy-debian-stable.yml b/.github/workflows/deploy-debian-stable.yml new file mode 100644 index 0000000..a6c9701 --- /dev/null +++ b/.github/workflows/deploy-debian-stable.yml @@ -0,0 +1,38 @@ +name: Deploy Debian Stable +on: + release: + types: [created] +jobs: + deploy-debian-stable: + runs-on: ubuntu-latest + steps: + - name: Checkout this repository + uses: actions/checkout@v2.3.4 + with: + path: musen + + - name: Build stable Debian package + uses: ichiro-its/ros2-build-debian-action@main + + - name: Deploy stable Debian package to server + uses: appleboy/scp-action@master + with: + host: ${{ secrets.SSH_HOST }} + port: ${{ secrets.SSH_PORT }} + username: ${{ secrets.SSH_USER }} + password: ${{ secrets.SSH_PASS }} + source: "package/*.deb" + target: "~/temp/stable/musen/" + rm: true + + - name: Prepare stable Debian package in the server + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SSH_HOST }} + port: ${{ secrets.SSH_PORT }} + username: ${{ secrets.SSH_USER }} + password: ${{ secrets.SSH_PASS }} + script: | + cd ~/repository/debian + reprepro includedeb stable ~/temp/stable/musen/package/*.deb + rm -rf ~/temp/stable/musen/ From f21d6c8403ab3369b469f0a45934a451ae94bfc6 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Tue, 25 May 2021 20:19:35 +0700 Subject: [PATCH 6/7] build: add manual trigger for workflows --- .github/workflows/build-and-test.yml | 5 +++-- .github/workflows/deploy-debian-nightly.yml | 3 ++- .github/workflows/deploy-debian-stable.yml | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index c7ec95e..71de564 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,9 +1,10 @@ name: Build and Test on: + workflow_dispatch: pull_request: - branches: [ master ] + branches: [master] push: - branches: [ master ] + branches: [master] jobs: build-and-test: runs-on: ubuntu-latest diff --git a/.github/workflows/deploy-debian-nightly.yml b/.github/workflows/deploy-debian-nightly.yml index 8d468b8..b09239d 100644 --- a/.github/workflows/deploy-debian-nightly.yml +++ b/.github/workflows/deploy-debian-nightly.yml @@ -1,7 +1,8 @@ name: Deploy Debian Nightly on: + workflow_dispatch: push: - branches: [ master ] + branches: [master] jobs: deploy-debian-nightly: runs-on: ubuntu-latest diff --git a/.github/workflows/deploy-debian-stable.yml b/.github/workflows/deploy-debian-stable.yml index a6c9701..48e5a4d 100644 --- a/.github/workflows/deploy-debian-stable.yml +++ b/.github/workflows/deploy-debian-stable.yml @@ -1,5 +1,6 @@ name: Deploy Debian Stable on: + workflow_dispatch: release: types: [created] jobs: From 3200f376a69d9d324f19fd913688e14ca9bd6cf4 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Tue, 25 May 2021 20:23:18 +0700 Subject: [PATCH 7/7] docs: update readme badges --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a532333..5936759 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,10 @@ [![latest version](https://img.shields.io/github/v/release/ichiro-its/musen)](https://github.com/ichiro-its/musen/releases/) [![commits since latest version](https://img.shields.io/github/commits-since/ichiro-its/musen/latest)](https://github.com/ichiro-its/musen/commits/master) -[![milestone](https://img.shields.io/github/milestones/progress/ichiro-its/musen/1?label=milestone)](https://github.com/ichiro-its/musen/milestone/2) [![license](https://img.shields.io/github/license/ichiro-its/musen)](./LICENSE) -[![build and test status](https://img.shields.io/github/workflow/status/ichiro-its/musen/Build%20and%20Test?label=build%20and%20test)](https://github.com/ichiro-its/musen/actions) +[![test status](https://img.shields.io/github/workflow/status/ichiro-its/musen/Build%20and%20Test?label=test)](https://github.com/ichiro-its/musen/actions) +[![deploy stable status](https://img.shields.io/github/workflow/status/ichiro-its/musen/Deploy%20Debian%20Stable?label=deploy%20stable)](https://repository.ichiro-its.org/) +[![deploy nightly status](https://img.shields.io/github/workflow/status/ichiro-its/musen/Deploy%20Debian%20Nightly?label=deploy%20nightly)](https://repository.ichiro-its.org/) Musen (無線, wireless) is a [ROS 2](https://docs.ros.org/en/foxy/index.html) package that provides a [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol) broadcast communication library for a ROS 2 project. This package is written in C++ and currently only works on Linux based operating system.