From 7a8652be99461d14667276b7cdd7031ccb37e522 Mon Sep 17 00:00:00 2001 From: Alberto Oporto Ames Date: Tue, 16 Jun 2020 15:05:22 -0500 Subject: [PATCH] Add GH Actions CI (#58) * Add Pyinstaller CI * Add --onefile to Pyinstaller * Try windows Pyinstaller * Use python3.8 for Pyinstaller * Try matrix * Use bash to install pip packages * Remove sudo for pip * Add dependencies and strip if not using windows --- .github/workflows/python.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/python.yml diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..a7f94b7 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,49 @@ +name: Python + +on: + push: + branches: [ '*' ] + pull_request: + branches: [ '*' ] + +jobs: + pyinstaller: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ['ubuntu-20.04', 'windows-latest'] + + fail-fast: true + max-parallel: 3 + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Dependencies + run: pip3 install --upgrade + pyinstaller + requests + setuptools + wheel + + - name: Strip + id: strip + run: echo ::set-output name=option::--strip + if: runner.os != 'Windows' + + - name: Build + working-directory: legendary + run: pyinstaller + --onefile + --name legendary + ${{ steps.strip.outputs.option }} + cli.py + + - uses: actions/upload-artifact@v2 + with: + name: ${{ runner.os }}-package + path: legendary/dist/*