From bc0d6a6115322cf7add59492be2e04e3ab9e3188 Mon Sep 17 00:00:00 2001 From: sss-create <72546851@posteo.jp> Date: Tue, 14 Jan 2025 09:52:59 +0100 Subject: [PATCH 1/3] updated CI workflows for Nix, Linux (cabal, stack) and Windows; hosc downgrade because of breaking changes in hosc 0.21 (see issue #1103) --- .github/workflows/ci.yml | 61 ++++++++++++++--------------------- .github/workflows/nix.yml | 20 ++++++------ .github/workflows/windows.yml | 50 ++++++++++++++++++++++++++++ README.md | 20 ++++++------ tidal.cabal | 8 ++--- 5 files changed, 96 insertions(+), 63 deletions(-) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce9e6e74f..699e4394b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: ci +name: Linux on: push: paths-ignore: @@ -9,41 +9,51 @@ on: jobs: cabal: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: versions: + # latest - ghc: latest cabal: latest args: --allow-newer=base,template-haskell experimental: true - - ghc: 9.4.1 - cabal: 3.8.1.0 + # a bit newer + - ghc: 9.8.2 + cabal: 3.12.1.0 args: --allow-newer=base,template-haskell experimental: false - - ghc: 9.0.1 - cabal: 3.4.0.0 + # ghcup recommended + - ghc: 9.4.8 + cabal: 3.12.1.0 args: --allow-newer=base,template-haskell experimental: false - - ghc: 8.10.1 - cabal: 3.4.0.0 + # debian stable + - ghc: 9.0.2 + cabal: 3.4.1.0 args: --allow-newer=base,template-haskell experimental: false - - ghc: 8.8.3 - cabal: 3.4.0.0 + ## 8.x + - ghc: 8.10.7 + cabal: 3.6.2.0-p1 + args: --allow-newer=base,template-haskell + experimental: false + - ghc: 8.8.4 + cabal: 3.6.2.0-p1 args: --allow-newer=base,template-haskell experimental: false - ghc: 8.6.5 - cabal: 3.4.0.0 + cabal: 3.6.2.0-p1 + args: --allow-newer=base,template-haskell experimental: false continue-on-error: ${{ matrix.versions.experimental }} name: cabal ${{ matrix.versions.cabal }} - ghc ${{ matrix.versions.ghc }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cabal/packages @@ -52,7 +62,7 @@ jobs: key: cabal-${{ runner.os }}-${{ matrix.versions.ghc }} - name: install cabal and ghc - uses: haskell/actions/setup@v1 + uses: haskell-actions/setup@v2 with: ghc-version: ${{ matrix.versions.ghc }} cabal-version: ${{ matrix.versions.cabal }} @@ -65,27 +75,4 @@ jobs: - name: test run: cabal v2-test ${{ matrix.versions.args }} --enable-tests --enable-benchmarks all - stack: - runs-on: ubuntu-latest - name: stack resolver - steps: - - uses: actions/checkout@v3 - - - name: Set nightly resolver version - run: echo "LTS_RESOLVER=$(stack ls snapshots --lts remote | tail -3 | head -1 | awk '{print $3}')" >> $GITHUB_ENV - - name: cache ~/.stack - uses: actions/cache@v3 - with: - path: | - ~/.stack - key: stack-${{ runner.os }}-${{ env.LTS_RESOLVER }} - - - name: install stack and ghc - uses: haskell/actions/setup@v1 - with: - enable-stack: true - ghc-version: latest - - - name: test - run: stack --no-terminal --resolver ${{ env.LTS_RESOLVER }} --system-ghc test --haddock --no-haddock-deps diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 44f66746f..0b9343290 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -1,6 +1,4 @@ -# A set of CI jobs for checking the Nix flake. - -name: "nix" +name: Nix on: push: paths-ignore: @@ -11,19 +9,19 @@ on: jobs: cancel-previous-runs: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 + uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ github.token }} nix-fmt-check: needs: cancel-previous-runs - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v2.4.0 - - uses: cachix/install-nix-action@v22 + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v30 with: nix_path: nixpkgs=channel:nixos-unstable - run: nix fmt -- --check ./ @@ -33,11 +31,11 @@ jobs: strategy: matrix: package: [tidal, tidal-link, tidal-parse] - os: [ubuntu-latest, macos-latest] + os: [ubuntu-24.04, macos-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2.4.0 - - uses: cachix/install-nix-action@v22 + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v30 with: nix_path: nixpkgs=channel:nixos-unstable - run: nix build --print-build-logs --no-update-lock-file .#${{ matrix.package }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 000000000..25bbef580 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,50 @@ +name: Windows +on: + push: + paths-ignore: + - "**.md" + pull_request: + paths-ignore: + - "**.md" + +jobs: + cabal: + runs-on: windows-latest + strategy: + matrix: + versions: + # ghcup recommended + - ghc: 9.4.8 + cabal: 3.12.1.0 + args: --allow-newer=base,template-haskell + experimental: false + + continue-on-error: ${{ matrix.versions.experimental }} + name: cabal ${{ matrix.versions.cabal }} - ghc ${{ matrix.versions.ghc }} + steps: + - uses: actions/checkout@v4 + + - name: cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle + uses: actions/cache@v4 + with: + path: | + ~/.cabal/packages + ~/.cabal/store + dist-newstyle + key: cabal-${{ runner.os }}-${{ matrix.versions.ghc }} + + - name: install cabal and ghc + uses: haskell-actions/setup@v2 + with: + ghc-version: ${{ matrix.versions.ghc }} + cabal-version: ${{ matrix.versions.cabal }} + + - name: update + run: cabal v2-update + + - name: build + run: cabal v2-build ${{ matrix.versions.args }} --enable-tests --enable-benchmarks all + + - name: test + run: cabal v2-test ${{ matrix.versions.args }} --enable-tests --enable-benchmarks all + diff --git a/README.md b/README.md index 95ade5222..bc68e586f 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,14 @@ -Tidal [![Build Status](https://github.com/tidalcycles/Tidal/workflows/ci/badge.svg)](https://github.com/tidalcycles/Tidal/actions) -===== +# Tidal License +Cabal +Stack +Nix +Windows + Language for live coding algorithmic patterns -For documentation, mailing list and more info see here: - https://tidalcycles.org/ - -You can help speed up Tidal development by contributing to the collective fund here: - https://opencollective.com/tidalcycles - -(c) Alex McLean and contributors, 2022 - -Distributed under the terms of the GNU Public license version 3 (or later). +For documentation, mailing list and more info see [here](https://tidalcycles.org/). +You can help speed up Tidal development by [contributing to the collective fund](https://opencollective.com/tidalcycles)! +(c) Alex McLean and contributors, 2025 diff --git a/tidal.cabal b/tidal.cabal index dacae3ff6..6c06c3c27 100644 --- a/tidal.cabal +++ b/tidal.cabal @@ -10,10 +10,10 @@ license-file: LICENSE author: Alex McLean maintainer: Alex McLean , Mike Hodnick Stability: Experimental -Copyright: (c) Alex McLean and other contributors, 2021 +Copyright: (c) Alex McLean and other contributors, 2025 category: Sound build-type: Simple -tested-with: GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1, GHC == 9.0.1, GHC == 9.4.8, GHC == 9.8.2 +tested-with: GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.4.8, GHC == 9.8.2 data-files: BootTidal.hs Extra-source-files: README.md CHANGELOG.md tidal.el @@ -61,7 +61,7 @@ library base >=4.8 && <5 , containers < 0.8 , colour < 2.4 - , hosc >= 0.21 && < 0.22 + , hosc >= 0.20 && < 0.21 , text < 2.2 , parsec >= 3.1.12 && < 3.2 , network < 3.3 @@ -96,7 +96,7 @@ test-suite tests build-depends: base ==4.* , microspec >= 0.2.0.1 - , hosc >= 0.21 && < 0.22 + , hosc >= 0.20 && < 0.21 , containers , parsec , tidal From 626dfb8a8b4db0a3271e83c28fb6420d176da45d Mon Sep 17 00:00:00 2001 From: sss-create <72546851@posteo.jp> Date: Tue, 14 Jan 2025 09:58:20 +0100 Subject: [PATCH 2/3] hosc downgrade in tidal-listener also --- tidal-listener/tidal-listener.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidal-listener/tidal-listener.cabal b/tidal-listener/tidal-listener.cabal index cb9fd740f..c97a3f71e 100644 --- a/tidal-listener/tidal-listener.cabal +++ b/tidal-listener/tidal-listener.cabal @@ -27,7 +27,7 @@ library deepseq, optparse-applicative, tidal >= 1.10 && < 1.11, - hosc >= 0.21 && < 0.22, + hosc >= 0.20 && < 0.21, hint, network default-language: Haskell2010 From 9a88ee5cadb4fa0846fb594fbea7f7699d8f0838 Mon Sep 17 00:00:00 2001 From: sss-create <72546851@posteo.jp> Date: Tue, 14 Jan 2025 10:10:34 +0100 Subject: [PATCH 3/3] dedicated stack CI workflow --- .github/workflows/stack.yml | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/stack.yml diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml new file mode 100644 index 000000000..3065a3233 --- /dev/null +++ b/.github/workflows/stack.yml @@ -0,0 +1,63 @@ +# partly taken from xmonad stack CI +name: Stack + +on: + push: + paths-ignore: + - "**.md" + pull_request: + paths-ignore: + - "**.md" + +jobs: + stack: + name: stack resolver + runs-on: ubuntu-24.04 + strategy: + matrix: + include: + - resolver: lts-22 + + steps: + - uses: actions/checkout@v4 + + - name: cache ~/.stack + uses: actions/cache@v4 + with: + path: | + ~/.stack + key: stack-${{ runner.os }}-${{ matrix.resolver }} + + - name: install stack and ghc + uses: haskell-actions/setup@v2 + with: + enable-stack: true + ghc-version: latest + + - name: Cache Haskell package metadata + uses: actions/cache@v4 + with: + path: ~/.stack/pantry + key: stack-pantry-${{ runner.os }}-${{ steps.cache-date.outputs.date }} + + - name: Cache Haskell dependencies + uses: actions/cache@v4 + with: + path: | + ~/.stack/* + !~/.stack/pantry + !~/.stack/programs + key: stack-${{ runner.os }}-${{ matrix.resolver }}-${{ steps.cache-date.outputs.date }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('*.cabal') }} + restore-keys: | + stack-${{ runner.os }}-${{ matrix.resolver }}-${{ steps.cache-date.outputs.date }}-${{ hashFiles('stack.yaml') }}- + stack-${{ runner.os }}-${{ matrix.resolver }}-${{ steps.cache-date.outputs.date }}- + + - name: Update hackage index + run: stack update + + - name: test + run: | + stack test \ + --fast --no-terminal \ + --resolver ${{ matrix.resolver }} --system-ghc \ + --haddock --no-haddock-deps