diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..88f3fb7 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 \ No newline at end of file diff --git a/mm/src/requirements.txt b/mm/src/requirements.txt new file mode 100644 index 0000000..c4b5212 --- /dev/null +++ b/mm/src/requirements.txt @@ -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