-
Notifications
You must be signed in to change notification settings - Fork 9
140 lines (132 loc) · 4.48 KB
/
timbl.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
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
131
132
133
134
135
136
137
138
139
140
name: C/C++ CI
on:
push:
branches: [master, valueclass]
paths:
- 'src/**'
- 'include/**'
- '.github/workflows/**'
pull_request:
branches: [master]
jobs:
notification:
runs-on: ubuntu-latest
name: Notify start to irc-gitlama
outputs:
branch: ${{ steps.extract_branch.outputs.branch }}
steps:
- name: Extract Branch name
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: extract_branch
- name: IRC notification
uses: Gottox/irc-message-action@v2
with:
server: irc.uvt.nl
channel: '#gitlama'
nickname: GitHub
message: >
${{ github.actor }} started a build of
${{ github.event.repository.name }}
[${{ steps.extract_branch.outputs.branch }}]
"${{ github.event.head_commit.message }}"
build:
runs-on: ${{ matrix.os }}
needs: notification
strategy:
matrix:
os: [ubuntu-latest, macos-14, macos-latest]
compiler: [g++-12, clang++]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/[email protected]
- name: Install Build Environment
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install pkg-config autoconf-archive
else
brew upgrade
brew install autoconf-archive
brew install libtool
brew install automake
fi
- name: Install Dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install libicu-dev libxml2-dev libbz2-dev
sudo apt-get install zlib1g-dev cppcheck
else
brew install libxml2
brew install bzip2
brew install zlib
brew install cppcheck
fi
- name: Configure CppCheck
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
cpc_opts="--enable=warning,style --inline-suppr --force -I include -I /usr/local/include --quiet --error-exitcode=0"
else
cpc_opts="--enable=warning,style --inline-suppr --force -I include --check-level=exhaustive --quiet --error-exitcode=0"
fi
echo "cpc_opts=$cpc_opts" >> $GITHUB_ENV
- name: install TiccUtils
env:
CXX: ${{ matrix.compiler }}
run: |
git clone https://github.com/LanguageMachines/ticcutils;
cd ticcutils;
bash bootstrap.sh;
./configure;
make;
sudo make install;
cd ..;
- name: bootstrap
run: sh bootstrap.sh
- name: configure
env:
CXX: ${{ matrix.compiler }}
run: ./configure
- name: compiler-id
id: compiler
run: |
id=$(echo ${{matrix.compiler}} | cut -d\+ -f1)
echo "id=$id" >> $GITHUB_ENV
- name: Static Code-check
run: cppcheck ${{ env.cpc_opts }} .
- name: make
run: make
continue-on-error: true
- name: install
id: install
if: ${{ steps.make.outcome == 'success' }}
run: sudo make install
continue-on-error: true
- name: make check
id: check
if: ${{ steps.install.outcome == 'success' }}
env:
CXX: ${{ matrix.compiler }}
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib make check
continue-on-error: true
- name: show log
if: ${{ steps.check.outcome != 'success' }}
run: cat src/test-suite.log
- name: Notify IRC of failure
if: ${{ failure() }}
uses: Gottox/irc-message-action@v2
with:
server: irc.uvt.nl
channel: '#gitlama'
nickname: GH-${{ runner.os }}-${{ env.id }}
message: "timbl [${{ needs.notification.outputs.branch }}] build with ${{ matrix.compiler }} by ${{ github.actor }} on ${{ matrix.os }}: \u00034FAIL\u0003"
- name: Notify IRC of succes
if: ${{ success() }}
uses: Gottox/irc-message-action@v2
with:
server: irc.uvt.nl
channel: '#gitlama'
nickname: GH-${{ runner.os }}-${{ env.id }}
message: "timbl [${{ needs.notification.outputs.branch }}] build with ${{ matrix.compiler }} by ${{ github.actor }} on ${{ matrix.os }}: \u00033SUCCESS\u0003"