Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support cabal new-build #100

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/cabal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: cabal

on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
schedule:
- cron: "00 15 * * *"

jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
ghc: ["8.6.5", "8.8.3"]
cabal: ["3.0"]
cache-version: ["2020-03-16"]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-haskell@v1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Cache ~/.cabal/store
uses: actions/cache@v1
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cache-version }}-cabal-store

- name: Cache dist-newstyle
uses: actions/cache@v1
with:
path: dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cache-version }}-cabal-dist

- name: Install libralies (linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libcwiid-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev libfreenect-dev

- name: Install dependencies
run: |
cabal v2-update
cabal v2-configure --disable-optimization --write-ghc-environment-files=always -j2
cabal v2-build --only-dependencies

- name: Build
run: cabal v2-install haskanoid --overwrite-policy=always
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ The game is available on [hackage](https://hackage.haskell.org/package/SpaceInva

```
$ cabal update
$ cabal sandbox init
$ cabal install haskanoid
$ ./.cabal-sandbox/bin/haskanoid
$ cabal run
```

If you want to explore the code and possibly make changes, do the following:
Expand All @@ -55,9 +53,7 @@ If you want to explore the code and possibly make changes, do the following:
$ cabal update
$ cabal unpack haskanoid # or git clone http://github.com/ivanperez-keera/haskanoid
$ cd haskanoid-* # Game resources are here
$ cabal sandbox init
$ cabal install
$ ./dist/build/haskanoid/haskanoid
$ cabal run
```

To play it with the wiimote, you need to run the program with the special
Expand Down
9 changes: 9 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
packages: .

source-repository-package
type: git
location: https://github.com/haskell-hvr/missingh
tag: a936764af1c674f8217c237223c0759e4e4c0684

allow-newer:
MissingH:base