|
| 1 | +name: "linux tests, binary- and documentation builds for 'kiara'" |
| 2 | +# This workflow is triggered on pushes to the repository. |
| 3 | +on: [push] |
| 4 | + |
| 5 | + |
| 6 | +jobs: |
| 7 | + test-linux: |
| 8 | + name: pytest on linux |
| 9 | + runs-on: ubuntu-latest |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + python_version: [3.6, 3.7, 3.8, 3.9] |
| 13 | + steps: |
| 14 | + - name: "Set up Python ${{ matrix.python_version }}" |
| 15 | + uses: actions/setup-python@v2 |
| 16 | + with: |
| 17 | + python-version: "${{ matrix.python_version }}" |
| 18 | + - uses: actions/checkout@v2 |
| 19 | + - name: install requirements |
| 20 | + run: pip install -U -e '.[dev_testing,all]' |
| 21 | + - name: Test with pytest |
| 22 | + run: make test |
| 23 | + |
| 24 | + mypy-linux: |
| 25 | + name: mypy check on linux |
| 26 | + runs-on: ubuntu-latest |
| 27 | + strategy: |
| 28 | + matrix: |
| 29 | + python_version: [3.6, 3.7, 3.8, 3.9] |
| 30 | + steps: |
| 31 | + - name: "Set up Python ${{ matrix.python_version }}" |
| 32 | + uses: actions/setup-python@v2 |
| 33 | + with: |
| 34 | + python-version: "${{ matrix.python_version }}" |
| 35 | + - uses: actions/checkout@v2 |
| 36 | + - name: install requirements |
| 37 | + run: pip install -U -e '.[dev_testing,all]' |
| 38 | + - name: Test with mypy |
| 39 | + run: make mypy |
| 40 | + |
| 41 | + flake8-linux: |
| 42 | + name: flake8 on linux |
| 43 | + runs-on: ubuntu-latest |
| 44 | + steps: |
| 45 | + - name: Set up Python 3.9 |
| 46 | + uses: actions/setup-python@v2 |
| 47 | + with: |
| 48 | + python-version: 3.9 |
| 49 | + - uses: actions/checkout@v2 |
| 50 | + - name: install requirements |
| 51 | + run: pip install -U -e '.[dev_testing,all]' |
| 52 | + - name: Test with flake8 |
| 53 | + run: make flake |
| 54 | + |
| 55 | + build-docs: |
| 56 | + name: build documentation |
| 57 | + runs-on: ubuntu-latest |
| 58 | + needs: |
| 59 | + - test-linux |
| 60 | + - mypy-linux |
| 61 | + - flake8-linux |
| 62 | + steps: |
| 63 | + - name: Set up Python 3.9.1 |
| 64 | + uses: actions/setup-python@v2 |
| 65 | + with: |
| 66 | + python-version: 3.9.1 |
| 67 | + - uses: actions/checkout@v2 |
| 68 | + - name: install requirements |
| 69 | + run: pip install --extra-index-url https://gitlab.com/api/v4/projects/25344049/packages/pypi/simple -e '.[dev_documentation,all]' |
| 70 | + - name: create documentation |
| 71 | + run: make docs |
| 72 | + - name: deploy documentation to gh-pages |
| 73 | + |
| 74 | + with: |
| 75 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 76 | + BRANCH: gh-pages |
| 77 | + FOLDER: build/site |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + build-linux: |
| 82 | + name: build linux binary |
| 83 | + runs-on: ubuntu-16.04 |
| 84 | + needs: |
| 85 | + - test-linux |
| 86 | + - mypy-linux |
| 87 | + - flake8-linux |
| 88 | + steps: |
| 89 | + - uses: actions/cache@v2 |
| 90 | + with: |
| 91 | + path: ~/.pyenv/ |
| 92 | + key: ${{ runner.os }}-target-ubuntu-kiara-python-build |
| 93 | + - uses: actions/checkout@v2 |
| 94 | + - name: download build script |
| 95 | + run: wget https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/build.sh && chmod +x build.sh |
| 96 | + - name: download spec file |
| 97 | + run: wget https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/onefile.spec |
| 98 | + - name: build_binary |
| 99 | + run: "PATH=\"$(echo $PATH | tr : '\n' | grep -v linuxbrew | paste -s -d:)\" ./build.sh --python-type pyenv" |
| 100 | + - name: Archive Linux binary |
| 101 | + uses: actions/upload-artifact@v1 |
| 102 | + with: |
| 103 | + name: kiara |
| 104 | + path: dist/linux-gnu/kiara |
0 commit comments