mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 00:15:15 +08:00
Update CI.
This commit is contained in:
@@ -16,11 +16,18 @@ jobs:
|
||||
uses: actions/setup-dotnet@v1.7.2
|
||||
with:
|
||||
dotnet-version: ${{ matrix.dotnet-version }}
|
||||
- name: Install dependencies
|
||||
run: dotnet restore MQTTnet.sln
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore MQTTnet.sln
|
||||
- name: Test MQTTnet
|
||||
run: dotnet test --no-restore --verbosity normal Tests\MQTTnet.Core.Tests\MQTTnet.Tests.csproj
|
||||
- name: Test AspNetCore
|
||||
run: dotnet test --no-restore --verbosity normal Tests\MQTTnet.AspNetCore.Tests\MQTTnet.AspNetCore.Tests.csproj
|
||||
shell: pwsh
|
||||
run: |
|
||||
.\Build\build.ps1 1.2.3 4.5.6-rc1
|
||||
|
||||
|
||||
# - name: Install dependencies
|
||||
# run: dotnet restore MQTTnet.sln
|
||||
# - name: Build
|
||||
# run: dotnet build --configuration Release --no-restore MQTTnet.sln
|
||||
# - name: Test MQTTnet
|
||||
# run: dotnet test --no-restore --verbosity normal Tests\MQTTnet.Core.Tests\MQTTnet.Tests.csproj
|
||||
# - name: Test AspNetCore
|
||||
# run: dotnet test --no-restore --verbosity normal Tests\MQTTnet.AspNetCore.Tests\MQTTnet.AspNetCore.Tests.csproj
|
||||
@@ -1,10 +0,0 @@
|
||||
Package: mqttnet-server
|
||||
Version: VERSIONPLACEHOLDER
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: libssl1.1
|
||||
Suggests:
|
||||
Maintainer: Damian Wolgast <packages@asymetrixs.net>
|
||||
Description:
|
||||
MQTTnet Server is a standalone cross platform MQTT server (like mosquitto) basing on this library.
|
||||
@@ -1,26 +0,0 @@
|
||||
The source of MQTTnet is at:
|
||||
https://github.com/chkr1011/MQTTnet
|
||||
Project is maintained by Christian Kratky
|
||||
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Damian Wolgast
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if user exits
|
||||
USER=mqttnetsrv
|
||||
USEREXISTS=$(id -u $USER >/dev/null 2>&1; echo $?)
|
||||
EC=0
|
||||
BASEPATH=/opt
|
||||
INSTALLPATH=$BASEPATH/MQTTnetServer
|
||||
|
||||
# If user does not exist, create it
|
||||
if (( $USEREXISTS == 1 )); then
|
||||
useradd -d $INSTALLPATH -r $USER
|
||||
EC=$(echo $?)
|
||||
|
||||
if (( $EC == 1 )); then
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set permissions on files
|
||||
chown -R root:root $INSTALLPATH
|
||||
|
||||
# Check if config does not exist and create it
|
||||
if [ ! -f "$INSTALLPATH/appsettings.json" ]; then
|
||||
cp $INSTALLPATH/appsettings.template.json $INSTALLPATH/appsettings.json
|
||||
fi
|
||||
|
||||
|
||||
# Check if setcap exists, does not exist in docker containers
|
||||
SCAP=$(which setcap >/dev/null; echo $?)
|
||||
if [ "$SCAP" -eq "0" ]; then
|
||||
# Enable MQTTServer.NET to bind to IP interface
|
||||
setcap CAP_NET_BIND_SERVICE=+eip $INSTALLPATH/MQTTnet.Server
|
||||
fi
|
||||
|
||||
chmod 644 /etc/systemd/system/mqttnet-server.service
|
||||
|
||||
# Check if systemctl exists, does not exist in docker containers
|
||||
SCTL=$(which systemctl >/dev/null; echo $?)
|
||||
|
||||
if [ "$SCTL" -eq "0" ]; then
|
||||
# Reload systemd because of new service file
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if systemctl exists, does not exist in docker containers
|
||||
SCTL=$(which systemctl >/dev/null; echo $?)
|
||||
if [ "$SCTL" -eq "0" ]; then
|
||||
# Reload systemd because of new service file
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
BASEPATH=/opt
|
||||
INSTALLPATH=$BASEPATH/MQTTnetServer
|
||||
|
||||
# Check if systemctl exists, does not exist in docker containers
|
||||
SCTL=$(which systemctl >/dev/null; echo $?)
|
||||
if [ "$SCTL" -eq "0" ]; then
|
||||
# Stop service before uninstalling
|
||||
systemctl stop mqttnet-server
|
||||
fi
|
||||
|
||||
# Check if setcap exists, does not exist in docker containers
|
||||
SCAP=$(which setcap >/dev/null; echo $?)
|
||||
if [ "$SCAP" -eq "0" ]; then
|
||||
# Remove permission to open ports
|
||||
setcap CAP_NET_BIND_SERVICE=-eip $INSTALLPATH/MQTTnet.Server
|
||||
fi
|
||||
@@ -1,14 +0,0 @@
|
||||
[Unit]
|
||||
Description=MQTTnetServer
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/MQTTnetServer/MQTTnet.Server
|
||||
WorkingDirectory=/opt/MQTTnetServer
|
||||
StandardOutput=inherit
|
||||
StandardError=inherit
|
||||
Restart=always
|
||||
User=mqttnetsrv
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user