diff options
author | Adam Paszke <apaszke@google.com> | 2020-09-16 15:32:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-16 15:32:43 +0200 |
commit | 352565be3ba5c7c325ff86a9afa2fedf38240ffc (patch) | |
tree | 3693d7a8a6e3485cf29ccade2a9a32478d400c78 /.github | |
parent | 0d6f3da4ee76b262bb41bb85fea0ec18cb9f3348 (diff) |
Try using GitHub Actions for CI instead of Travis (#234)
Our macOS builds keep timing out on Travis, so let's try GitHub Actions!
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yaml | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..25432bb2 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,53 @@ +name: Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-18.04, macos-latest] + include: + - os: macos-latest + install_deps: brew install llvm@9 + path_extension: $(brew --prefix llvm@9)/bin + - os: ubuntu-18.04 + install_deps: sudo apt-get install llvm-9-tools llvm-9-dev + path_extension: /usr/lib/llvm-9/bin + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + + - name: Setup Haskell Stack + uses: actions/setup-haskell@v1 + with: + enable-stack: true + stack-no-global: true + stack-version: 'latest' + + - name: Install system dependencies + run: | + ${{ matrix.install_deps }} + echo "::add-path::${{ matrix.path_extension }}" + + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.stack + $GITHUB_WORKSPACE/.stack-work + key: ${{ runner.os }}-${{ hashFiles('**/*.cabal', 'stack*.yaml') }} + restore-keys: ${{ runner.os }}- + + - name: Build + run: make + + - name: Run tests + run: make tests |