Skip to content
Merged
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
47 changes: 47 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Native dependencies
run: sudo apt install libgmp-dev libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev
- uses: "actions/checkout@v3"
- id: setup-haskell-cabal
uses: "haskell/actions/setup@v2"
with:
cabal-version: "${{ matrix.cabal }}"
enable-stack: false
ghc-version: "${{ matrix.ghc }}"
- name: Update Hackage repository
run: cabal update
- name: cabal.project.local.ci
run: |
if [ -e cabal.project.local.ci ]; then
cp cabal.project.local.ci cabal.project.local
fi
- name: freeze
run: cabal freeze
- uses: "actions/cache@v3"
with:
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}"
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
- name: Install dependencies
run: cabal build all --enable-tests --enable-benchmarks --only-dependencies
- name: build all
run: cabal build all --enable-tests --enable-benchmarks
- name: test all
run: cabal test all --enable-tests
- name: haddock all
run: cabal haddock all
strategy:
matrix:
cabal:
- '3.4'
ghc:
- '9.0.2'
- '8.10.7'
name: Haskell CI
on:
- push
- pull_request
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ to use composable `Animation` wrapper similar to

### `demoLetterI` with smoothed normals

[![smoothed demo letter](./img/i_smoothed_thumb.png)](https://raw.githubusercontent.com/sorki/implicitpipe/master/img/i_smoothed_thumb.png)
[![smoothed demo letter](./img/i_smoothed_thumb.png)](https://raw.githubusercontent.com/sorki/implicitpipe/master/img/i_smoothed.png)
24 changes: 24 additions & 0 deletions cabal.project.local.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-- NOTE: having implicit listed here breaks hint
-- see https://github.com/Haskell-Things/implicitpipe/issues/2
-- but it is required for CI now
-- until 0.4
source-repository-package
type: git
location: https://github.com/Haskell-Things/ImplicitCAD
tag: ae794b901e9677593815fad741d87ff56846562d

-- fork due to resizeBuffer PR https://github.com/tobbebex/GPipe-Core/pull/76
source-repository-package
type: git
location: https://github.com/sorki/GPipe-Core
tag: 86a7b29014e7ebfb24ac17d5afcd877a38a1fbd5
subdir:
GPipe-Core

-- until next release
source-repository-package
type: git
location: https://github.com/plredmond/GPipe-GLFW
tag: 3d7e91a20a80fe31e910884b151ebe4d26e8274e
subdir:
GPipe-GLFW
18 changes: 18 additions & 0 deletions ci.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
let haskellCi =
https://raw.githubusercontent.com/sorki/github-actions-dhall/pending/haskell-ci.dhall

in haskellCi.generalCi
( [ haskellCi.BuildStep.Name
{ name = "Native dependencies"
, run =
"sudo apt install libgmp-dev libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev"
}
]
# haskellCi.matrixSteps
)
( Some
{ ghc = [ haskellCi.GHC.GHC902, haskellCi.GHC.GHC8107 ]
, cabal = [ haskellCi.Cabal.Cabal34 ]
}
)
: haskellCi.CI.Type
13 changes: 13 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Script by @fisx

set -eo pipefail
cd "$( dirname "${BASH_SOURCE[0]}" )"

echo "regenerating .github/workflows/ci.yaml..."

mkdir -p .github/workflows

# based on https://github.com/vmchale/github-actions-dhall
which dhall-to-yaml || cabal install dhall-yaml
dhall-to-yaml --file ci.dhall > .github/workflows/ci.yaml
9 changes: 8 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{ pkgs ? import <nixpkgs> { overlays = [ (import ./overlay.nix) ]; }}:
{ rev ? "c542baa0c894796c92a8173dead027f3b952c22e"
, overlays ? [ (import ./overlay.nix) ]
, pkgs ?
if ((rev == "") || (rev == "default") || (rev == "local"))
then import <nixpkgs> { inherit overlays; }
# Do not guard with hash, so the project is able to use current channels (rolling `rev`) of Nixpkgs
else import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz") { inherit overlays; }
}:

let
src = pkgs.nix-gitignore.gitignoreSource [ ] ./.;
Expand Down
4 changes: 2 additions & 2 deletions example-haskell/SomeModule.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import SomeOtherModule
res = 2

obj = union $ [
cubeR 0 False (V3 20 20 14)
cube False (V3 20 20 14)
, translate (V3 20 20 20) (sphere 15)
, translate (V3 30 20 20) (sphere 5)
, translate (V3 0 0 25) (cubeR 2 False (pure 10))
, translate (V3 0 0 25) (withRounding 2 $ cube False (pure 10))
, translate (V3 25 0 0) (cylinder2 10 4 10)
, translate (V3 (-25) 0 0) obj'
]
Expand Down
12 changes: 6 additions & 6 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ let
gpipeGlfwSrc = super.fetchFromGitHub {
owner = "plredmond";
repo = "GPipe-GLFW";
rev = "83d26eb7b41d67f5ac6fbd1bd8758d72c660e039";
sha256 = "0fg60amvp2v37cwmvfa0n7if1ppisjjh3bknmrr17m7fbfbbxlhq";
rev = "3d7e91a20a80fe31e910884b151ebe4d26e8274e";
sha256 = "0rx00mxlz6jlipx19h271mbnp8l9kzgm3dhwprwww4gf8g43r7vd";
};
in
({
Expand All @@ -25,12 +25,12 @@ in
GPipe = hsuper.callCabal2nix "GPipe" "${gpipeSrc}/GPipe-Core" {};
GPipe-GLFW = hsuper.callCabal2nix "GPipe-GLFW" ("${gpipeGlfwSrc}/GPipe-GLFW") {};

# until > 3.0.2 is out
# until > 4.0.0 is out
implicit = hsuper.callCabal2nix "implicit" (super.fetchFromGitHub {
owner = "colah";
owner = "Haskell-Things";
repo = "ImplicitCAD";
rev = "8dff5531cdc4d9ed32bf958e3945b4a3a0ef3774";
sha256 = "0bp797a9wlpyw2d6b4csz5ikqq3wy1qry0iabl7r7axjrhvnfp56";
rev = "ae794b901e9677593815fad741d87ff56846562d";
sha256 = "0q8bj3jysgl7kfivrag8g6yx58n5rxf69qsc3lw43941lamaxpda";
}) {};
});
});
Expand Down
1 change: 0 additions & 1 deletion src/Graphics/Implicit/Viewer/Loaders.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import Data.List (isSuffixOf)
import Data.Time (getCurrentTime, diffUTCTime)
import Data.Typeable (Typeable)

