Skip to content

Commit d571e45

Browse files
committed
update workflow
1 parent a00a584 commit d571e45

File tree

3 files changed

+41
-7
lines changed

3 files changed

+41
-7
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ on:
1313
jobs:
1414
build-archive-wheel:
1515

16-
uses: OpenBMB/BMTrain/.github/workflows/build_whl.yml@main
16+
uses: OpenBMB/BMTrain/.github/workflows/build_whl.yml@dev
1717
secrets: inherit
1818

19-
publish:
19+
fake-publish:
2020
needs: build-archive-wheel
2121
runs-on: ubuntu-latest
2222
steps:
@@ -29,7 +29,7 @@ jobs:
2929
python-version: 3.9
3030

3131
- name: Download distribution files
32-
uses: actions/download-artifact@v2
32+
uses: actions/download-artifact@v4
3333
with:
3434
name: dist
3535
path: dist

.github/workflows/build_whl.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,46 @@ jobs:
4444
version=${{ matrix.python-version }}
4545
docker run -e BUILD_DOCKER_ENV=1 -e CUDACXX=/usr/local/cuda-11.3/bin/nvcc -e PATH="/opt/rh/devtoolset-9/root/usr/bin:$PATH" -e LD_LIBRARY_PATH="/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:$LD_LIBRARY_PATH" -v ${{ github.workspace }}:/workspace/BMTrain -i pytorch/manylinux-cuda113:latest /bin/bash -c "cd /workspace/BMTrain;/opt/python/cp${version}*/bin/pip install build; /opt/python/cp${version}*/bin/python -m build .;for file in dist/*-linux_x86_64.whl; do mv \"\$file\" \"\${file//-linux_x86_64/-manylinux2014_x86_64}\"; done"
4646
47+
- name: Upload wheels as artifacts
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: wheels_py${{ matrix.python-version }}
51+
path: dist/*.whl
52+
53+
- name: Upload source distribution (only once)
54+
if: matrix.python-version == '37' # Only upload source distribution once
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: source_dist
58+
path: dist/*.tar.gz
59+
60+
archive:
61+
runs-on: ubuntu-latest
62+
needs: build
63+
steps:
64+
- name: Download all wheels
65+
uses: actions/download-artifact@v4
66+
with:
67+
path: wheels
68+
pattern: wheels_py*
69+
70+
- name: Download source distribution
71+
uses: actions/download-artifact@v4
72+
with:
73+
path: dist
74+
pattern: source_dist/*.tar.gz
75+
76+
- name: Combine all wheels into a single directory
77+
run: |
78+
mkdir -p dist
79+
find wheels -name '*.whl' -exec mv {} dist/ \;
80+
find dist -name '*.tar.gz' -exec mv {} dist/ \;
81+
4782
- name: Archive distribution files
48-
uses: actions/upload-artifact@v2
83+
uses: actions/upload-artifact@v4
4984
with:
5085
name: dist
5186
path: |
5287
dist/*.tar.gz
5388
dist/*.whl
54-
55-
89+
overwrite: true

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
dist/*.tar.gz
4141
dist/*.whl
4242
prerelease: false
43-
name: "BMTrain v0.2.3"
43+
name: "BMTrain"
4444
token: ${{ secrets.RELEASE_TOKEN }}
4545
tag_name: ${{ steps.create_release.outputs.tag }}
4646
env:

0 commit comments

Comments
 (0)