Skip to content

Commit

Permalink
investigating slow builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Ptival committed Aug 8, 2023
1 parent 626110d commit 4aebaab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,29 @@ jobs:
echo "home=$HOME" >> $GITHUB_ENV
echo "ghc=`ghc --version --help | cut -d' ' -f8`" >> $GITHUB_ENV
- name: Cache cabal files
id: cache-cabal
uses: actions/cache@v3
with:
path: ${{env.home}}/.cabal/store/ghc-${{ env.ghc }}
# Prefer previous ref
key: build-cabal-${{ env.ghc }}-${{ github.ref }}
# otherwise just use most recent build.
restore-keys: build-cabal-${{ env.ghc }}
- name: Check for cabal cache hit
run: echo "Cache hit on cabal files!"
if: steps.cache-cabal.outputs.cache-hit == 'true'
- name: Cache local build files
id: cache-dist-newstyle
uses: actions/cache@v3
with:
path: dist-newstyle
# Prefer previous ref
key: build-dist-${{ env.ghc }}-${{ github.ref }}
# otherwise just use most recent build.
restore-keys: build-dist-${{ env.ghc }}
- name: Check for dist-newstyle cache hit
run: echo "Cache hit on dist-newstyle files!"
if: steps.cache-dist-newstyle.outputs.cache-hit == 'true'
- name: Cabal freeze and enable werror.
run: |
ln -s cabal.project.freeze.ghc.${{ env.ghc }} cabal.project.freeze
Expand Down
6 changes: 3 additions & 3 deletions containers/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ ENV PATH=/opt/rh/devtoolset-8/root/bin:${PATH}

# Install GHCUP
ENV PATH=/root/.ghcup/bin:${PATH}
ARG ghcupVer=0.1.19.0
ARG cabalVer=3.4.0.0
ARG ghcVer=8.10.7
ARG ghcupVer=0.1.19.5
ARG cabalVer=3.10.1.0
ARG ghcVer=9.2.8

RUN mkdir -p /root/.ghcup/bin
RUN curl -o /root/.ghcup/bin/ghcup https://downloads.haskell.org/~ghcup/${ghcupVer}/x86_64-linux-ghcup-${ghcupVer} \
Expand Down

0 comments on commit 4aebaab

Please sign in to comment.