forked from ultralytics/yolov5
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GHA workflow files to build nightly and release wheel file (#218)
* add GHA build workflow files * no pip install -e . * clean up --------- Co-authored-by: dhuang <dhuang@MacBook-Pro-2.local>
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: build-nightly | ||
run-name: ${{ github.workflow }} is to create nightly wheel file for pypi | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
schedule: | ||
- cron: '0 0 * * *' | ||
jobs: | ||
build-nightly: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: arn:aws:iam::498127099666:role/WebIdentity-nm-github-actions-only | ||
aws-region: us-east-1 | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
pwd | ||
sudo apt-get install python3-pip | ||
pip3 --version | ||
sudo pip3 install virtualenv | ||
virtualenv venv | ||
source venv/bin/activate | ||
make -B build | ||
deactivate | ||
ls dist/ | ||
aws s3 ls s3://nm-github-actions/ | ||
aws s3 cp dist/*nightly*.whl s3://nm-github-actions/yolov5/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: build-release | ||
run-name: ${{ github.workflow }} is to create release wheel file for pypi | ||
on: | ||
push: | ||
branches: | ||
- 'release/[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
build-release: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: arn:aws:iam::498127099666:role/WebIdentity-nm-github-actions-only | ||
aws-region: us-east-1 | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
pwd | ||
sudo apt-get install python3-pip | ||
pip3 --version | ||
sudo pip3 install virtualenv | ||
virtualenv venv | ||
source venv/bin/activate | ||
sed -i 's/is_release = False/is_release = True/g' utils/neuralmagic/version.py | ||
make -B build | ||
deactivate | ||
ls dist/ | ||
aws s3 ls s3://nm-github-actions/ | ||
aws s3 cp dist/*.whl s3://nm-github-actions/yolov5/ |