Skip to content

Commit 435616a

Browse files
[CI] fix release action cannot find uv & clean actions (#2837)
* [CI] fix release env no uv * [CI] add envs * [CI] no need check vm step * [CI] mount entrypoint.sh * [CI] fix uv not found * [CI] install uv first * [CI] install uv first * [CI] fix command * [CI] use py 3.14
1 parent f731429 commit 435616a

3 files changed

Lines changed: 38 additions & 38 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
python -m pip install -U build twine setuptools
4+
python -m pip install uv
5+
uv pip install -U build twine setuptools
56
python -m build --sdist

.github/scripts/ci_release_test_install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -euo pipefail
44
pkg_name="${1:?package filename is required}"
55
venv_dir="${2:-local_uv_env}"
66

7-
uv venv "$venv_dir"
7+
python -m venv "$venv_dir"
88
source "$venv_dir/bin/activate"
9-
uv pip install "dist/$pkg_name" torch
9+
pip install uv
10+
uv pip install "dist/$pkg_name"

.github/workflows/release.yml

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -54,59 +54,57 @@ concurrency:
5454
cancel-in-progress: true
5555

5656
jobs:
57-
check-vm:
58-
runs-on: [ self-hosted, linux ]
59-
container:
60-
image: modelcloud/gptqmodel:alpine-ci-v1
61-
outputs:
62-
ip: ${{ steps.get_ip.outputs.ip }}
63-
run_id: ${{ steps.get_ip.outputs.run_id }}
64-
if: ${{ inputs.github_vm == false }}
65-
steps:
66-
- name: Checkout Codes
67-
uses: actions/checkout@v6
68-
with:
69-
repository: ${{ env.repo }}
70-
ref: ${{ env.ref }}
71-
72-
- name: Print env
73-
run: |
74-
echo "event name: ${{ github.event_name }}"
75-
echo "repo: ${{ env.repo }}"
76-
echo "ref: ${{ env.ref }}"
77-
echo "upload_release: ${{ inputs.upload_release }}"
78-
echo "upload_pypi: ${{ inputs.upload_pypi }}"
79-
80-
- name: Select server
81-
id: get_ip
82-
run: |
83-
bash .github/scripts/ci_write_runner_outputs.sh "$RUNNER" "${{ github.run_id }}"
84-
8557
release-source:
8658
permissions:
8759
contents: write
8860
runs-on: [ self-hosted, xeon5 ]
89-
needs:
90-
- check-vm
9161
if: ${{ inputs.github_vm == false }}
62+
env:
63+
UV_TORCH_BACKEND: cu130
64+
TORCH_VERSION: 2.11.0
65+
PYTHON_VERSION: 3.14
66+
UV_PYTHON: 3.14
9267
container:
93-
image: ${{ needs.check-vm.outputs.ip }}:5000/nvidia/cuda:130-ubuntu24.04_0415
68+
image: 10.0.13.31:5000/nvidia/cuda:130-ubuntu24.04_0415
9469
volumes:
9570
- /monster/ci/env/entrypoint.sh:/etc/profile.d/01-entrypoint.sh
96-
- /monster/ci/uv:/opt/uv
71+
- /github/workspace/uv:/opt/uv
72+
- /github/workspace/tmp:/opt/uv/tmp
73+
- /monster/ci/uv/python:/opt/uv/python
74+
- /monster/ci/uv/cache/python:/opt/uv/cache/python
75+
- /monster/ci/uv/setup_uv_venv.sh:/opt/uv/setup_uv_venv.sh
76+
- /monster/ci/uv/uv:/opt/uv/uv
77+
- /monster/ci/uv/uvx:/opt/uv/uvx
78+
- /monster/ci/uv/env:/opt/uv/env
79+
- /monster/ci/uv/uv.toml:/opt/uv/uv.toml
80+
- /monster/ci/env:/opt/env
9781
steps:
9882
- name: Checkout Codes
9983
uses: actions/checkout@v6
10084
with:
10185
repository: ${{ env.repo }}
10286
ref: ${{ env.ref }}
10387

88+
- name: Activate uv env
89+
run: |
90+
echo "::group::-- dust uv cache dir --"
91+
dust $(uv cache dir)
92+
echo "::endgroup::"
93+
94+
bash .github/scripts/ci_unit_activate_uv_env.sh \
95+
"gptqmodel_py314t_release_source" \
96+
130 \
97+
"${{ env.TORCH_VERSION }}" \
98+
"${{ github.run_id }}" \
99+
"${{ github.run_attempt }}"
100+
104101
- name: Setup release env
105102
run: |
106-
export UV_PYTHON=3.14
107-
echo "UV_PYTHON=3.14" >> "$GITHUB_ENV"
103+
echo "::group::-- uv envs --"
104+
printenv | grep UV
105+
echo "::endgroup::"
108106
109-
env_name="gptqmodel_py314_release_source"
107+
env_name="gptqmodel_py314t_release_source"
110108
/opt/uv/setup_uv_venv.sh $env_name
111109
112110
- name: Run shared release source flow

0 commit comments

Comments
 (0)