Skip to content

fix missing update #123

fix missing update

fix missing update #123

Workflow file for this run

---
name: Tensornet
on:
push:
branches:
- '**' # matches every branch
tags:
- 'v[0-9]+'
- 'v[0-9]+.[a-z0-9]+'
- 'v[0-9]+.[0-9]+.[a-z0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+.[a-z0-9]+'
pull_request:
env:
PIXI_LOCKED: "true"
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.49.0
environments: tools
- name: pre-commit
run: ./pixiw run pre-commit-run --color=always --show-diff-on-failure
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.49.0
environments: default protoc py37 py38 py39
- name: Build with debug profile
run: ./pixiw run build
- name: Verify that the dynamic libraries only requires glibc <= 2.12
run: |
err=0
objdump -T build/debug/libtensornet.so | grep GLIBC_ | grep -v '0000000000000000\s*w\s*DF' | grep -v 'GLIBC_\([01]\|2\.[0-9]\|2\.1[012]\)[^0-9]' || err=$?
test $err = 1
err=0
objdump -T build/debug/_pywrap_tn.cpython-38-x86_64-linux-gnu.so | grep GLIBC_ | grep -v '0000000000000000\s*w\s*DF' | grep -v 'GLIBC_\([01]\|2\.[0-9]\|2\.1[012]\)[^0-9]' || err=$?
test $err = 1
create-wheel-cmake:
name: create wheel / cmake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.49.0
environments: default py37 py38 py39 tools
- name: Create wheel
run: |
./pixiw run create-wheel
./pixiw run -e tools check-wheel-contents dist
grep -q '^tensornet$' qihoo_tensornet.egg-info/top_level.txt
ls -alh dist
- name: Store wheels
uses: actions/upload-artifact@v4
with:
path: dist/
retention-days: 7
publish-to-pypi:
name: Upload to pypi
if: github.repository == 'Qihoo360/tensornet' && startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- create-wheel-cmake
runs-on: ubuntu-latest
permissions:
id-token: write # mandatory for pypi trusted publishing
contents: write # mandatory for create a github release
steps:
- name: Download wheels
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist/
- name: Publish wheels to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# push v*.rc* tags to test.pypi.org
repository-url: ${{ contains(github.ref, '.rc') && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/'
}}
print-hash: true
- name: Create a draft release
uses: softprops/action-gh-release@v2
with:
draft: true
prerelease: ${{ contains(github.ref, '.rc') }}
generate_release_notes: true