Skip to content

Commit

Permalink
Reuse notmuch build workflow from other file
Browse files Browse the repository at this point in the history
  • Loading branch information
lucc committed Jun 6, 2023
1 parent 48f1eba commit d2e1d96
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 30 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/notmuch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ jobs:
compile:
runs-on: ubuntu-latest
steps:
# dependencies for notmuch
- name: Install some system packages for the notmuch bild
- name: Install some system packages for the notmuch build
run: |
sudo apt update &&
sudo apt install -y python3-pip libxapian-dev libgmime-3.0-dev libtalloc-dev
Expand All @@ -26,6 +25,3 @@ jobs:
--without-zsh-completion
make -j3 -l2
sudo make install
# Install the python bindings.
cd bindings/python-cffi
pip install .
38 changes: 13 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,35 @@ on:
- pull_request

jobs:

compile-notmuch:
uses: ./.github/workflows/notmuch.yml

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies for the gpg python package
run: >
sudo apt update &&
sudo apt install -y
libgpgme-dev
- name: Install some system packages for the notmuch bild
run: |
sudo apt update &&
sudo apt install -y python3-pip libxapian-dev libgmime-3.0-dev libtalloc-dev
- name: clone the notmuch repository
run: git clone --depth 1 git://notmuchmail.org/git/notmuch notmuch
- name: build the notmuch bindings
run: sudo apt update && sudo apt install -y libgpgme-dev

- name: Install notmuch python bindings
run: |
set -e
cd notmuch
# Make and install the library.
./configure --without-bash-completion \
--without-api-docs \
--without-emacs \
--without-desktop \
--without-ruby \
--without-zsh-completion
make -j3 -l2
sudo make install
# Install the python bindings.
cd bindings/python-cffi
cd notmuch/bindings/python-cffi
pip install .
- uses: actions/checkout@v3
- name: Install dependencies
run: pip install .

- name: Run tests
run: python3 setup.py test

0 comments on commit d2e1d96

Please sign in to comment.