Skip to content

Commit 26bdd60

Browse files
peterbecichcdsmith
authored andcommitted
basic GitHub Actions
1 parent a27a7c6 commit 26bdd60

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.github/workflows/ci.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# modified from https://github.com/jgm/pandoc/blob/master/.github/workflows/ci.yml
2+
name: CI
3+
4+
on:
5+
push:
6+
branches:
7+
- '**'
8+
paths-ignore: []
9+
pull_request:
10+
paths-ignore: []
11+
12+
jobs:
13+
linux:
14+
15+
runs-on: ubuntu-20.04
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
versions:
20+
- ghc: '8.6.5'
21+
cabal: '3.4'
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
# need to install older cabal/ghc versions from ppa repository
26+
27+
- name: Install recent cabal/ghc
28+
uses: haskell/actions/setup@v1
29+
with:
30+
ghc-version: ${{ matrix.versions.ghc }}
31+
cabal-version: ${{ matrix.versions.cabal }}
32+
33+
# declare/restore cached things
34+
# caching doesn't work for scheduled runs yet
35+
# https://github.com/actions/cache/issues/63
36+
37+
- name: Cache cabal global package db
38+
id: cabal-global
39+
uses: actions/cache@v2
40+
with:
41+
path: |
42+
~/.cabal
43+
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
44+
45+
- name: Cache cabal work
46+
id: cabal-local
47+
uses: actions/cache@v2
48+
with:
49+
path: |
50+
dist-newstyle
51+
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
52+
53+
- name: Install dependencies
54+
run: |
55+
cabal update
56+
cabal build all --dependencies-only --enable-tests --disable-optimization
57+
- name: Build
58+
run: |
59+
cabal build all --enable-tests --disable-optimization 2>&1 | tee build.log
60+
# - name: Test # needs GHCJS
61+
# run: |
62+
# cabal test all --disable-optimization

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ CodeWorld
22
=========
33

44
[![Build Status](https://travis-ci.org/google/codeworld.svg?branch=master)](https://travis-ci.org/google/codeworld)
5+
[![Build status](https://github.com/google/codeworld/actions/workflows/ci.yml/badge.svg)](https://github.com/google/codeworld/actions/workflows/ci.yml)
56

67
CodeWorld is an educational environment using Haskell. It provides a simple
78
mathematical model for geometric figures, animations, and interactive and

0 commit comments

Comments
 (0)