Skip to content

Commit

Permalink
Add GHA workflow files to build nightly and release wheel file (#218)
Browse files Browse the repository at this point in the history
* add GHA build workflow files

* no pip install -e .

* clean up

---------

Co-authored-by: dhuang <dhuang@MacBook-Pro-2.local>
  • Loading branch information
dhuangnm and dhuang authored Jun 6, 2023
1 parent e8ee6eb commit cd02ab8
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build-nightly.yml
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/
32 changes: 32 additions & 0 deletions .github/workflows/build-release.yml
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/

0 comments on commit cd02ab8

Please sign in to comment.