| name: gcld3 |
| |
| on: [push, pull_request] |
| |
| jobs: |
| |
| build_test: |
| name: ${{ matrix.os }} |
| runs-on: ${{ matrix.os }} |
| strategy: |
| matrix: |
| os: [ubuntu-latest, macos-latest] |
| python-version: [3.6, 3.7, 3.8] |
| |
| steps: |
| - uses: actions/checkout@v2 |
| |
| - name: Linux Dependencies |
| if: runner.os == 'Linux' |
| run: sudo apt-get install libprotobuf-dev protobuf-compiler python3-dev |
| |
| - name: MacOS Dependencies |
| if: runner.os == 'macOS' |
| run: brew install protobuf |
| |
| - name: Set up Python ${{ matrix.python-version }} |
| uses: actions/setup-python@v2 |
| with: |
| python-version: ${{ matrix.python-version }} |
| |
| - name: Install dependencies |
| run: | |
| python -m pip install --upgrade pip |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
| |
| - name: Build package |
| run: | |
| pip install setuptools |
| python setup.py install |
| |
| - name: Test with pytest |
| run: | |
| pip install pytest pytest-cov |
| pytest src/python/gcld3_test.py |
| |
| - name: Install cibuildwheel |
| run: | |
| python -m pip install cibuildwheel==1.5.5 |
| |
| - name: Build wheels |
| env: |
| CIBW_BEFORE_BUILD_LINUX: sudo apt-get install libprotobuf-dev protobuf-compiler python3-dev |
| CIBW_BEFORE_BUILD_MACOS: brew install protobuf |
| run: | |
| python -m cibuildwheel --output-dir wheelhouse |