import Linear (V3(V3))
import Graphics.Implicit
import Graphics.Implicit.Primitives (getBox)
import Graphics.Implicit.ExtOpenScad.Definitions
Expand Down
11 changes: 4 additions & 7 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,24 @@

# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)

resolver: lts-16.25
resolver: lts-19.5

# Local packages, usually specified by relative directory name
packages:
- .

# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
extra-deps:
- storable-endian-0.2.6
- quickspec-2.1.5@sha256:1d1cc020fa9075cb5fafd4056fe1d930d5763b954fa8200e57ce6aba057544b2,3557
- twee-lib-2.2@sha256:9fe9327505d8f450a94f2fc9eea74b292901b7992d520aa1dd4f0410fbe0e594,2112
- git: git@github.com:sorki/GPipe-Core
commit: 86a7b29014e7ebfb24ac17d5afcd877a38a1fbd5
subdirs:
- GPipe-Core
- git: git@github.com:plredmond/GPipe-GLFW
commit: 83d26eb7b41d67f5ac6fbd1bd8758d72c660e039
commit: 3d7e91a20a80fe31e910884b151ebe4d26e8274e
subdirs:
- GPipe-GLFW
- git: git@github.com:colah/ImplicitCAD
commit: 8dff5531cdc4d9ed32bf958e3945b4a3a0ef3774
- git: git@github.com:Haskell-Things/ImplicitCAD
commit: ae794b901e9677593815fad741d87ff56846562d

# Override default flag values for local packages and extra-deps
flags: {}
Expand Down