mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
This should help us catch portability weirdnesses. [skip alpine ci] [skip macos ci] [skip ubuntu ci] [skip windows ci]
108 lines
3.0 KiB
YAML
108 lines
3.0 KiB
YAML
# 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
|
|
|
|
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 repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run configure
|
|
run: ./configure --development --disable-auto-extras --prefix=$HOME/inspircd
|
|
|
|
# Speed-up build (6 min -> 5 min)
|
|
- name: Precompile inspircd.h
|
|
run: c++ -Ivendor include/inspircd.h
|
|
|
|
- name: Build and install
|
|
env:
|
|
CXXFLAGS: -DINSPIRCD_UNLIMITED_MAINLOOP
|
|
run: make install --jobs $(($(getconf _NPROCESSORS_ONLN) + 1))
|
|
|
|
- name: Make artifact tarball
|
|
run: |-
|
|
cd ~
|
|
tar -czf artifacts-inspircd.tar.gz inspircd
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: installed-inspircd-for-irctest
|
|
path: ~/artifacts-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 artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: installed-inspircd-for-irctest
|
|
path: "~"
|
|
|
|
- name: Unpack artifacts
|
|
run: |-
|
|
cd ~
|
|
find -name 'artifacts-inspircd.tar.gz' -exec tar -xzf '{}' \;
|
|
|
|
- name: Checkout irctest
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: irctest
|
|
ref: 2680502dfe496a597bf8fb3cfc08cd3b6a698b17
|
|
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'
|
|
run: PATH=$HOME/inspircd/bin:$PATH make -C irctest inspircd
|
|
|
|
- name: Checkout Anope
|
|
if: matrix.services == 'anope'
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: anope
|
|
ref: 2.1.10
|
|
repository: anope/anope
|
|
|
|
- name: Build and install Anope
|
|
if: matrix.services == 'anope'
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/anope
|
|
sudo apt-get install ninja-build --no-install-recommends
|
|
mkdir build && cd build
|
|
cmake -DCMAKE_INSTALL_PREFIX=$HOME/anope -DPROGRAM_NAME=anope -GNinja ..
|
|
ninja install
|
|
|
|
- name: Run irctest (Anope services)
|
|
if: matrix.services == 'anope'
|
|
run: PATH=$HOME/anope/bin:$HOME/inspircd/bin:$PATH make -C irctest inspircd-anope
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
services:
|
|
- no services
|
|
- anope
|