diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ef657c5..2328b4d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -19,7 +19,7 @@ RUN \ USER "$USER_NAME" ENV PATH="/home/$USER_NAME/.cabal/bin:/home/$USER_NAME/.ghcup/bin:$PATH" -ARG GHC_VERSION=9.2.1 +ARG GHC_VERSION=9.0.1 RUN \ ghcup install ghc "$GHC_VERSION" --set && \ ghc --version @@ -28,3 +28,8 @@ ARG CABAL_VERSION=3.6.2.0 RUN \ ghcup install cabal "$CABAL_VERSION" --set && \ cabal --version + +ARG HLS_VERSION=1.4.0 +RUN \ + ghcup install hls "$HLS_VERSION" --set && \ + haskell-language-server-wrapper --version diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 466e206..0189cb7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,38 +2,34 @@ name: CI on: pull_request: branches: - - master + - main push: branches: - - master + - main jobs: build: strategy: fail-fast: false matrix: os: - - macos-10.15 - - ubuntu-18.04 + - macos-11 + - ubuntu-20.04 - windows-2019 ghc: - - 8.10.2 + - 9.0.1 cabal: - - 3.2.0.0 - include: - - os: ubuntu-18.04 - ghc: 8.8.4 - cabal: 3.2.0.0 - - os: ubuntu-18.04 - ghc: 8.6.5 - cabal: 3.2.0.0 + - 3.6.2.0 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 + - run: mkdir artifact + - run: mkdir artifact/${{ matrix.os }} - id: setup-haskell - uses: actions/setup-haskell@v1 + uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} + - run: cabal configure --enable-tests - run: cabal freeze - run: cat cabal.project.freeze - uses: actions/cache@v2 @@ -43,24 +39,12 @@ jobs: restore-keys: | ${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}- ${{ matrix.os }}-${{ matrix.ghc }}- + - run: cabal build + - run: cabal install --installdir artifact/${{ matrix.os }} --install-method copy - run: cabal test --test-show-details direct - - run: cabal install --installdir output --install-method copy - - run: strip output/brittany* + - run: cabal check + - run: cabal sdist --output-dir artifact/${{ matrix.os }} - uses: actions/upload-artifact@v2 with: - path: output/brittany* - name: brittany-${{ matrix.os }}-ghc-${{ matrix.ghc }}-${{ github.sha }} - - if: matrix.os == 'ubuntu-18.04' && matrix.ghc == '8.10.2' - uses: actions/upload-artifact@v2 - with: - path: dist-newstyle/sdist/brittany-*.tar.gz - name: brittany-${{ github.sha }}.tar.gz - - run: cabal check - - - nix: - runs-on: ubuntu-latest - steps: - - uses: cachix/install-nix-action@v12 - - uses: actions/checkout@v2 - - run: nix-build + path: artifact + name: brittany-${{ github.sha }} diff --git a/.gitignore b/.gitignore index 4cdb828..f04e47c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,8 @@ local/ .cabal-sandbox/ .stack-work/ cabal.sandbox.config -cabal.project.local +cabal.project.local* +cabal.project.freeze .ghc.environment.* result .stack-work* diff --git a/brittany.cabal b/brittany.cabal index fa058f4..f533c7f 100644 --- a/brittany.cabal +++ b/brittany.cabal @@ -91,8 +91,8 @@ library { -fno-warn-redundant-constraints } build-depends: - { base >=4.12 && <4.15 - , ghc >=8.6.1 && <8.11 + { base >=4.12 && <4.16 + , ghc >=8.6.1 && <8.11 || >=9.0.1 && <9.1 , ghc-paths >=0.1.0.9 && <0.2 , ghc-exactprint >=0.5.8 && <0.6.5 , transformers >=0.5.2.0 && <0.6 @@ -118,7 +118,7 @@ library { , semigroups >=0.18.2 && <0.20 , cmdargs >=0.10.14 && <0.11 , czipwith >=1.0.1.0 && <1.1 - , ghc-boot-th >=8.6.1 && <8.11 + , ghc-boot-th >=8.6.1 && <8.11 || >=9.0.1 && <9.1 , filepath >=1.4.1.0 && <1.5 , random >= 1.1 && <1.3 } diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000..6d724ea --- /dev/null +++ b/cabal.project @@ -0,0 +1,12 @@ +packages: . + +allow-newer: + , butcher:base + , data-tree-print:base + , multistate:base + +-- https://github.com/lspitzner/czipwith/pull/2 +source-repository-package + type: git + location: https://github.com/mithrandi/czipwith + tag: b6245884ae83e00dd2b5261762549b37390179f8