-
Notifications
You must be signed in to change notification settings - Fork 4
130 lines (122 loc) · 5.44 KB
/
testing.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
# This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0
# Linting: xclip -sel c <.github/workflows/testing.yml # https://rhysd.github.io/actionlint/
on:
push:
branches: [ 'trunk', 'next', 'wip/**' ]
# tags: [ 'v[0-9]+.[0-9]+.[0-9]+*' ]
pull_request:
branches: [ 'trunk', 'next' ]
jobs:
NobleAssets:
runs-on: ubuntu-latest
container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest', options: --user runner }
steps:
- { uses: actions/[email protected], with: { fetch-depth: 0, submodules: recursive } }
- name: 'Fetch all tags'
run: |
sed 's,[email protected]:,https://github.com/,' -i .git/config ; # fetch without ssh creds
git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290
- name: 'Configure build presets'
run: |
echo -e ' prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk
- name: 'Build Dist Assets'
run: |
make mkassets
- uses: actions/upload-artifact@v4
with: { name: assets, path: assets/ }
- uses: actions/upload-artifact@v4
with: { name: dist-tarball, path: assets/*.tar* }
UploadDocs:
if: ${{ github.repository == 'tim-janik/anklang' && github.ref == 'refs/heads/trunk' }}
runs-on: ubuntu-latest
container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest', options: --user runner }
steps:
- { uses: actions/[email protected], with: { fetch-depth: 0, submodules: recursive } }
- name: 'Fetch all tags'
run: |
sed 's,[email protected]:,https://github.com/,' -i .git/config ; # fetch without ssh creds
git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290
- name: 'Configure build presets'
run: |
echo -e ' prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk
- name: 'Upload API Docs' # http://tim-janik.github.io/docs/anklang
run: |
make -j`nproc` all
(umask 0077 && cat <<< "${{ secrets.SSH_ID_GHDOCS4ANKLANG_ECDSA }}" > .git/.ssh_id_ghdocs4anklang)
(cd / && sudo patch -t -p0) <doc/poxy-0.19.1.diff
doc/poxy.sh -b -u
ArchReplay:
runs-on: ubuntu-latest
container: { image: 'ghcr.io/tim-janik/anklang-ci:arch-latest' }
steps:
- { uses: actions/[email protected], with: { fetch-depth: 0, submodules: recursive } }
- name: 'Fetch all tags'
run: |
sed 's,[email protected]:,https://github.com/,' -i .git/config ; # fetch without ssh creds
git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290
- name: 'Configure build presets'
run: |
echo 'prefix=/' > config-defaults.mk ;# reset any previous config-defaults.mk
- name: 'Build Anklang'
run: |
make GCC_COLORS="" -j`nproc` all
- name: 'Run Tests'
run: |
make -j`nproc` check
- name: 'Run X11 GUI Tests'
run: |
make x11test-v
# Artifact upload from x11test
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with: { name: "x11test", path: "out/x11test/" }
NobleClangTidy:
if: ${{ ! contains(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
container: { image: 'ghcr.io/tim-janik/anklang-ci:noble-latest', options: --user runner }
steps:
- { uses: actions/[email protected], with: { fetch-depth: 0, submodules: recursive } }
- name: 'Fetch all tags'
run: |
sed 's,[email protected]:,https://github.com/,' -i .git/config ; # fetch without ssh creds
git fetch -f --tags && git describe --always --long ; # Fix actions/checkout#290
- name: 'Configure build presets'
run: |
echo -e ' prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk
- run: |
make -j`nproc` all
- run: |
make -j`nproc` check
- name: 'Make clang-tidy'
run: |
make -j`nproc` clang-tidy
# Artifact upload from clang-tidy
- uses: actions/upload-artifact@v4
with: { name: clang-tidy, path: out/clang-tidy/ }
- name: 'Make branch-check'
# Use non-0 exit status for a failing branch-check on PRs
run: |
test -z "${{ github.event.pull_request }}" || BRANCH_CHECK_EXIT=77
make branch-check BRANCH_CHECK_EXIT=$BRANCH_CHECK_EXIT
Ping-IRC:
needs: [NobleAssets, UploadDocs, ArchReplay, NobleClangTidy]
runs-on: ubuntu-latest
steps:
- { uses: actions/[email protected], with: { fetch-depth: 0 } } # Fix actions/checkout#290
- run: git fetch -f --tags && git submodule update --init --recursive && git describe
- name: Check Jobs
run: |
echo '${{ needs.NobleAssets.result }}' '${{ needs.UploadDocs.result }}' '${{ needs.ArchReplay.result }}' '${{ needs.NobleClangTidy.result }}'
[[ ${{ needs.NobleAssets.result }} =~ success|skipped ]]
[[ ${{ needs.UploadDocs.result }} =~ success|skipped ]]
[[ ${{ needs.ArchReplay.result }} =~ success|skipped ]]
[[ ${{ needs.NobleClangTidy.result }} =~ success|skipped ]]
- name: Ping IRC
if: ${{ always() && !env.ACT }}
run: |
R='${{ github.repository }}' && R=${R#*/}
B='${{ github.ref }}' && B=${B#refs/heads/}
S='${{ job.status }}' && URL='${{ github.event.head_commit.url }}'
A='${{ github.actor }}' && B="$(git branch --show-current)"
MSG=$(git log -1 --format='%s')
.github/workflows/ircbot.py -q -j "#Anklang" -R "$R" -U "$A" -D "$B" -S "$S" "$MSG" "$URL"