55 push :
66
77env :
8- PREFIX : " ${{ github.workspace }}/../venv"
9- LIBGIT2_VERSION : 1.1.0
8+ LIBGIT2 : " ${{ github.workspace }}/ci/install"
109
1110jobs :
1211 build :
@@ -16,36 +15,20 @@ jobs:
1615 python-version : [3.6, 3.7, 3.8, 3.9, pypy3]
1716
1817 steps :
19- - name : Build libssh2
20- run : |
21- wget https://www.libssh2.org/download/libssh2-1.9.0.tar.gz
22- tar xf libssh2-1.9.0.tar.gz
23- cd libssh2-1.9.0
24- ./configure --prefix=$PREFIX --disable-static
25- make
26- make install
27-
28- - name : Build libgit2
29- env :
30- CMAKE_PREFIX_PATH : " ${{ env.PREFIX }}"
18+ - name : Checkout pygit2
19+ uses : actions/checkout@v2
20+
21+ - name : Build libraries
22+ working-directory : ci
3123 run : |
32- wget https://github.com/libgit2/libgit2/releases/download/v$LIBGIT2_VERSION/libgit2-$LIBGIT2_VERSION.tar.gz
33- tar xf libgit2-$LIBGIT2_VERSION.tar.gz
34- cd libgit2-$LIBGIT2_VERSION
35- cmake . -DBUILD_CLAR=OFF -DCMAKE_INSTALL_PREFIX=$PREFIX
36- cmake --build . --target install
24+ /bin/sh build.sh
3725
3826 - name : Set up Python
3927 uses : actions/setup-python@v2
4028 with :
4129 python-version : ${{ matrix.python-version }}
4230
43- - name : Checkout pygit2
44- uses : actions/checkout@v2
45-
4631 - name : Build pygit2
47- env :
48- LIBGIT2 : " ${{ env.PREFIX }}"
4932 run : |
5033 python setup.py egg_info
5134 pip install -r pygit2.egg-info/requires.txt
5437
5538 - name : Test
5639 env :
57- LD_LIBRARY_PATH : " ${{ env.PREFIX }}/lib:$LD_LIBRARY_PATH"
40+ LD_LIBRARY_PATH : " ${{ env.LIBGIT2 }}/lib:$LD_LIBRARY_PATH"
5841 run : |
5942 pytest
0 commit comments