forked from inspircd/inspircd
-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (110 loc) · 3.69 KB
/
ci-irctest.yml
File metadata and controls
130 lines (110 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# 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@v6
- 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@v6
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@v7
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@v6
with:
path: irctest
ref: 4ee99ede9a0d6e8e88a6d7d98793f57465f9d841
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@v6
with:
path: anope
ref: 2.1.17
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
- name: Checkout Atheme
if: matrix.services == 'atheme'
uses: actions/checkout@v6
with:
path: atheme
ref: master
repository: atheme/atheme
submodules: recursive
- name: Build and install Atheme
if: matrix.services == 'atheme'
run: |-
cd $GITHUB_WORKSPACE/atheme
sudo apt install gettext --assume-yes
./configure --prefix=$HOME/atheme
make
make install
- name: Run irctest (Atheme services)
if: matrix.services == 'atheme'
run: PATH=$HOME/atheme/bin:$HOME/inspircd/bin:$PATH make -C irctest inspircd-atheme
strategy:
fail-fast: false
matrix:
services:
- no services
- anope
- atheme