Skip to content

Commit

Permalink
Fix cache, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AzimMuradov committed Oct 5, 2024
1 parent fea6665 commit aba7c43
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
os: [ubuntu-24.04]
ghc: ["9.4.8"]
cabal: ["3.8"]
llvm: ["15", "16", "17", "18"]
llvm: ["16", "17", "18"]

steps:
- name: Checkout code
Expand All @@ -26,14 +26,19 @@ jobs:
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Configure the build
# The last step generates "dist-newstyle/cache/plan.json" for the cache key
run: |
cabal configure --enable-tests --enable-benchmarks --disable-documentation
cabal build all --dry-run
- name: Cache Cabal
uses: actions/cache@v4
env:
cache-name: cache-cabal
key-prefix: build-cache-cabal-os-${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}-llvm-${{ matrix.llvm }}
with:
path: ~/.cabal
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key-prefix }}-plan-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key-prefix }}-
- name: Set up HLint
uses: haskell-actions/hlint-setup@v2
- name: Run HLint
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,24 @@ jobs:
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Configure the build
# The last step generates "dist-newstyle/cache/plan.json" for the cache key
run: |
cabal configure --disable-tests --disable-benchmarks --enable-documentation
cabal build all --dry-run
- name: Cache Cabal
uses: actions/cache@v4
env:
cache-name: cache-cabal
key-prefix: docs-cache-cabal-os-${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}-llvm-${{ matrix.llvm }}
with:
path: ~/.cabal
key: ${{ runner.os }}-docs-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: ${{ runner.os }}-docs-${{ env.cache-name }}-
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key-prefix }}-plan-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key-prefix }}-
- name: Install LLVM
run: sudo apt install -y llvm-${{ matrix.llvm }} llvm-${{ matrix.llvm }}-dev
- name: Build docs
run: >
cabal haddock
--enable-documentation
--haddock-html-location='https://hackage.haskell.org/package/$pkg-$version/docs'
--haddock-hyperlink-source
--haddock-options=--quickjump
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ Global options:

- **GHC**: 9.4.8
- **Cabal**: 3.8
- **LLVM**: >=16
- **LLVM**: 16-18

[Implementation details](docs/dev/impl.md)

0 comments on commit aba7c43

Please sign in to comment.