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
12 changes: 8 additions & 4 deletions .ci/cabal.project.local
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ package clash-prelude
tests: True
benchmarks: True

-- clash-prelude unittests fail with dynamic executables
executable-dynamic: False

package clash-lib
ghc-options: -Werror
tests: True
Expand All @@ -30,13 +27,20 @@ package clash-cosim
ghc-options: -Werror
tests: True

-- clash-cosim unittests fail with dynamic executables
-- clash-cosim unittests fail with dynamic executables because of a bug in
-- Cabal-the-library in combination with custom setup where the library path
-- is not added to the RPATH
executable-dynamic: False

package clash-cores
ghc-options: -Werror
tests: True

-- clash-cores unittests fail with dynamic executables because of a bug in
-- Cabal-the-library in combination with custom setup where the library path
-- is not added to the RPATH
executable-dynamic: False

package clash-prelude-hedgehog
ghc-options: -Werror
tests: True
Expand Down
13 changes: 13 additions & 0 deletions .ci/find_cabal_bin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -euo pipefail

SIMPLE_PATH=$(echo dist-newstyle/build/*/*/"$1"-*/"$3"/"$2"/build/"$2"/"$2")
CUSTOM_PATH=$(echo dist-newstyle/build/*/*/"$1"-*/build/"$2"/"$2")

if [ -x "$SIMPLE_PATH" ]; then
echo "$SIMPLE_PATH"
elif [ -x "$CUSTOM_PATH" ]; then
echo "$CUSTOM_PATH"
else
echo "find_cabal_bin.sh: Could not find $1 $2" >/dev/stderr
fi
26 changes: 13 additions & 13 deletions .ci/gitlab/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,37 +82,37 @@ build:
cores:unittests:
extends: .test-nocache
script:
- ./dist-newstyle/build/*/*/clash-cores-*/t/unittests/build/unittests/unittests --hide-successes
- $(.ci/find_cabal_bin.sh clash-cores unittests t) --hide-successes

cosim:unittests:
extends: .test-nocache
script:
- ./dist-newstyle/build/*/*/clash-cosim-*/build/test/test
- $(.ci/find_cabal_bin.sh clash-cosim test t)

prelude:unittests:
extends: .test-nocache
script:
- ./dist-newstyle/build/*/*/clash-prelude-*/t/unittests/build/unittests/unittests --hide-successes
- $(.ci/find_cabal_bin.sh clash-prelude unittests t) --hide-successes

lib:doctests:
extends: .test-nocache
script:
- ./dist-newstyle/build/*/*/clash-lib-*/t/doctests/build/doctests/doctests -j${THREADS}
- $(.ci/find_cabal_bin.sh clash-lib doctests t) -j${THREADS}

lib:unittests:
extends: .test-nocache
script:
- ./dist-newstyle/build/*/*/clash-lib-*/t/unittests/build/unittests/unittests --hide-successes
- $(.ci/find_cabal_bin.sh clash-lib unittests t) --hide-successes

prelude:doctests:
extends: .test-nocache
script:
- ./dist-newstyle/build/*/*/clash-prelude-*/t/doctests/build/doctests/doctests -j${THREADS}
- $(.ci/find_cabal_bin.sh clash-prelude doctests t) -j${THREADS}

ffi:interface-tests:
extends: .test-nocache
script:
- ./dist-newstyle/build/*/*/clash-ffi-*/x/ffi-interface-tests/build/ffi-interface-tests/ffi-interface-tests --smallcheck-max-count 2000
- $(.ci/find_cabal_bin.sh clash-ffi ffi-interface-tests x) --smallcheck-max-count 2000

# Tests run on local fast machines:

Expand All @@ -128,25 +128,25 @@ build-clash-dev:
suite:vhdl:
extends: .test-cache-local
script:
- ./dist-newstyle/build/*/*/clash-testsuite-*/x/clash-testsuite/build/clash-testsuite/clash-testsuite -j$THREADS -p .VHDL --hide-successes --no-vivado
- $(.ci/find_cabal_bin.sh clash-testsuite clash-testsuite x) -j${THREADS} -p .VHDL --hide-successes --no-vivado

