Skip to content

[Snyk] Security upgrade jinja2 from 3.1.3 to 3.1.5 #50

[Snyk] Security upgrade jinja2 from 3.1.3 to 3.1.5

[Snyk] Security upgrade jinja2 from 3.1.3 to 3.1.5 #50

Workflow file for this run

# This file is autogenerated by maturin v1.5.1
# To update, run
#
# maturin generate-ci github
#
name: CI
on:
push:
branches:
- main
tags:
- '*'
pull_request:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
permissions:
contents: read
id-token: write
env:
PYTHON_VERSION: "3.8" # to build abi3 wheels compatible with Ubuntu 20.04+
jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
# Disable aarch64 for now due to torch-sys build issues
- runner: ubuntu-latest
target: aarch64
steps:
- uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: Install deps
# run: |
# pip install uv
# uv venv
# echo =============================================
# uv pip compile pyproject.toml -o requirements.txt
# cat requirements.txt
# cp requirements.txt requirements-linux.txt
# echo =============================================
# uv pip install -r requirements-linux.txt
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
manylinux: '2014'
args:
--release
--out dist
--interpreter python${{ env.PYTHON_VERSION }}
--strip
--skip-auditwheel
docker-options: -e LIBTORCH_USE_PYTORCH=1
sccache: true
before-script-linux: |
# Install the correct version of libtorch
# export GLIBCXX_USE_CXX11_ABI=0
# Dependencies for building the torch-sys crate:
python${{ env.PYTHON_VERSION }} -m pip install \
torch==2.2.0 \
setuptools==69.5.1 `# seems necessary for aarch64` \
;
# numpy==1.24.1 \
# --index-url https://download.pytorch.org/whl/cpu
ln -sf python${{ env.PYTHON_VERSION }} /usr/local/bin/python3 # manylinux x86_64
ln -sf python${{ env.PYTHON_VERSION }} /usr/bin/python3 # manylinux aarch64
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist
# windows:
# runs-on: ${{ matrix.platform.runner }}
# strategy:
# matrix:
# platform:
# - runner: windows-latest
# target: x64
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# architecture: ${{ matrix.platform.target }}
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-windows-${{ matrix.platform.target }}
# path: dist
# macos:
# runs-on: ${{ matrix.platform.runner }}
# strategy:
# matrix:
# platform:
# - runner: macos-latest
# target: x86_64
# - runner: macos-14
# target: aarch64
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-macos-${{ matrix.platform.target }}
# path: dist
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs:
- linux
# - windows
# - macos
- sdist
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
# if: ${{ failure() }}
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}