55 branches :
66 - master
77
8+ env :
9+ LIBGIT2_VERSION : 1.1.0
10+ MACOSX_DEPLOYMENT_TARGET : " 10.9"
11+
812jobs :
913 build :
10- name : py-${{ matrix.py.ver }} libgit2-${{ matrix.libgit2}}
14+ name : py-${{ matrix.py.ver }}
1115 runs-on : macos-latest
1216 strategy :
1317 fail-fast : false
@@ -22,105 +26,41 @@ jobs:
2226 release : ' 3.8.7'
2327 - ver : ' 3.9'
2428 release : ' 3.9.1'
25- env :
26- HOMEBREW_CACHE : ${{ github.workspace }}/.cache/brew
27- CCACHE_DIR : ${{ github.workspace }}/.cache/ccache
28- CCACHE_COMPRESS : 1
29- PIP_CACHE_DIR : ${{ github.workspace }}/.cache/pip
30- MACOSX_DEPLOYMENT_TARGET : " 10.9"
3129 steps :
32- - name : checkout pygit2
33- uses : actions/checkout@v2
34- with :
35- path : pygit2
36-
37- - name : checkout libgit2
30+ - name : Checkout pygit2
3831 uses : actions/checkout@v2
39- with :
40- repository : libgit2/libgit2
41- path : libgit2
42- ref : ${{ matrix.libgit2 }}
43-
44- - id : cache
45- uses : actions/cache@v1.1.0
46- with :
47- path : .cache
48- key : cache-libgit2.${{ matrix.libgit2 }}-py.${{ matrix.py.release }}
49- restore-keys : |
50- cache-
5132
52- - name : setup python
33+ - name : Setup python
5334 run : |
54- mkdir -p .cache/python/ .cache/pip/
5535 PKG="python-${{ matrix.py.release }}-macosx10.9.pkg"
5636 URL="https://www.python.org/ftp/python/${{ matrix.py.release }}/$PKG"
57- wget --no-verbose -P .cache/python - N "$URL"
58- sudo installer -pkg ".cache/python/ $PKG" -target /
37+ wget --no-verbose -N "$URL"
38+ sudo installer -pkg $PKG -target /
5939 export PATH=/Library/Frameworks/Python.framework/Versions/${{ matrix.py.ver }}/bin:$PATH
6040 echo "/Library/Frameworks/Python.framework/Versions/${{ matrix.py.ver }}/bin" >> $GITHUB_PATH
6141 which python3
6242 python3 -VV
6343 test "$(python3 -V)" = "Python ${{ matrix.py.release }}"
6444
65- - name : setup
45+ - name : Build
6646 run : |
67- mkdir -p .cache/brew/ .cache/ccache/
68- brew install ccache
69- python3 -m venv venv/
70- export PATH="${{ github.workspace }}/venv/bin:/usr/local/opt/ccache/libexec:$PATH"
71- echo "/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
72- echo "${{ github.workspace }}/venv/bin" >> $GITHUB_PATH
73- venv/bin/pip3 install delocate pytest
74-
75- - name : build libgit2
76- id : libgit2
77- working-directory : libgit2
78- env :
79- PKG_CONFIG_PATH : /dev/null
80- run : |
81- mkdir env/
82- cmake . \
83- -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/libgit2/env \
84- -DBUILD_EXAMPLES=NO \
85- -DBUILD_CLAR=NO \
86- -DUSE_SSH=NO
87- cmake --build . --target install
88- otool -L "${{ github.workspace }}/libgit2/env/lib/libgit2.dylib"
89- VERSION=$(PKG_CONFIG_PATH=$(pwd) pkg-config --modversion libgit2)
90- echo "::set-output name=version::$VERSION"
91-
92- - name : build pygit2
93- id : pygit2
94- working-directory : pygit2
95- env :
96- LIBGIT2 : " ${{ github.workspace }}/libgit2/env"
97- LDFLAGS : " -Wl,-rpath,'${{ github.workspace }}/libgit2/env/lib'"
98- run : |
99- python3 setup.py bdist_wheel
47+ /bin/sh build.sh wheel
48+ pip3 install delocate
10049 delocate-listdeps dist/pygit2-*macosx*.whl
10150 delocate-wheel -v -w dist/fixed-wheels/ dist/pygit2-*macosx*.whl
10251 WHEEL=$(basename dist/fixed-wheels/*.whl)
10352 echo "::set-output name=wheel::$WHEEL"
10453 delocate-listdeps dist/fixed-wheels/$WHEEL
10554
106- - name : pygit2 tests
107- working-directory : pygit2
55+ - name : Tests
10856 run : |
57+ pip3 install pytest
10958 mv pygit2 pygit2~
110- mv ../libgit2/env ../libgit2/env~
11159 pip3 install dist/fixed-wheels/pygit2-*.whl
112- mkdir -p testresults/
113- pytest -v test/ --junitxml=testresults/testresults.xml
114-
115- - name : save test results
116- uses : actions/upload-artifact@v1
117- if : always()
118- with :
119- name : " test-results-py_${{ matrix.py.ver }}-libgit2_${{ steps.libgit2.outputs.version }}"
120- path : pygit2/testresults/
60+ pytest
12161
122- - name : save wheel
62+ - name : Save wheel
12363 uses : actions/upload-artifact@v1
12464 with :
125- name : " macOS-wheel-py_${{ matrix.py.ver }}-libgit2_${{ steps.libgit2.outputs.version }}"
126- path : pygit2/ dist/fixed-wheels/
65+ name : " macOS-wheel-py_${{ matrix.py.ver }}-libgit2_${{ env.LIBGIT2_VERSION }}"
66+ path : dist/fixed-wheels/
0 commit comments