suite:verilog:
extends: .test-cache-local
script:
- ./dist-newstyle/build/*/*/clash-testsuite-*/x/clash-testsuite/build/clash-testsuite/clash-testsuite -j$THREADS -p .Verilog --hide-successes --no-vivado
- $(.ci/find_cabal_bin.sh clash-testsuite clash-testsuite x) -j${THREADS} -p .Verilog --hide-successes --no-vivado

suite:systemverilog:
extends: .test-cache-local
script:
- ./dist-newstyle/build/*/*/clash-testsuite-*/x/clash-testsuite/build/clash-testsuite/clash-testsuite -j$THREADS -p .SystemVerilog --hide-successes --no-modelsim --no-vivado
- $(.ci/find_cabal_bin.sh clash-testsuite clash-testsuite x) -j${THREADS} -p .SystemVerilog --hide-successes --no-modelsim --no-vivado

# Vivado is quite slow, so we only run a subset of the tests on development branches
# with it. The full testsuite gets run with Vivado every night on 'master'.
suite:cores:
extends: .test-cache-local
script:
- source /opt/tools/Xilinx/Vivado/2022.1/settings64.sh
- ./dist-newstyle/build/*/*/clash-testsuite-*/x/clash-testsuite/build/clash-testsuite/clash-testsuite -j$THREADS -p Cores --hide-successes --no-modelsim --no-ghdl --no-iverilog --no-verilator --no-symbiyosys
- $(.ci/find_cabal_bin.sh clash-testsuite clash-testsuite x) -j$THREADS -p Cores --hide-successes --no-modelsim --no-ghdl --no-iverilog --no-verilator --no-symbiyosys
tags:
- local
- vivado-2022.1-standard
Expand Down Expand Up @@ -195,7 +195,7 @@ suite:vivado:verilog:
extends: .test-cache-local-nightly
script:
- source /opt/tools/Xilinx/Vivado/2022.1/settings64.sh
- ./dist-newstyle/build/*/*/clash-testsuite-*/x/clash-testsuite/build/clash-testsuite/clash-testsuite -j$THREADS -p .Verilog --hide-successes --no-modelsim --no-ghdl --no-iverilog --no-verilator --no-symbiyosys
- $(.ci/find_cabal_bin.sh clash-testsuite clash-testsuite x) -j$THREADS -p .Verilog --hide-successes --no-modelsim --no-ghdl --no-iverilog --no-verilator --no-symbiyosys
tags:
- local
- vivado-2022.1-standard
Expand All @@ -215,7 +215,7 @@ suite:vivado:verilog:
# extends: .test-cache-local-nightly
# script:
# - source /opt/tools/Xilinx/Vivado/2022.1/settings64.sh
# - ./dist-newstyle/build/*/*/clash-testsuite-*/x/clash-testsuite/build/clash-testsuite/clash-testsuite -j$THREADS -p .VHDL --hide-successes --no-modelsim --no-ghdl --no-iverilog --no-verilator --no-symbiyosys
# - $(.ci/find_cabal_bin.sh clash-testsuite clash-testsuite x) -j$THREADS -p .VHDL --hide-successes --no-modelsim --no-ghdl --no-iverilog --no-verilator --no-symbiyosys
# tags:
# - local
# - vivado-2022.1-standard
27 changes: 27 additions & 0 deletions .ci/stack-9.6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
resolver: lts-22.9

ghc-options:
"$locals": -Wall -Wcompat

packages:
- clash-prelude
- clash-prelude-hedgehog
- clash-lib
- clash-lib-hedgehog
- clash-ghc
- clash-cores
- tests

extra-deps:
- ansi-terminal-0.11.5@sha256:2fe3d006b9ea0dc1a5537a029edb0bc2bbe56a33a6d95264b38b54c58e931e51,3752
- hedgehog-1.2@sha256:cb20b0f1dad7a7e4461085ea2d8ef084a19d0d5f137133bf88d1fd2f7ce9a5aa,4561
- hedgehog-fakedata-0.0.1.5@sha256:d8059e4ef9b7b4112bef9791300118f3a2d776bb191e50b41635a411af609428,1424
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763

