Skip to content

Commit

Permalink
Build examples via cabal. Rely on hackage for building.
Browse files Browse the repository at this point in the history
  • Loading branch information
svenpanne committed Jan 2, 2016
1 parent 7ee0ea7 commit 5f0227c
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 57 deletions.
50 changes: 1 addition & 49 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,58 +86,10 @@ before_script:
- cabal update
- ghc --version
- ghc-pkg list
- pushd ..
- git clone --depth=100 --quiet https://github.com/svenpanne/ObjectName.git
- cd ObjectName
- cabal install --enable-documentation
- popd
- ghc-pkg list
- pushd ..
- git clone --depth=100 --quiet https://github.com/haskell-opengl/StateVar.git
- cd StateVar
- cabal install --enable-documentation
- popd
- ghc-pkg list
- pushd ..
- git clone --depth=100 --quiet https://github.com/haskell-opengl/OpenGLRaw.git
- cd OpenGLRaw
- cabal install --enable-documentation
- popd
- ghc-pkg list
- pushd ..
- git clone --depth=100 --quiet https://github.com/haskell-opengl/GLURaw.git
- cd GLURaw
- cabal install --enable-documentation
- popd
- ghc-pkg list
- pushd ..
- git clone --depth=100 --quiet https://github.com/haskell-opengl/OpenGL.git
- cd OpenGL
- cabal install --enable-documentation
- popd
- ghc-pkg list
- pushd ..
- git clone --depth=100 --quiet https://github.com/haskell-openal/OpenAL.git
- cd OpenAL
- cabal install --enable-documentation
- popd
- ghc-pkg list

script:
- cabal install --enable-documentation
- cabal install --enable-documentation --flags=BuildExamples `test "$GHCVER" \> "7.3" && echo "--jobs"`
- cabal sdist
- pushd examples/Basic
- ghc --make -Wall -O2 HelloWorld.hs
- ghc --make -Wall -O2 OpenALInfo.hs
- ghc --make -Wall -O2 PlayFile.hs
- popd
- pushd examples/TestSuite
- ghc --make -Wall -O2 TestErrorStuff.hs
- ghc --make -Wall -O2 TestFileLoader.hs
- ghc --make -Wall -O2 TestMemoryLoader.hs
- ghc --make -Wall -O2 TestVersion.hs
- ghc --make -Wall -O2 TestWaveforms.hs
- popd

after_script:
- ghc-pkg list
84 changes: 76 additions & 8 deletions ALUT.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ cabal-version: >= 1.10
extra-source-files:
CHANGELOG.md
README.md
examples/Basic/HelloWorld.hs
examples/Basic/OpenALInfo.hs
examples/Basic/PlayFile.hs
examples/TestSuite/TestErrorStuff.hs
examples/TestSuite/TestFileLoader.hs
examples/TestSuite/TestMemoryLoader.hs
examples/TestSuite/TestVersion.hs
examples/TestSuite/TestWaveforms.hs
examples/TestSuite/file1.wav
examples/TestSuite/file2.au
examples/TestSuite/file3.raw
Expand All @@ -37,6 +29,10 @@ flag UseNativeWindowsLibraries
When compiling under Windows, use the native libraries instead of e.g. the
ones coming with Cygwin.

flag BuildExamples
description: Build various ALUT examples.
default: False

library
exposed-modules:
Sound.ALUT
Expand Down Expand Up @@ -70,6 +66,78 @@ library
else
extra-libraries: alut

executable Basic-HelloWorld
if !flag(BuildExamples)
buildable: False
main-is: HelloWorld.hs
build-depends: base >= 3 && < 5, ALUT
hs-source-dirs: examples/Basic
default-language: Haskell2010
ghc-options: -Wall

executable Basic-OpenALInfo
if !flag(BuildExamples)
buildable: False
main-is: OpenALInfo.hs
build-depends: base >= 3 && < 5, pretty, ALUT
hs-source-dirs: examples/Basic
default-language: Haskell2010
ghc-options: -Wall

executable Basic-PlayFile
if !flag(BuildExamples)
buildable: False
main-is: PlayFile.hs
build-depends: base >= 3 && < 5, ALUT
hs-source-dirs: examples/Basic
default-language: Haskell2010
ghc-options: -Wall

executable TestSuite-TestErrorStuff
if !flag(BuildExamples)
buildable: False
main-is: TestErrorStuff.hs
build-depends: base >= 3 && < 5, ALUT
hs-source-dirs: examples/TestSuite
default-language: Haskell2010
ghc-options: -Wall

executable TestSuite-TestFileLoader
if !flag(BuildExamples)
buildable: False
main-is: TestFileLoader.hs
build-depends: base >= 3 && < 5, ALUT
hs-source-dirs: examples/TestSuite
default-language: Haskell2010
ghc-options: -Wall

executable TestSuite-TestMemoryLoader
if !flag(BuildExamples)
buildable: False
main-is: TestMemoryLoader.hs
build-depends: base >= 3 && < 5, ALUT
hs-source-dirs: examples/TestSuite
default-language: Haskell2010
ghc-options: -Wall

executable TestSuite-TestVersion
if !flag(BuildExamples)
buildable: False
main-is: TestVersion.hs
build-depends: base >= 3 && < 5, ALUT
hs-source-dirs: examples/TestSuite
default-language: Haskell2010
ghc-options: -Wall

executable TestSuite-TestWaveforms
if !flag(BuildExamples)
buildable: False
main-is: TestWaveforms.hs
build-depends: base >= 3 && < 5, ALUT
hs-source-dirs: examples/TestSuite
default-language: Haskell2010
ghc-options: -Wall

source-repository head
type: git
location: https://github.com/haskell-openal/ALUT.git
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.4.0.2
-------
* Build examples via cabal.

2.4.0.1
-------
* Relaxed upper version bound for `transformers`.
Expand Down

0 comments on commit 5f0227c

Please sign in to comment.