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
#
#
on:
name
:
Clean Nightly Releases
on
:
# schedule:
# - cron: '0
4
* * *' # Runs daily at 0
4
:00 UTC
#
workflow_dispatch: # Allows manual triggering
#
#
jobs:
#
clean-nightly:
#
runs-on: ubuntu-latest
#
permissions:
#
contents: write
#
packages: write
#
#
steps:
#
- name: Set up GitHub CLI
#
uses: cli/cli-action@v2
#
#
- name: Authenticate GitHub CLI
#
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
#
#
- name: Get and clean old nightly releases
#
env:
#
GH_REPO: ${{ github.repository }}
#
run: |
#
# Get all release titles that match the nightly pattern
#
mapfile -t releases < <(
#
gh release list --limit 1000 --json tagName,name,createdAt --jq '
#
sort_by(.createdAt) | reverse |
#
map(select(.name | test("^Nunchaku Nightly v[0-9]+\\.[0-9]+\\.[0-9]+dev[0-9]{8}$"))) |
#
map(.tagName)'
#
)
#
#
# Keep only the first 5 (latest), delete the rest
#
if (( ${#releases[@]} > 5 )); then
#
for tag in "${releases[@]:5}"; do
#
echo "Deleting old release: $tag"
#
gh release delete "$tag" --yes
#
done
#
else
#
echo "Less than or equal to 5 nightly releases found. No cleanup needed."
#
fi
# - cron: '0
3
* * *' # Runs daily at 0
3
:00 UTC
workflow_dispatch
:
# Allows manual triggering
jobs
:
clean-nightly
:
runs-on
:
ubuntu-latest
permissions
:
contents
:
write
packages
:
write
steps
:
-
name
:
Set up GitHub CLI
uses
:
cli/cli-action@v2
-
name
:
Authenticate GitHub CLI
run
:
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
-
name
:
Get and clean old nightly releases
env
:
GH_REPO
:
${{ github.repository }}
run
:
|
# Get all release titles that match the nightly pattern
mapfile -t releases < <(
gh release list --limit 1000 --json tagName,name,createdAt --jq '
sort_by(.createdAt) | reverse |
map(select(.name | test("^Nunchaku Nightly v[0-9]+\\.[0-9]+\\.[0-9]+dev[0-9]{8}$"))) |
map(.tagName)'
)
# Keep only the first 5 (latest), delete the rest
if (( ${#releases[@]} > 5 )); then
for tag in "${releases[@]:5}"; do
echo "Deleting old release: $tag"
gh release delete "$tag" --yes
done
else
echo "Less than or equal to 5 nightly releases found. No cleanup needed."
fi
.github/workflows/nightly-build.yaml
View file @
212fd278
...
...
@@ -44,7 +44,7 @@ jobs:
if
:
steps.check.outputs.is_dev == 'true'
run
:
|
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" >> "$GITHUB_OUTPUT"
...
...
@@ -78,7 +78,7 @@ jobs:
-
name
:
Build wheels
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
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