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

Add AXI4 #22

Merged
merged 12 commits into from
Jan 28, 2022
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
41 changes: 0 additions & 41 deletions .ci/docker/Dockerfile

This file was deleted.

24 changes: 0 additions & 24 deletions .ci/docker/build-and-publish-docker-image.sh

This file was deleted.

26 changes: 0 additions & 26 deletions .ci/setup.sh

This file was deleted.

11 changes: 11 additions & 0 deletions .ci/test_whitespace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -xou pipefail

grep \
-E ' $' -n -r . \
--include=*.{hs,hs-boot,sh,cabal,md,yml} \
--exclude-dir=dist-newstyle --exclude-dir=deps
if [[ $? == 0 ]]; then
echo "EOL whitespace detected. See ^"
exit 1;
fi
96 changes: 96 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: CI

# Trigger the workflow on all pull requests and pushes/merges to master branch
on:
pull_request:
push:
branches: [master]

jobs:
stack:
name: Stack tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Stack / GHC
uses: haskell/actions/setup@v1
with:
ghc-version: '8.10.7' # Exact version of ghc to use
enable-stack: true
stack-version: 'latest'

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.stack
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ github.ref }}-${{ github.sha }}
${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ github.ref }}-
${{ runner.os }}-ghc-${{ matrix.ghc }}-

# Ask Stack to use system GHC instead of installing its own copy
- name: Use system GHC
run: |
stack config set system-ghc --global true

- name: Test with Stack
run: |
.ci/test_stack.sh

cabal:
name: Cabal tests - ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
cabal:
- "3.2"
ghc:
- "8.10.7"

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Haskell
uses: haskell/actions/setup@v1
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cabal
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ github.ref }}-${{ github.sha }}
${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ github.ref }}-
${{ runner.os }}-ghc-${{ matrix.ghc }}-

- name: Build
run: |
cabal build all -fci

- name: Test
run: |
.ci/test_cabal.sh

- name: Documentation
run: |
.ci/build_docs.sh

linting:
name: Source code linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Whitespace
run: |
.ci/test_whitespace.sh
48 changes: 0 additions & 48 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ package clash-prelude
source-repository-package
type: git
location: https://github.com/cchalmers/circuit-notation.git
tag: 0fe897cb95bd1be87abed044f4072f104dec2f7d
tag: 2574640364eef12222517af059b9e4a7e6b503a7

source-repository-package
type: git
Expand Down
14 changes: 12 additions & 2 deletions clash-protocols.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,29 @@ library
build-depends:
-- inline-circuit-notation
circuit-notation
, extra
, data-default
, deepseq
, hedgehog >= 1.0.2
, extra
, ghc >= 8.6
, hedgehog >= 1.0.2
, pretty-show
, strict-tuple

-- To be removed; we need 'Test.Tasty.Hedgehog.Extra' to fix upstream issues
, tasty >= 1.2 && < 1.5
, tasty-hedgehog

exposed-modules:
Protocols

Protocols.Axi4.Common

Protocols.Axi4.ReadAddress
Protocols.Axi4.ReadData
Protocols.Axi4.WriteAddress
Protocols.Axi4.WriteData
Protocols.Axi4.WriteResponse

Protocols.Df
Protocols.DfLike
Protocols.Hedgehog
Expand Down
2 changes: 1 addition & 1 deletion src/Protocols.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module Protocols
, def

-- * Circuit notation plugin
, circuit
, circuit, (-<)
) where

import Data.Default (def)
Expand Down
Loading