Skip to content

Resolve an object lifetime bug in add_polyline #2994

Resolve an object lifetime bug in add_polyline

Resolve an object lifetime bug in add_polyline #2994

Workflow file for this run

name: testing
on:
push:
branches:
- main
- 'version-**'
tags: ["*"]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build-test-cmake:
name: CMake
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest']
runs-on: ${{ matrix.os }}
env:
UV_FROZEN: true
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
# required for `git describe --tags` to work
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: 3.14
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: true
prune-cache: false
- name: Install Conan
uses: conan-io/setup-conan@ed3942a6883243f4af84e13e49c972f9440fa1c2 # v1.4.0
with:
cache_packages: true
- name: Install dependencies
shell: bash
# uv sync installs into a local environment so we need to extend the PATH
# variable in subsequent steps via GITHUB_PATH to ensure that conan
# picks up packages installed by us.
run: |
uv sync --group build --no-install-project
echo "$(pwd)/.venv/bin" >> "$GITHUB_PATH"
mkdir cmake-build
conan install . --output-folder=cmake-build --build=missing -o build_tests=True
- name: Build
run: |
cmake --preset conan-release -DENABLE_ASAN=ON -DENABLE_UBSAN=ON -DRST_DOC=ON
cmake --build --preset conan-release
- name: Run tests
run: |
ctest --preset conan-release --output-on-failure
env:
RD_SKIP_SIGNAL: 1
ERT_SHOW_BACKTRACE: 1
build-test-wheel:
name: Python ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-2022']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
- name: Build wheels
uses: pypa/cibuildwheel@294735312765b09d24a2fbec22660ce817587d55 # v4.1.0
with:
extras: "uv"
- name: Upload wheels
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [build-test-wheel]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
environment:
name: pypi
permissions:
id-token: write # required for trusted publishing (OIDC)
steps:
- name: Get wheels
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: wheels-*
path: dist
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
skip-existing: true