forked from neomutt/neomutt
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (70 loc) · 2.13 KB
/
build-and-test.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
name: Build and Test
on:
pull_request:
push:
branches:
- 'main'
- 'devel/**'
workflow_dispatch:
jobs:
build:
if: github.event.pull_request.draft == false
name: Build-${{ matrix.cfg.name }}
runs-on: ubuntu-latest
container: ghcr.io/neomutt/ubuntu
strategy:
# Limit jobs to one at a time so that ccache really helps later builds
max-parallel: 1
matrix:
cfg:
- name: default
options:
- name: disabled
options: --disable-nls --disable-pgp --disable-smime --ssl --gsasl
- name: everything
options: --autocrypt --bdb --fmemopen --gdbm --gnutls --gpgme --gss --kyotocabinet --lmdb --lua --lz4 --mixmaster --notmuch --pcre2 --qdbm --rocksdb --sasl --tdb --testing --tokyocabinet --with-lock=fcntl --zlib --zstd
steps:
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Checkout Code
uses: actions/checkout@v4
- name: Checkout Test Files
uses: actions/checkout@v4
with:
repository: neomutt/neomutt-test-files
path: test-files
- name: Set Up Test Files
run: |
cd test-files
./setup.sh
- name: Compilation Cache
uses: hendrikmuhs/ccache-action@v1
- name: Configure Neomutt
run: |
mkdir build-${{ matrix.cfg.name }}
cd build-${{ matrix.cfg.name }}
../configure --full-doc ${{ matrix.cfg.options }}
- name: Build Neomutt
run: |
cd build-${{ matrix.cfg.name }}
make -j ${{steps.cpu-cores.outputs.count}} neomutt
- name: Neomutt Version
run: |
cd build-${{ matrix.cfg.name }}
./neomutt -v
- name: Test Docs
run: |
cd build-${{ matrix.cfg.name }}
pwd
ls -C
make validate-docs
- name: Build Tests
run: |
cd build-${{ matrix.cfg.name }}
make -j ${{steps.cpu-cores.outputs.count}} test/neomutt-test
- name: Run Tests
run: |
cd build-${{ matrix.cfg.name }}
export NEOMUTT_TEST_DIR=$GITHUB_WORKSPACE/test-files
make test