Skip to content

Instantly share code, notes, and snippets.

@davidmezzetti
Created November 13, 2020 21:04
Show Gist options
  • Save davidmezzetti/7b808ce7e608628d30e0a9cc41d6c8a7 to your computer and use it in GitHub Desktop.
Save davidmezzetti/7b808ce7e608628d30e0a9cc41d6c8a7 to your computer and use it in GitHub Desktop.
# GitHub Actions build workflow
name: build
on: ["push", "pull_request"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install dependencies - MacOS
run: brew install libomp
if: matrix.os == 'macos-latest'
- name: Install dependencies - Windows
run: python -m pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
if: matrix.os == 'windows-latest'
- name: Build
run: |
pip install -U pip wheel coverage coveralls
pip install .
python --version
make coverage
- name: Test Coverage
run: coveralls
if: matrix.os == 'ubuntu-latest'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment