[fix] CI: install shapely via pip for version detection #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| # ---- Build test ---- | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgeos-dev python3-pip | |
| python3 -m pip install --break-system-packages shapely | |
| - name: Configure and build .deb | |
| run: | | |
| mkdir build && cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Release | |
| make deb | |
| # ---- Release: build .deb and publish on tag ------------------------------- | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: build | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgeos-dev python3-pip | |
| python3 -m pip install --break-system-packages shapely | |
| - name: Build .deb | |
| run: | | |
| mkdir build && cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Release | |
| make deb | |
| - name: Publish release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: build/shapelycpp-dev-*.deb | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |