# This workflow has four tasks:
#
# 1. the first builds inspircd (with some optimizations for irctest), and uploads it
# to a temporary storage
# 2. the other three download the binary we just built, and run it through inspircd,
# with either Anope, Atheme, or runs service-independent tests
name: irctest
env:
ANOPE_REF: 2.1.23
ATHEME_REF: 47fe56b86cbb845a658339c3f2f0fa1b80563c5a # 2026-02-28
IRCTEST_REF: c85b574765d67a0270d9c7b35f37ab57e7f95774 # 2026-04-08
on:
pull_request:
push:
schedule:
- cron: 0 0 * * 0
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip irctest ci]')"
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout InspIRCd
uses: actions/checkout@v6
- name: Run CMake
env:
CXXFLAGS: -DINSPIRCD_UNLIMITED_MAINLOOP
run: |-
cmake -B "build" \
-D "CMAKE_BUILD_TYPE=Release" \
-D "CMAKE_INSTALL_PREFIX=$HOME/inspircd" \
-D "CMAKE_UNITY_BUILD=ON" \
-D "CMAKE_UNITY_BUILD_BATCH_SIZE=0" \
-D "AUTO_ENABLE_EXTRAS=OFF" \
-G "Ninja" \
-Wdeprecated \
-Wdev
- name: Build and install
env:
VERBOSE: ${{ runner.debug }}
run: |-
ninja -C "build" ${{ runner.debug == '1' && '-v' || '' }} install
- name: Make artifact tarball
run: |-
tar --create --gzip --verbose --directory "$HOME" --file "${{ runner.temp }}/inspircd.tar.gz" inspircd
- name: Upload build artifact
uses: actions/upload-artifact@v7
with:
name: installed-inspircd-for-irctest
path: ${{ runner.temp }}/inspircd.tar.gz
retention-days: 1
test:
if: "!contains(github.event.head_commit.message, '[skip irctest ci]')"
runs-on: ubuntu-24.04-arm
env:
IRCTEST_DEBUG_LOGS: "1"
needs:
- build
steps:
- name: Download build artifact
uses: actions/download-artifact@v8
with:
name: installed-inspircd-for-irctest
path: ${{ runner.temp }}
- name: Unpack artifact
run: |-
tar --extract --gzip --verbose --directory "$HOME" --file "${{ runner.temp }}/inspircd.tar.gz"
echo "PATH=$HOME/inspircd/bin:$PATH" >> $GITHUB_ENV
- name: Checkout irctest
uses: actions/checkout@v6
with:
path: irctest
ref: ${{ env.IRCTEST_REF }}
repository: progval/irctest
- name: Install irctest dependencies
run: |-
sudo apt-get install --assume-yes faketime python3-pytest
- name: Run irctest (no services)
if: matrix.services == 'no services'
working-directory: irctest
run:
make inspircd
- name: Checkout Anope
if: matrix.services == 'anope'
uses: actions/checkout@v6
with:
path: anope
ref: ${{ env.ANOPE_REF }}
repository: anope/anope
- name: Build and install Anope
if: matrix.services == 'anope'
working-directory: anope
run: |-
sudo apt-get install ninja-build --no-install-recommends
cmake -B build -D CMAKE_INSTALL_PREFIX="$HOME/anope" -G Ninja
ninja -C build install
echo "PATH=$HOME/anope/bin:$PATH" >> $GITHUB_ENV
- name: Run irctest (Anope services)
if: matrix.services == 'anope'
working-directory: irctest
run:
make inspircd-anope
- name: Checkout Atheme
if: matrix.services == 'atheme'
uses: actions/checkout@v6
with:
path: atheme
ref: ${{ env.ATHEME_REF }}
repository: atheme/atheme
submodules: recursive
- name: Build and install Atheme
if: matrix.services == 'atheme'
working-directory: atheme
run: |-
sudo apt-get install gettext --assume-yes
./configure --prefix "$HOME/atheme"
make
make install
echo "PATH=$HOME/atheme/bin:$PATH" >> $GITHUB_ENV
- name: Run irctest (Atheme services)
if: matrix.services == 'atheme'
working-directory: irctest
run:
make inspircd-atheme
strategy:
fail-fast: false
matrix:
services:
- no services
- anope
# - atheme