Skip to content

Commit 44edf92

Browse files
authored
Merge pull request #7 from Haskell-Things/updateImplicit
Update implicit and deps
2 parents 16e3dbc + cd199d7 commit 44edf92

File tree

10 files changed

+123
-18
lines changed

10 files changed

+123
-18
lines changed

.github/workflows/ci.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
jobs:
2+
build:
3+
runs-on: ubuntu-latest
4+
steps:
5+
- name: Native dependencies
6+
run: sudo apt install libgmp-dev libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev
7+
- uses: "actions/checkout@v3"
8+
- id: setup-haskell-cabal
9+
uses: "haskell/actions/setup@v2"
10+
with:
11+
cabal-version: "${{ matrix.cabal }}"
12+
enable-stack: false
13+
ghc-version: "${{ matrix.ghc }}"
14+
- name: Update Hackage repository
15+
run: cabal update
16+
- name: cabal.project.local.ci
17+
run: |
18+
if [ -e cabal.project.local.ci ]; then
19+
cp cabal.project.local.ci cabal.project.local
20+
fi
21+
- name: freeze
22+
run: cabal freeze
23+
- uses: "actions/cache@v3"
24+
with:
25+
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}"
26+
path: |
27+
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
28+
dist-newstyle
29+
- name: Install dependencies
30+
run: cabal build all --enable-tests --enable-benchmarks --only-dependencies
31+
- name: build all
32+
run: cabal build all --enable-tests --enable-benchmarks
33+
- name: test all
34+
run: cabal test all --enable-tests
35+
- name: haddock all
36+
run: cabal haddock all
37+
strategy:
38+
matrix:
39+
cabal:
40+
- '3.4'
41+
ghc:
42+
- '9.0.2'
43+
- '8.10.7'
44+
name: Haskell CI
45+
on:
46+
- push
47+
- pull_request

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,4 @@ to use composable `Animation` wrapper similar to
137137

138138
### `demoLetterI` with smoothed normals
139139

