Add support for 3.11/3.12 #96
Workflow file for this run
This file contains 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: | |
- main | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
runs-on: ubuntu-22.04 | |
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 boost | |
uses: MarkusJx/[email protected] | |
id: install-boost | |
with: | |
# REQUIRED: Specify the required boost version | |
# A list of supported versions can be found here: | |
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json | |
boost_version: 1.84.0 | |
platform_version: 22.04 # as per runs-on | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
sudo apt-get install -y --no-install-recommends libtag1-dev lcov | |
find ${{steps.install-boost.outputs.BOOST_ROOT}}/lib | sort | grep python | |
CPPFLAGS="-coverage -I${{steps.install-boost.outputs.BOOST_ROOT}}/include" \ | |
LDFLAGS="-L${{steps.install-boost.outputs.BOOST_ROOT}}/lib" \ | |
pip install -e . | |
env: | |
LD_LIBRARY_PATH: ${{steps.install-boost.outputs.BOOST_ROOT}}/lib | |
- name: Test with pytest | |
run: pytest -vvv --cov=tagpy --cov-report=term-missing --cov-report=lcov --cov-fail-under=50 | |
env: | |
LD_LIBRARY_PATH: ${{steps.install-boost.outputs.BOOST_ROOT}}/lib | |
- name: Python Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage.lcov | |
parallel: true | |
flag-name: Python-${{ matrix.python-version }} | |
- name: LCOV | |
run: | | |
lcov --version | |
lcov --directory build --output-file cpp.info --capture --exclude "/usr/include/*" --exclude "/opt/hostedtoolcache/*" --exclude "/home/runner/work/tagpy/tagpy/boost/*" | |
lcov --list cpp.info | |
- name: C++ Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: cpp.info | |
parallel: true | |
flag-name: CPP-${{ matrix.python-version }} | |
finish: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true | |
integration: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
os: [fedora-35, ubuntu-20.04, ubuntu-22.04, alpine-3.17, manylinux2014_x86_64, manylinux_2_28] | |
name: Build ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ matrix.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ matrix.os }}-buildx | |
- name: Build ${{ matrix.os }} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
builder: ${{ steps.buildx.outputs.name }} | |
file: .github/Dockerfile.${{ matrix.os }} | |
push: false | |
tags: ${{ steps.prep.outputs.tagged_image }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
# Temp fix | |
# https://github.com/docker/build-push-action/issues/252 | |
# https://github.com/moby/buildkit/issues/1896 | |
- name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
manylinux: | |
runs-on: ubuntu-latest | |
name: Test Manylinux builds | |
steps: | |
- uses: actions/checkout@v2 | |
- run: make manylinux2014 |