# TODO: Remove this workaround. See:
#
# https://github.com/clash-lang/clash-compiler/pull/2665#issuecomment-1939044550
- git: https://github.com/haskell/cabal.git
commit: a3865991986361b3a736007f620b6a8878d178e3
subdirs:
- Cabal
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
os: ["macOS", "windows"]
ghc: ["8.6", "8.8", "8.10", "9.0", "9.2", "9.4"]
ghc: ["8.6", "8.8", "8.10", "9.0", "9.2", "9.4", "9.6"]
exclude:
# Some tests fail with a mysterious -11 error code.
- os: macOS
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
if: ${{ runner.os == 'Windows' }}
uses: actions/cache@v3
with:
# On windows we have to use "\" as a path seperator, otherwise caching fails
# On windows we have to use "\" as a path separator, otherwise caching fails
path: |
${{ steps.setup-haskell.outputs.stack-root }}\snapshots
key: ${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('stack.yaml', '**/*.cabal', '.github/workflows/ci.yml') }}
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,18 @@ Note that release branches might contain non-released patches.
## GHC compatibility
| | Linux | Windows | macOS | Clash (released) | Clash (development version)
|------|-------|---------|-------|------------------|--------------------------
| 8.6 | ✔️ | ✔️ | ✔️ | 1.0 - 1.6 | ✔️
| 8.8 | ✔️ | ❌ | ✔️ | 1.0 - 1.6 | ✔️
| 8.10 | ✔️ | ✔️ | ❌ | 1.2 - 1.6 | ✔️
| 9.0 | ✔️ | ✔️² | ✔️ | 1.4 - 1.6 | ✔️
| 9.2 | ⚠️¹ | ⚠️¹ | ⚠️¹ | | ⚠️¹️
| 9.4 | ✔️ | ✔️ | ✔️ | | ✔️
| 9.6 | ✔️ | ❔³ | ❔³ | | ✔️
| 8.6 | ✔️ | ✔️ | ✔️ | 1.0 - 1.8 |
| 8.8 | ✔️ | ❌ | ✔️ | 1.0 - 1.8 |
| 8.10 | ✔️ | ✔️ | ❌ | 1.2 - 1.8 | ✔️
| 9.0 | ✔️ | ✔️² | ✔️ | 1.4 - 1.8 | ✔️
| 9.2 | ⚠️¹ | ⚠️¹ | ⚠️¹ | 1.8 | ⚠️¹️
| 9.4 | ✔️ | ✔️ | ✔️ | 1.8 | ✔️
| 9.6 | ✔️ | ✔️ | ✔️ | 1.8 | ✔️

¹ GHC 9.2 contains a regression, rendering Clash error messages indecipherable. This change was reverted in 9.4.

² GHC 9.0.2 on Windows fails to compile `clash-cores`. We therefore don't run the Clash testsuite on CI for this combination.

³ We use Stack to test on Windows/macOS. There is no resolver yet that uses GHC 9.6, so this remains untested.

## Cabal
To use Cabal you need both Cabal and GHC installed on your system. We recommend using [ghcup](https://www.haskell.org/ghcup/). For more information, see [https://www.haskell.org/downloads/](https://www.haskell.org/downloads/).

Expand Down
13 changes: 12 additions & 1 deletion clash-cores/clash-cores.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ maintainer: devops@qbaylogic.com
copyright: Copyright © 2019 , Foamspace Corp.,
2022-2023, QBayLogic B.V.
category: Hardware
build-type: Simple
-- TODO: Revert to "Simple". See:
--
-- https://github.com/clash-lang/clash-compiler/pull/2665#issuecomment-1939044550
build-type: Custom
extra-source-files: CHANGELOG.md

flag doctests
Expand All @@ -39,6 +42,14 @@ flag nix
default: False
manual: True

-- TODO: Remove this workaround. See:
--
-- https://github.com/clash-lang/clash-compiler/pull/2665#issuecomment-1939044550
custom-setup
setup-depends:
base,
Cabal

common basic-config
default-language: Haskell2010

Expand Down