140-
[![smoothed demo letter](./img/i_smoothed_thumb.png)](https://raw.githubusercontent.com/sorki/implicitpipe/master/img/i_smoothed_thumb.png)
140+
[![smoothed demo letter](./img/i_smoothed_thumb.png)](https://raw.githubusercontent.com/sorki/implicitpipe/master/img/i_smoothed.png)

cabal.project.local.ci

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-- NOTE: having implicit listed here breaks hint
2+
-- see https://github.com/Haskell-Things/implicitpipe/issues/2
3+
-- but it is required for CI now
4+
-- until 0.4
5+
source-repository-package
6+
type: git
7+
location: https://github.com/Haskell-Things/ImplicitCAD
8+
tag: ae794b901e9677593815fad741d87ff56846562d
9+
10+
-- fork due to resizeBuffer PR https://github.com/tobbebex/GPipe-Core/pull/76
11+
source-repository-package
12+
type: git
13+
location: https://github.com/sorki/GPipe-Core
14+
tag: 86a7b29014e7ebfb24ac17d5afcd877a38a1fbd5
15+
subdir:
16+
GPipe-Core
17+
18+
-- until next release
19+
source-repository-package
20+
type: git
21+
location: https://github.com/plredmond/GPipe-GLFW
22+
tag: 3d7e91a20a80fe31e910884b151ebe4d26e8274e
23+
subdir:
24+
GPipe-GLFW

ci.dhall

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
let haskellCi =
2+
https://raw.githubusercontent.com/sorki/github-actions-dhall/pending/haskell-ci.dhall
3+
4+
in haskellCi.generalCi
5+
( [ haskellCi.BuildStep.Name
6+
{ name = "Native dependencies"
7+
, run =
8+
"sudo apt install libgmp-dev libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev"
9+
}
10+
]
11+
# haskellCi.matrixSteps
12+
)
13+
( Some
14+
{ ghc = [ haskellCi.GHC.GHC902, haskellCi.GHC.GHC8107 ]
15+
, cabal = [ haskellCi.Cabal.Cabal34 ]
16+
}
17+
)
18+
: haskellCi.CI.Type

ci.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
# Script by @fisx
3+
4+
set -eo pipefail
5+
cd "$( dirname "${BASH_SOURCE[0]}" )"
6+
7+
echo "regenerating .github/workflows/ci.yaml..."
8+
9+
mkdir -p .github/workflows
10+
11+
# based on https://github.com/vmchale/github-actions-dhall
12+
which dhall-to-yaml || cabal install dhall-yaml
13+
dhall-to-yaml --file ci.dhall > .github/workflows/ci.yaml

default.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
{ pkgs ? import <nixpkgs> { overlays = [ (import ./overlay.nix) ]; }}:
1+
{ rev ? "c542baa0c894796c92a8173dead027f3b952c22e"
2+
, overlays ? [ (import ./overlay.nix) ]
3+
, pkgs ?
4+
if ((rev == "") || (rev == "default") || (rev == "local"))
5+
then import <nixpkgs> { inherit overlays; }
6+
# Do not guard with hash, so the project is able to use current channels (rolling `rev`) of Nixpkgs
7+
else import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz") { inherit overlays; }
8+
}:
29

310
let
411
src = pkgs.nix-gitignore.gitignoreSource [ ] ./.;

example-haskell/SomeModule.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import SomeOtherModule
99
res = 2
1010

1111
obj = union $ [
12-
cubeR 0 False (V3 20 20 14)
12+
cube False (V3 20 20 14)
1313
, translate (V3 20 20 20) (sphere 15)
1414
, translate (V3 30 20 20) (sphere 5)
15-
, translate (V3 0 0 25) (cubeR 2 False (pure 10))
15+
, translate (V3 0 0 25) (withRounding 2 $ cube False (pure 10))
1616
, translate (V3 25 0 0) (cylinder2 10 4 10)
1717
, translate (V3 (-25) 0 0) obj'
1818
]

overlay.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ let
1313
gpipeGlfwSrc = super.fetchFromGitHub {
1414
owner = "plredmond";
1515
repo = "GPipe-GLFW";
16-
rev = "83d26eb7b41d67f5ac6fbd1bd8758d72c660e039";
17-
sha256 = "0fg60amvp2v37cwmvfa0n7if1ppisjjh3bknmrr17m7fbfbbxlhq";
16+
rev = "3d7e91a20a80fe31e910884b151ebe4d26e8274e";
17+
sha256 = "0rx00mxlz6jlipx19h271mbnp8l9kzgm3dhwprwww4gf8g43r7vd";
1818
};
1919
in
2020
({
@@ -25,12 +25,12 @@ in
2525
GPipe = hsuper.callCabal2nix "GPipe" "${gpipeSrc}/GPipe-Core" {};
2626
GPipe-GLFW = hsuper.callCabal2nix "GPipe-GLFW" ("${gpipeGlfwSrc}/GPipe-GLFW") {};
2727

28-
# until > 3.0.2 is out
28+
# until > 4.0.0 is out
2929
implicit = hsuper.callCabal2nix "implicit" (super.fetchFromGitHub {
30-
owner = "colah";
30+
owner = "Haskell-Things";
3131
repo = "ImplicitCAD";
32-
rev = "8dff5531cdc4d9ed32bf958e3945b4a3a0ef3774";
33-
sha256 = "0bp797a9wlpyw2d6b4csz5ikqq3wy1qry0iabl7r7axjrhvnfp56";
32+
rev = "ae794b901e9677593815fad741d87ff56846562d";
33+
sha256 = "0q8bj3jysgl7kfivrag8g6yx58n5rxf69qsc3lw43941lamaxpda";
3434
}) {};
3535
});
3636
});

src/Graphics/Implicit/Viewer/Loaders.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import Data.List (isSuffixOf)
1616
import Data.Time (getCurrentTime, diffUTCTime)
1717
import Data.Typeable (Typeable)
1818

19-
import Linear (V3(V3))
2019
import Graphics.Implicit
2120
import Graphics.Implicit.Primitives (getBox)
2221
import Graphics.Implicit.ExtOpenScad.Definitions

stack.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,24 @@
22

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

5-
resolver: lts-16.25
5+
resolver: lts-19.5
66

77
# Local packages, usually specified by relative directory name
88
packages:
99
- .
1010

1111
# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
1212
extra-deps:
13-
- storable-endian-0.2.6
14-
- quickspec-2.1.5@sha256:1d1cc020fa9075cb5fafd4056fe1d930d5763b954fa8200e57ce6aba057544b2,3557
15-
- twee-lib-2.2@sha256:9fe9327505d8f450a94f2fc9eea74b292901b7992d520aa1dd4f0410fbe0e594,2112
1613
- git: git@github.com:sorki/GPipe-Core
1714
commit: 86a7b29014e7ebfb24ac17d5afcd877a38a1fbd5
1815
subdirs:
1916
- GPipe-Core
2017
- git: git@github.com:plredmond/GPipe-GLFW
21-
commit: 83d26eb7b41d67f5ac6fbd1bd8758d72c660e039
18+
commit: 3d7e91a20a80fe31e910884b151ebe4d26e8274e
2219
subdirs:
2320
- GPipe-GLFW
24-
- git: git@github.com:colah/ImplicitCAD
25-
commit: 8dff5531cdc4d9ed32bf958e3945b4a3a0ef3774
21+
- git: git@github.com:Haskell-Things/ImplicitCAD
22+
commit: ae794b901e9677593815fad741d87ff56846562d
2623

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

0 commit comments

Comments
 (0)