-
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.
Signed-off-by: Andy Liu <[email protected]>
- Loading branch information
Showing
2 changed files
with
71 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,65 @@ | ||
name: build | ||
|
||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'fix/**' | ||
- 'feature/**' | ||
- 'release/**' | ||
pull_request: | ||
branches: | ||
- main | ||
- 'release/**' | ||
schedule: | ||
- cron: '1 0 * * 4' | ||
|
||
|
||
jobs: | ||
build: | ||
name: Build on ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, macos-11] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check action type | ||
run: | | ||
echo "OS: $RUNNER_OS" | ||
echo "Repository: $GITHUB_REPOSITORY" | ||
echo "Commit: $GITHUB_SHA" | ||
echo "Branch: `git rev-parse --abbrev-ref HEAD`" | ||
- name: Prepare Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Prepare requirements | ||
id: prepare-requirements | ||
run: | | ||
echo "Prepare python requirements on $RUNNER_OS" | ||
cd $GITHUB_WORKSPACE | ||
cd ./mm/src | ||
pip3 install -r requirements.txt | ||
- name: Build python project | ||
id: build-project | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
mkdir exe | ||
cd ./mm/src | ||
pyinstaller ./mm.py | ||
mv dist/mm/* $GITHUB_WORKSPACE/exe | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Binary build on ${{ matrix.os }} | ||
path: | | ||
exe | ||
retention-days: 7 |
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,6 @@ | ||
colorama==0.4.6 | ||
pyinstaller==5.13.0 | ||
pyinstaller-hooks-contrib==2023.5 | ||
pyserial==3.5 | ||
toml==0.10.2 | ||
tqdm==4.65.0 |