-
Notifications
You must be signed in to change notification settings - Fork 10
116 lines (105 loc) · 3.94 KB
/
ci.yaml
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
# Simple workflow to build the package, execute unit tests & test the tarball. Runs:
#
# - on demand
# - on push
# - on PR (open, edit or re-open)
# - nightly at 01:35 UTC
name: elfeed-score Continuous Integration
on:
workflow_dispatch:
# Per
# <https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request>:
# "if no activity types are specified, the workflow runs when a pull
# request is opened or reopened or when the head branch of the pull
# request is updated." That said, I've had difficulty getting workflows to trigger on PRs.
pull_request:
types: [opened, edited, reopened] # don't say `synchronize`-- that is taken care of by `push`
push:
schedule:
- cron: '35 01 * * *'
jobs:
# These all seem to run in `/home/runner/work/elfeed-score/elfeed-score`
lint_and_test:
name: Lint & Test
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install tooling
shell: bash
run: |
set -ex
pwd
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y autoconf automake texlive emacs
echo "EMACSLOADPATH=$(pwd):$(pwd)/elfeed:$(pwd)/elfeed/tests:$(ls -d /usr/share/emacs/2*)/lisp" >> $GITHUB_ENV
echo "Will now use the emacs at $(type -p emacs): $(emacs --version|head -n1)"
git clone https://github.com/skeeto/elfeed.git
- name: Install least version of Emacs supported by elfeed-score
if: matrix.os == 'ubuntu-20.04'
shell: bash
run: |
set -ex
pwd
pushd /tmp
curl -LO http://mirrors.ocf.berkeley.edu/gnu/emacs/emacs-26.1.tar.gz
tar xf emacs-26.1.tar.gz && cd emacs-26.1
./configure --prefix=/usr/local --with-x-toolkit=no --with-xpm=no --with-gif=no -with-gnutls=no
make
sudo make install
popd
hash -r
ls /usr/local/share
echo "EMACSLOADPATH=$(pwd):$(pwd)/elfeed:$(pwd)/elfeed/tests:$(ls -d /usr/local/share/emacs/26.1)/lisp" >> $GITHUB_ENV
echo "Will now use the emacs at $(type -p emacs): $(emacs --version|head -n1)"
- name: Install a modern version of automake
shell: bash
run: |
set -ex
cd /tmp
curl -L -O https://ftp.gnu.org/gnu/automake/automake-1.16.4.tar.xz
tar -xf automake-1.16.4.tar.xz
cd automake-1.16.4
./configure && make
sudo make install
hash -r
echo "Will now use the automake at $(type -p automake): $(automake --version|head -n1)"
- name: Get the current version number from configure.ac
run: |
set -ex
export version=`awk '/^AC_INIT/ {print substr($2, 2, length($2)-3)}' configure.ac`
echo "ELFEED_SCORE_VERSION=${version}" >> $GITHUB_ENV
echo "version is ${{ env.ELFEED_SCORE_VERSION }}"
- name: Configure & make
shell: bash
run: |
set -ex
export EMACSLOADPATH=${{ env.EMACSLOADPATH }}
./bootstrap
./configure
make
- name: Run the unit tests
shell: bash
run: |
set -x
export EMACSLOADPATH=${{ env.EMACSLOADPATH }}
make check || cat test/test-suite.log
- name: Check the Autotools distribution
shell: bash
run: |
set -x
pwd
export EMACSLOADPATH=${{ env.EMACSLOADPATH }}
if ! make distcheck; then
cand_build="elfeed-score-${{ env.ELFEED_SCORE_VERSION }}/_build/sub/test/test-suite.log"
cand_inst="elfeed-score-${{ env.ELFEED_SCORE_VERSION }}/_inst/sub/test/test-suite.log"
if -f ${cand_build}; then
cat ${cand_build}
elif -f ${cand_inst}; then
cat {$cand_inst}
fi
fi