diff --git a/.github/workflows/test-devel.yml b/.github/workflows/test-devel.yml index 01c8812..c70ec18 100644 --- a/.github/workflows/test-devel.yml +++ b/.github/workflows/test-devel.yml @@ -38,6 +38,53 @@ jobs: name: installed-anope path: ~/artefacts-*.tar.gz retention-days: 1 + build-bahamut: + runs-on: ubuntu-latest + steps: + - name: Create directories + run: cd ~/; mkdir -p .local/ go/ + - name: Cache dependencies + uses: actions/cache@v2 + with: + key: 3-${{ runner.os }}-bahamut-devel + path: '~/.cache + + ${ github.workspace }/Bahamut + + ' + - uses: actions/checkout@v2 + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Checkout Bahamut + uses: actions/checkout@v2 + with: + path: Bahamut + ref: master + repository: DALnet/Bahamut + - name: Build Bahamut + run: | + cd $GITHUB_WORKSPACE/Bahamut/ + patch src/s_user.c < $GITHUB_WORKSPACE/bahamut_localhost.patch + libtoolize --force + aclocal + autoheader + automake --force-missing --add-missing || true + autoreconf + ./configure --prefix=$HOME/.local/ + make -j 4 + make install + mkdir -p $HOME/.local/bin/ + cp $HOME/.local/ircd $HOME/.local/bin/ircd + - name: Make artefact tarball + run: cd ~; tar -czf artefacts-bahamut.tar.gz .local/ go/ + - name: Upload build artefacts + uses: actions/upload-artifact@v2 + with: + name: installed-bahamut + path: ~/artefacts-*.tar.gz + retention-days: 1 build-hybrid: runs-on: ubuntu-latest steps: @@ -238,6 +285,9 @@ jobs: if: success() || failure() name: Publish Unit Tests Results needs: + - test-bahamut + - test-bahamut-anope + - test-bahamut-atheme - test-ergo - test-hybrid - test-inspircd @@ -259,6 +309,108 @@ jobs: uses: EnricoMi/publish-unit-test-result-action@v1 with: files: artifacts/**/*.xml + test-bahamut: + needs: + - build-bahamut + 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-bahamut + 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 + bahamut + - if: always() + name: Publish results + uses: actions/upload-artifact@v2 + with: + name: pytest results bahamut (devel) + path: pytest.xml + test-bahamut-anope: + needs: + - build-bahamut + - 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-bahamut + 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 + bahamut-anope + - if: always() + name: Publish results + uses: actions/upload-artifact@v2 + with: + name: pytest results bahamut-anope (devel) + path: pytest.xml + test-bahamut-atheme: + needs: + - build-bahamut + 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-bahamut + 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 + bahamut-atheme + - if: always() + name: Publish results + uses: actions/upload-artifact@v2 + with: + name: pytest results bahamut-atheme (devel) + path: pytest.xml test-ergo: needs: [] runs-on: ubuntu-latest diff --git a/.github/workflows/test-stable.yml b/.github/workflows/test-stable.yml index 31963b8..b83023b 100644 --- a/.github/workflows/test-stable.yml +++ b/.github/workflows/test-stable.yml @@ -38,6 +38,53 @@ jobs: name: installed-anope path: ~/artefacts-*.tar.gz retention-days: 1 + build-bahamut: + runs-on: ubuntu-latest + steps: + - name: Create directories + run: cd ~/; mkdir -p .local/ go/ + - name: Cache dependencies + uses: actions/cache@v2 + with: + key: 3-${{ runner.os }}-bahamut-stable + path: '~/.cache + + ${ github.workspace }/Bahamut + + ' + - uses: actions/checkout@v2 + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Checkout Bahamut + uses: actions/checkout@v2 + with: + path: Bahamut + ref: v2.2.0 + repository: DALnet/Bahamut + - name: Build Bahamut + run: | + cd $GITHUB_WORKSPACE/Bahamut/ + patch src/s_user.c < $GITHUB_WORKSPACE/bahamut_localhost.patch + libtoolize --force + aclocal + autoheader + automake --force-missing --add-missing || true + autoreconf + ./configure --prefix=$HOME/.local/ + make -j 4 + make install + mkdir -p $HOME/.local/bin/ + cp $HOME/.local/ircd $HOME/.local/bin/ircd + - name: Make artefact tarball + run: cd ~; tar -czf artefacts-bahamut.tar.gz .local/ go/ + - name: Upload build artefacts + uses: actions/upload-artifact@v2 + with: + name: installed-bahamut + path: ~/artefacts-*.tar.gz + retention-days: 1 build-charybdis: runs-on: ubuntu-latest steps: @@ -278,6 +325,9 @@ jobs: if: success() || failure() name: Publish Unit Tests Results needs: + - test-bahamut + - test-bahamut-anope + - test-bahamut-atheme - test-charybdis - test-ergo - test-hybrid @@ -301,6 +351,108 @@ jobs: uses: EnricoMi/publish-unit-test-result-action@v1 with: files: artifacts/**/*.xml + test-bahamut: + needs: + - build-bahamut + 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-bahamut + 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 + bahamut + - if: always() + name: Publish results + uses: actions/upload-artifact@v2 + with: + name: pytest results bahamut (stable) + path: pytest.xml + test-bahamut-anope: + needs: + - build-bahamut + - 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-bahamut + 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 + bahamut-anope + - if: always() + name: Publish results + uses: actions/upload-artifact@v2 + with: + name: pytest results bahamut-anope (stable) + path: pytest.xml + test-bahamut-atheme: + needs: + - build-bahamut + 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-bahamut + 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 + bahamut-atheme + - if: always() + name: Publish results + uses: actions/upload-artifact@v2 + with: + name: pytest results bahamut-atheme (stable) + path: pytest.xml test-charybdis: needs: - build-charybdis diff --git a/bahamut_localhost.patch b/bahamut_localhost.patch new file mode 100644 index 0000000..51bb25b --- /dev/null +++ b/bahamut_localhost.patch @@ -0,0 +1,20 @@ +Allows connections from localhost + +diff --git a/src/s_user.c b/src/s_user.c +index 317b00e..adfcfcf 100644 +--- a/src/s_user.c ++++ b/src/s_user.c +@@ -594,13 +594,6 @@ register_user(aClient *cptr, aClient *sptr, char *nick, char *username, + dots = 1; + } + +- if (!dots) +- { +- sendto_realops("Invalid hostname for %s, dumping user %s", +- sptr->hostip, sptr->name); +- return exit_client(cptr, sptr, &me, "Invalid hostname"); +- } +- + if (bad_dns) + { + sendto_one(sptr, ":%s NOTICE %s :*** Notice -- You have a bad " diff --git a/workflows.yml b/workflows.yml index 6bd9443..2883336 100644 --- a/workflows.yml +++ b/workflows.yml @@ -92,6 +92,30 @@ software: ############################# # Other servers: + bahamut: + name: Bahamut + repository: DALnet/Bahamut + refs: + stable: "v2.2.0" + release: null + devel: "master" + devel_release: null + path: Bahamut + separate_build_job: true + build_script: | + cd $GITHUB_WORKSPACE/Bahamut/ + patch src/s_user.c < $GITHUB_WORKSPACE/bahamut_localhost.patch + libtoolize --force + aclocal + autoheader + automake --force-missing --add-missing || true + autoreconf + ./configure --prefix=$HOME/.local/ + make -j 4 + make install + mkdir -p $HOME/.local/bin/ + cp $HOME/.local/ircd $HOME/.local/bin/ircd + ergo: name: Ergo repository: ergochat/ergo @@ -188,6 +212,15 @@ software: devel_release: null tests: + bahamut: + software: [bahamut] + + bahamut-atheme: + software: [bahamut] + + bahamut-anope: + software: [bahamut, anope] + charybdis: software: [charybdis]