Skip to content

Commit

Permalink
CI: Update freeze file and make sure it stays up to date (#706)
Browse files Browse the repository at this point in the history
* CI: make sure cabal.project.freeze is up to date

* Fix cabal index-state and freeze file

cabal.project had two lines different index-state lines.
And the one we've been update wasn't the one cabal was actually using.

Also update the freeze file to the lasted index and dependencies to make 
sure the cache works properly, as the freeze file is part of the cache 
key.
  • Loading branch information
leonschoorl authored Jan 17, 2025
1 parent 548168f commit d42753c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,20 @@ jobs:
run: |
! grep --include=*.hs -E -r '\-fconstraint-solver-iterations *= *0'
- run: cache clean
- run: cache pull cabal --missing-ok --write-cache-found
- name: Update Cabal index info
run: |
if [[ $(cat cache_found) == 0 ]]; then
cabal update
else
echo "Restored cache, no need to update cabal package list"
fi
- name: Check that cabal.project.freeze is up to date with the cabal.project file
run: |
cabal freeze
git diff --exit-code cabal.project.freeze
build:
name: Build dependencies
runs-on: [self-hosted, compute]
Expand Down
7 changes: 1 addition & 6 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ write-ghc-environment-files: always
-- index state, to go along with the cabal.project.freeze file. update the index
-- state by running `cabal update` twice and looking at the index state it
-- displays to you (as the second update will be a no-op)
index-state: 2024-08-07T03:18:13Z
index-state: 2025-01-16T11:17:49Z
with-compiler: ghc-9.6.5
tests: True

Expand Down Expand Up @@ -134,11 +134,6 @@ package vivado-hs
-RTS
-j8

-- index state, to go along with the cabal.project.freeze file. update the index
-- state by running `cabal update` twice and looking at the index state it
-- displays to you (as the second update will be a no-op)
index-state: 2023-12-05T05:33:28Z

-- We need an up-to-date Clash and libraries. Among other features, this adds
-- support for dynamic clocks and Xilinx primitive support.
source-repository-package
Expand Down
2 changes: 2 additions & 0 deletions cabal.project.freeze
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ constraints: any.Cabal ==3.10.3.0,
any.bifunctors ==5.6.1,
bifunctors +tagged,
any.binary ==0.8.9.1,
bittide-instances -sim-baud-rate,
any.bitvec ==1.1.5.0,
bitvec +simd,
any.blaze-builder ==0.4.2.3,
Expand Down Expand Up @@ -325,6 +326,7 @@ constraints: any.Cabal ==3.10.3.0,
void -safe,
any.witherable ==0.4.2,
any.wl-pprint-annotated ==0.1.0.1,
any.word8 ==0.1.3,
any.yaml ==0.11.11.2,
yaml +no-examples +no-exe,
any.zlib ==0.6.3.0,
Expand Down

0 comments on commit d42753c

Please sign in to comment.