Add Plexus4 (#90)

This commit is contained in:
Val Lorentz 2021-08-08 20:46:33 +02:00 committed by GitHub
parent 93a989b746
commit ec386a1fc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 280 additions and 2 deletions

View File

@ -97,6 +97,46 @@ jobs:
name: installed-inspircd
path: ~/artefacts-*.tar.gz
retention-days: 1
build-plexus4:
runs-on: ubuntu-latest
steps:
- name: Create directories
run: cd ~/; mkdir -p .local/ go/
- name: Cache dependencies
uses: actions/cache@v2
with:
key: ${{ runner.os }}-plexus4-devel
path: |-
~/.cache
$GITHUB_WORKSPACE/placeholder
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: clone
run: 'curl https://gitlab.com/rizon/plexus4/-/archive/master/plexus4-master.tar.gz
| tar -zx
mv plexus4* plexus4'
- name: build
run: 'cd $GITHUB_WORKSPACE/plexus4
./autogen.sh
./configure --prefix=$HOME/.local/
make -j 4
make install'
- name: Make artefact tarball
run: cd ~; tar -czf artefacts-plexus4.tar.gz .local/ go/
- name: Upload build artefacts
uses: actions/upload-artifact@v2
with:
name: installed-plexus4
path: ~/artefacts-*.tar.gz
retention-days: 1
build-solanum:
runs-on: ubuntu-latest
steps:
@ -186,6 +226,7 @@ jobs:
- test-inspircd
- test-inspircd-anope
- test-limnoria
- test-plexus4
- test-solanum
- test-sopel
- test-unrealircd
@ -368,6 +409,44 @@ jobs:
with:
name: pytest results limnoria (devel)
path: pytest.xml
test-plexus4:
needs:
- build-plexus4
- build-anope
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Download build artefacts
uses: actions/download-artifact@v2
with:
name: installed-plexus4
path: '~'
- name: Download build artefacts
uses: actions/download-artifact@v2
with:
name: installed-anope
path: '~'
- name: Unpack artefacts
run: cd ~; find -name 'artefacts-*.tar.gz' -exec tar -xzf '{}' \;
- name: Install Atheme
run: sudo apt-get install atheme-services
- name: Install irctest dependencies
run: |-
python -m pip install --upgrade pip
pip install pytest -r requirements.txt
- name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml' PATH=$HOME/.local/bin:$PATH make
plexus4
- if: always()
name: Publish results
uses: actions/upload-artifact@v2
with:
name: pytest results plexus4 (devel)
path: pytest.xml
test-solanum:
needs:
- build-solanum

View File

@ -135,6 +135,46 @@ jobs:
name: installed-inspircd
path: ~/artefacts-*.tar.gz
retention-days: 1
build-plexus4:
runs-on: ubuntu-latest
steps:
- name: Create directories
run: cd ~/; mkdir -p .local/ go/
- name: Cache dependencies
uses: actions/cache@v2
with:
key: ${{ runner.os }}-plexus4-stable
path: |-
~/.cache
$GITHUB_WORKSPACE/placeholder
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: clone
run: 'curl https://gitlab.com/rizon/plexus4/-/archive/20200510_0-610/plexus4-20200510_0-610.tar.gz
| tar -zx
mv plexus4* plexus4'
- name: build
run: 'cd $GITHUB_WORKSPACE/plexus4
./autogen.sh
./configure --prefix=$HOME/.local/
make -j 4
make install'
- name: Make artefact tarball
run: cd ~; tar -czf artefacts-plexus4.tar.gz .local/ go/
- name: Upload build artefacts
uses: actions/upload-artifact@v2
with:
name: installed-plexus4
path: ~/artefacts-*.tar.gz
retention-days: 1
build-solanum:
runs-on: ubuntu-latest
steps:
@ -226,6 +266,7 @@ jobs:
- test-inspircd-anope
- test-inspircd-atheme
- test-limnoria
- test-plexus4
- test-solanum
- test-sopel
- test-unrealircd
@ -472,6 +513,44 @@ jobs:
with:
name: pytest results limnoria (stable)
path: pytest.xml
test-plexus4:
needs:
- build-plexus4
- build-anope
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Download build artefacts
uses: actions/download-artifact@v2
with:
name: installed-plexus4
path: '~'
- name: Download build artefacts
uses: actions/download-artifact@v2
with:
name: installed-anope
path: '~'
- name: Unpack artefacts
run: cd ~; find -name 'artefacts-*.tar.gz' -exec tar -xzf '{}' \;
- name: Install Atheme
run: sudo apt-get install atheme-services
- name: Install irctest dependencies
run: |-
python -m pip install --upgrade pip
pip install pytest -r requirements.txt
- name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml' PATH=$HOME/.local/bin:$PATH make
plexus4
- if: always()
name: Publish results
uses: actions/upload-artifact@v2
with:
name: pytest results plexus4 (stable)
path: pytest.xml
test-solanum:
needs:
- build-solanum

View File

@ -147,6 +147,12 @@ mammon:
--controller=irctest.controllers.mammon \
-k '$(MAMMON_SELECTORS)'
plexus4:
$(PYTEST) $(PYTEST_ARGS) \
--controller irctest.controllers.plexus4 \
-m 'not services' \
-k "$(HYBRID_SELECTORS)"
solanum:
$(PYTEST) $(PYTEST_ARGS) \
--controller=irctest.controllers.solanum \

View File

@ -76,7 +76,7 @@ class AnopeController(BaseServicesController, DirectoryBasedController):
def run(self, protocol: str, server_hostname: str, server_port: int) -> None:
self.create_config()
assert protocol in ("inspircd3", "charybdis", "hybrid", "unreal4")
assert protocol in ("inspircd3", "charybdis", "hybrid", "plexus", "unreal4")
with self.open_file("conf/services.conf") as fd:
fd.write(

View File

@ -93,5 +93,5 @@ class BaseHybridController(BaseServerController, DirectoryBasedController):
self.services_controller.run(
protocol=self.services_protocol,
server_hostname=hostname,
server_port=port,
server_port=services_port,
)

View File

@ -25,6 +25,7 @@ listen {{
host = "{hostname}";
port = {port};
port = {services_port};
}};
auth {{

View File

@ -30,6 +30,7 @@ listen {{
host = "{hostname}";
port = {port};
port = {services_port};
}};
class {{

View File

@ -0,0 +1,77 @@
from typing import Set, Type
from .base_hybrid import BaseHybridController
TEMPLATE_CONFIG = """
serverinfo {{
name = "My.Little.Server";
sid = "42X";
description = "test server";
# Hybrid defaults to 9
max_nick_length = 20;
{ssl_config}
}};
general {{
throttle_count = 100; # We need to connect lots of clients quickly
sasl_service = "SaslServ";
# Allow connections quickly
throttle_num = 100;
# Allow PART/QUIT reasons quickly
anti_spam_exit_message_time = 0;
# Allow all commands quickly
pace_wait_simple = 0;
pace_wait = 0;
}};
listen {{
defer_accept = yes;
host = "{hostname}";
port = {port};
flags = server;
port = {services_port};
}};
class {{
name = "server";
ping_time = 5 minutes;
connectfreq = 5 minutes;
}};
connect {{
name = "services.example.org";
host = "localhost"; # Used to validate incoming connection
port = 0; # We don't need servers to connect to services
send_password = "password";
accept_password = "password";
class = "server";
}};
service {{
name = "services.example.org";
}};
auth {{
user = "*";
flags = exceed_limit;
{password_field}
}};
"""
class Plexus4Controller(BaseHybridController):
software_name = "Hybrid"
binary_name = "ircd"
services_protocol = "plexus"
supported_sasl_mechanisms: Set[str] = set()
template_config = TEMPLATE_CONFIG
def get_irctest_controller_class() -> Type[Plexus4Controller]:
return Plexus4Controller

View File

@ -39,6 +39,38 @@ software:
make -j 4
make install
plexus4:
name: Plexus4
path: plexus4
separate_build_job: true
install_steps:
stable:
- name: clone
run: |-
curl https://gitlab.com/rizon/plexus4/-/archive/20200510_0-610/plexus4-20200510_0-610.tar.gz | tar -zx
mv plexus4* plexus4
- name: build
run: |-
cd $GITHUB_WORKSPACE/plexus4
./autogen.sh
./configure --prefix=$HOME/.local/
make -j 4
make install
release: null
devel:
- name: clone
run: |-
curl https://gitlab.com/rizon/plexus4/-/archive/master/plexus4-master.tar.gz | tar -zx
mv plexus4* plexus4
- name: build
run: |-
cd $GITHUB_WORKSPACE/plexus4
./autogen.sh
./configure --prefix=$HOME/.local/
make -j 4
make install
devel_release: null
solanum:
name: Solanum
repository: solanum-ircd/solanum
@ -178,6 +210,9 @@ tests:
inspircd-anope:
software: [inspircd, anope]
plexus4:
software: [plexus4, anope]
unrealircd:
software: [unrealircd]