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
38 changes: 38 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches: [master, staging]
pull_request:
branches: [master, staging]
workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v16
name: Set up nix and IOHK cache
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v10
with:
name: mlabs
authToken: "${{ secrets.CACHIXKEY }}"
- name: Cache cabal folder
id: cabal
uses: actions/cache@v2.1.4
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-cabal
- name: Check files and build
run: make ci

10 changes: 10 additions & 0 deletions .hlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- ignore: {name: "Use <$>"}
- warn: {name: "Use explicit module export list"}
- warn: {name: "Use fewer imports"}
- warn: {name: "Use fewer LANGUAGE pragmas"}
- warn: {name: "Unused LANGUAGE pragma"}
- warn: {name: "Use DerivingStrategies"}
- ignore: {name: "Use newtype instead of data"}
- modules:
- {name: [PlutusTx.Prelude], as: PlutusTx, message: "You would make the MLabs styleguide happy."}
- {name: [Prelude], as: Hask, message: "You would make the MLabs styleguide happy."}
1 change: 1 addition & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2086
89 changes: 0 additions & 89 deletions .travis.yml

This file was deleted.

37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
current-system := $(shell nix eval --impure --expr builtins.currentSystem)

NIX_BUILD:= nix -L --show-trace build
NIX_RUN:= nix -L --show-trace run

# Tests
test:
$(NIX_BUILD) .#checks.${current-system}.purescript-bridge:test:tests

test-all: test

# Build all
build-all:
$(NIX_BUILD) .#build-all.${current-system}

build-test-all: build-all test-all

# Fix files
fix-files:
$(NIX_RUN) .#$@.${current-system}

# Check files
check-files:
$(NIX_BUILD) .#$@.${current-system}

# Run what CI would
ci: check-files build-all

# Clean local folder.
clean:
@ rm -rf dist-newstyle || true
@ rm -rf .psc-ide-port || true
@ rm -rf ./test/RoundTrip/app/dist || true
@ rm -rf ./test/RoundTrip/app/output || true
@ rm -rf ./test/RoundTrip/app/.spago || true
@ rm -rf ./test/RoundTrip/app/.psci_modules || true
@ rm -rf ./test/RoundTrip/app/.spago2nix || true
1 change: 1 addition & 0 deletions Setup.hs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import Distribution.Simple

main = defaultMain
30 changes: 30 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
index-state: 2022-01-22T00:00:00Z

packages: .

tests: true

write-ghc-environment-files: never

test-show-details: streaming

allow-newer:
-- Pins to an old version of Template Haskell, unclear if/when it will be updated
size-based:template-haskell
, ouroboros-consensus-byron:formatting
, beam-core:aeson
, beam-sqlite:aeson
, beam-sqlite:dlist
, beam-migrate:aeson

constraints:
-- big breaking change here, inline-r doens't have an upper bound
singletons < 3.0
-- bizarre issue: in earlier versions they define their own 'GEq', in newer
-- ones they reuse the one from 'some', but there isn't e.g. a proper version
-- constraint from dependent-sum-template (which is the library we actually use).
, dependent-sum > 0.6.2.0
-- Newer Hashable have instances for Set, which breaks beam-migrate
-- which declares its own instances of Hashable Set
, hashable < 1.3.4.0

Loading