-
-
Notifications
You must be signed in to change notification settings - Fork 71
73 lines (73 loc) · 2.48 KB
/
check-v3.yml
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
name: Check v3 modules
on:
push:
paths:
- '.github/*'
- '3/*'
pull_request:
paths:
- '.github/*'
- '3/*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
CXXFLAGS: -std=${{ matrix.standard }} -Wno-error=deprecated-declarations
CXX: ${{ matrix.compiler }}
INSPIRCD_DEBUG: 3
INSPIRCD_VERBOSE: 1
steps:
- name: Install dependencies
run: |
sudo apt-get update --assume-yes
sudo apt-get install --assume-yes --no-install-recommends clang g++ git make pkg-config
- name: Checkout InspIRCd@insp3
uses: actions/checkout@v4
with:
repository: 'inspircd/inspircd'
ref: 'insp3'
path: 'inspircd'
- name: Checkout self
uses: actions/checkout@v4
with:
path: 'contrib'
- name: (Pull Request) Set the build target to only the changed modules
if: github.event_name == 'pull_request'
run: |
cd contrib
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
echo INSPIRCD_TARGET=$( \
git diff --name-only origin/${{ github.base_ref }} ${{ github.sha }} | \
for f in `cat`; do if [[ "$f" = "3/"*".cpp" ]]; \
then echo "$(basename $f .cpp) "; fi; done) >> $GITHUB_ENV
- name: (Push/PR Fallback) Set the build target to all of the modules
if: github.event_name == 'push' || env.INSPIRCD_TARGET == ''
run: echo INSPIRCD_TARGET=$(for f in contrib/3/*; do echo "$(basename $f .cpp) "; done) >> $GITHUB_ENV
- name: Symlink the modules
run: |
cd inspircd/src/modules
ln -s ../../../contrib/3/* .
- name: Check for additional dependencies
run: |
cd inspircd
echo PACKAGES=$( \
for f in ../contrib/3/*; do if [[ "$INSPIRCD_TARGET" = *"$(basename $f .cpp)"* ]]; \
then ./tools/directive $f PackageInfo; fi; done) >> $GITHUB_ENV
- name: Install additional dependencies
if: env.PACKAGES != ''
run: sudo apt-get install --assume-yes --no-install-recommends ${{ env.PACKAGES }}
- name: Build the modules
run: |
cd inspircd
./configure --development --disable-auto-extras
make --jobs $(($(getconf _NPROCESSORS_ONLN) + 1))
strategy:
fail-fast: false
matrix:
compiler:
- clang++
- g++
standard:
- gnu++98
- c++14