fix(pt/dp): make strip more efficient #7914
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: Build C library | |
on: | |
push: | |
branches-ignore: | |
- "gh-readonly-queue/**" | |
tags: | |
- "v*" | |
pull_request: | |
merge_group: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build_c: | |
name: Build C library | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
include: | |
- tensorflow_build_version: "2.18" | |
tensorflow_version: "" | |
filename: libdeepmd_c.tar.gz | |
- tensorflow_build_version: "2.14" | |
tensorflow_version: ">=2.5.0rc0,<2.15" | |
filename: libdeepmd_c_cu11.tar.gz | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Package C library | |
run: ./source/install/docker_package_c.sh | |
env: | |
TENSORFLOW_VERSION: ${{ matrix.tensorflow_version }} | |
TENSORFLOW_BUILD_VERSION: ${{ matrix.tensorflow_build_version }} | |
- run: cp libdeepmd_c.tar.gz ${{ matrix.filename }} | |
if: matrix.filename != 'libdeepmd_c.tar.gz' | |
# for download and debug | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libdeepmd_c-${{ strategy.job-index }}-${{ matrix.filename }} | |
path: ${{ matrix.filename }} | |
- name: Test C library | |
run: ./source/install/docker_test_package_c.sh | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ${{ matrix.filename }} | |
test_c: | |
name: Test building from C library | |
needs: [build_c] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: libdeepmd_c-* | |
merge-multiple: true | |
- run: tar -vxzf ./libdeepmd_c.tar.gz | |
- name: Test C library | |
run: ./source/install/build_from_c.sh | |
env: | |
DEEPMD_C_ROOT: ${{ github.workspace }}/libdeepmd_c | |
pass: | |
name: Pass building c library | |
needs: [build_c, test_c] | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |