diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index a79b1a969b..c93758c823 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -74,6 +74,15 @@ jobs: INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-') echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV + - name: Form the package list ('cabal.project.freeze') + continue-on-error: true + run: | + cabal v2-freeze + echo '' + echo 'Output:' + echo '' + cat 'cabal.project.freeze' + - name: Hackage sources cache uses: actions/cache@v2 env: @@ -84,12 +93,13 @@ jobs: restore-keys: ${{ env.cache-name }}- - name: Compiled deps cache + id: compiled-deps uses: actions/cache@v2 env: cache-name: compiled-deps with: path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }} restore-keys: | ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index 424c558a22..a1a6c8a5b9 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -125,6 +125,15 @@ jobs: INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-') echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV + - name: Form the package list ('cabal.project.freeze') + continue-on-error: true + run: | + cabal v2-freeze + echo '' + echo 'Output:' + echo '' + cat 'cabal.project.freeze' + # 2021-12-02: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC really, # but can depend on `base`. # But this caching is happens only inside `master` for `master` purposes of compiling the deps @@ -135,9 +144,11 @@ jobs: env: cache-name: hackage-sources with: - path: ${{ env.CABAL_PKGS_DIR }} - key: ${{ env.cache-name }}-${{ env.INDEX_STATE }} - restore-keys: ${{ env.cache-name }}- + path: ${{ env.CABAL_PKGS_DIR }} + key: ${{ env.cache-name }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }} + restore-keys: | + ${{ env.cache-name }}-${{ env.INDEX_STATE }}- + ${{ env.cache-name }}- - name: Compiled deps cache id: compiled-deps @@ -146,7 +157,7 @@ jobs: cache-name: compiled-deps with: path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }} restore-keys: | ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- @@ -171,3 +182,8 @@ jobs: continue-on-error: true run: | cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild + + # Despite the `continue-on-error: true` directive - CI does not ignore the return code of the last step + - name: Workaround to CI platform + run: | + true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d530dfc3b0..3dafcdf2dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -123,6 +123,15 @@ jobs: INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-') echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV + - name: Form the package list ('cabal.project.freeze') + continue-on-error: true + run: | + cabal v2-freeze + echo '' + echo 'Output:' + echo '' + cat 'cabal.project.freeze' + - name: Hackage sources cache uses: actions/cache@v2 env: @@ -133,12 +142,13 @@ jobs: restore-keys: ${{ env.cache-name }}- - name: Compiled deps cache + id: compiled-deps uses: actions/cache@v2 env: cache-name: compiled-deps with: path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} - key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project') }} + key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }} restore-keys: | ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-