Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fengzch-das
nunchaku
Commits
212fd278
Unverified
Commit
212fd278
authored
May 23, 2025
by
Muyang Li
Committed by
GitHub
May 23, 2025
Browse files
chore: add nightly linux wheel build (#395)
* revise the tag name * build all linux wheels * add the cleaning ci
parent
cb1b9231
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
43 deletions
+43
-43
.github/workflows/clean-nightly-releases.yaml
.github/workflows/clean-nightly-releases.yaml
+41
-41
.github/workflows/nightly-build.yaml
.github/workflows/nightly-build.yaml
+2
-2
No files found.
.github/workflows/clean-nightly-releases.yaml
View file @
212fd278
#
name: Clean Nightly Releases
name
:
Clean Nightly Releases
#
#
on:
on
:
# schedule:
# schedule:
# - cron: '0
4
* * *' # Runs daily at 0
4
:00 UTC
# - cron: '0
3
* * *' # Runs daily at 0
3
:00 UTC
#
workflow_dispatch: # Allows manual triggering
workflow_dispatch
:
# Allows manual triggering
#
#
jobs:
jobs
:
#
clean-nightly:
clean-nightly
:
#
runs-on: ubuntu-latest
runs-on
:
ubuntu-latest
#
permissions:
permissions
:
#
contents: write
contents
:
write
#
packages: write
packages
:
write
#
#
steps:
steps
:
#
- name: Set up GitHub CLI
-
name
:
Set up GitHub CLI
#
uses: cli/cli-action@v2
uses
:
cli/cli-action@v2
#
#
- name: Authenticate GitHub CLI
-
name
:
Authenticate GitHub CLI
#
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
run
:
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
#
#
- name: Get and clean old nightly releases
-
name
:
Get and clean old nightly releases
#
env:
env
:
#
GH_REPO: ${{ github.repository }}
GH_REPO
:
${{ github.repository }}
#
run: |
run
:
|
#
# Get all release titles that match the nightly pattern
# Get all release titles that match the nightly pattern
#
mapfile -t releases < <(
mapfile -t releases < <(
#
gh release list --limit 1000 --json tagName,name,createdAt --jq '
gh release list --limit 1000 --json tagName,name,createdAt --jq '
#
sort_by(.createdAt) | reverse |
sort_by(.createdAt) | reverse |
#
map(select(.name | test("^Nunchaku Nightly v[0-9]+\\.[0-9]+\\.[0-9]+dev[0-9]{8}$"))) |
map(select(.name | test("^Nunchaku Nightly v[0-9]+\\.[0-9]+\\.[0-9]+dev[0-9]{8}$"))) |
#
map(.tagName)'
map(.tagName)'
#
)
)
#
#
# Keep only the first 5 (latest), delete the rest
# Keep only the first 5 (latest), delete the rest
#
if (( ${#releases[@]} > 5 )); then
if (( ${#releases[@]} > 5 )); then
#
for tag in "${releases[@]:5}"; do
for tag in "${releases[@]:5}"; do
#
echo "Deleting old release: $tag"
echo "Deleting old release: $tag"
#
gh release delete "$tag" --yes
gh release delete "$tag" --yes
#
done
done
#
else
else
#
echo "Less than or equal to 5 nightly releases found. No cleanup needed."
echo "Less than or equal to 5 nightly releases found. No cleanup needed."
#
fi
fi
.github/workflows/nightly-build.yaml
View file @
212fd278
...
@@ -44,7 +44,7 @@ jobs:
...
@@ -44,7 +44,7 @@ jobs:
if
:
steps.check.outputs.is_dev == 'true'
if
:
steps.check.outputs.is_dev == 'true'
run
:
|
run
:
|
today=$(date -u +"%Y%m%d")
today=$(date -u +"%Y%m%d")
tag_name="v${{ steps.version.outputs.version }}
-
$today"
tag_name="v${{ steps.version.outputs.version }}$today"
echo "tag_name=$tag_name"
echo "tag_name=$tag_name"
echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT"
echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT"
...
@@ -78,7 +78,7 @@ jobs:
...
@@ -78,7 +78,7 @@ jobs:
-
name
:
Build wheels
-
name
:
Build wheels
run
:
|
run
:
|
bash scripts/build_linux_wheel.sh
"3.10" "2.7" "12.8"
bash scripts/build_
all_
linux_wheel
s
.sh
-
name
:
Upload wheels to GitHub Release
-
name
:
Upload wheels to GitHub Release
uses
:
softprops/action-gh-release@v2
uses
:
softprops/action-gh-release@v2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment