Skip to content

Commit

Permalink
Merge pull request #283 from haskell-nix/srk/ci
Browse files Browse the repository at this point in the history
CI updates, GHC 9.8
  • Loading branch information
sorki authored Jul 28, 2024
2 parents 4777b21 + abf025c commit 1525aef
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 54 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ci.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ in haskellCi.generalCi
)
)
haskellCi.DhallMatrix::{
, ghc =
[ haskellCi.GHC.GHC963
, haskellCi.GHC.GHC947
, haskellCi.GHC.GHC928
, haskellCi.GHC.GHC902
, haskellCi.GHC.GHC8107
]
, ghc = [ haskellCi.GHC.GHC982, haskellCi.GHC.GHC966 ]
, os = [ haskellCi.OS.Ubuntu, haskellCi.OS.MacOS ]
}
: haskellCi.CI.Type
10 changes: 2 additions & 8 deletions .github/workflows/ci.dhall.frozen
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
let haskellCi =
https://raw.githubusercontent.com/sorki/github-actions-dhall/main/haskell-ci.dhall
sha256:5d7058a7684fd5315467b562853bd1c4a43da691c09293d3715ee739dfa26e08
sha256:eff4d52e4243777fbe2c800778b24092ace8cd83165cf46b90d5c22e3ebfdd81

let defSteps = haskellCi.defaultCabalSteps

Expand All @@ -15,13 +15,7 @@ in haskellCi.generalCi
)
)
haskellCi.DhallMatrix::{
, ghc =
[ haskellCi.GHC.GHC963
, haskellCi.GHC.GHC947
, haskellCi.GHC.GHC928
, haskellCi.GHC.GHC902
, haskellCi.GHC.GHC8107
]
, ghc = [ haskellCi.GHC.GHC982, haskellCi.GHC.GHC966 ]
, os = [ haskellCi.OS.Ubuntu, haskellCi.OS.MacOS ]
}
: haskellCi.CI.Type
17 changes: 6 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ jobs:
name: "GHC ${{ matrix.ghc }}, Cabal ${{ matrix.cabal }}, OS ${{ matrix.os }}"
"runs-on": "${{ matrix.os }}"
steps:
- uses: "cachix/install-nix-action@v24"
- uses: "cachix/install-nix-action@v27"
with:
nix_path: "nixpkgs=channel:nixos-unstable"
- uses: "cachix/cachix-action@v13"
- uses: "cachix/cachix-action@v15"
with:
name: "hnix-store"
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
Expand All @@ -28,7 +28,7 @@ jobs:
fi
- name: freeze
run: "cabal freeze --enable-tests --enable-benchmarks"
- uses: "actions/cache@v3"
- uses: "actions/cache@v4"
with:
key: "${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.cabal}}-${{ hashFiles('cabal.project.freeze') }}"
path: |
Expand All @@ -45,19 +45,14 @@ jobs:
strategy:
matrix:
cabal:
- '3.10'
- '3.12'
ghc:
- '9.6.3'
- '9.4.7'
- '9.2.8'
- '9.0.2'
- '8.10.7'
- '9.8.2'
- '9.6.6'
os:
- "ubuntu-latest"
- "macos-latest"
name: Haskell CI
'on':
pull_request: {}
push: {}
schedule:
- cron: "4 20 10 * *"
11 changes: 7 additions & 4 deletions hnix-store-core/tests/Fingerprint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ spec_fingerprint = do
it "allows a successful signature verification" $ do
let msg = Text.encodeUtf8 $ metadataFingerprint def exampleStorePath exampleMetadata
Signature sig' =
head
$ sig
<$> filter (\(NarSignature publicKey _) -> publicKey == "cache.nixos.org-1")
(Set.toList (metadataSigs exampleMetadata))
case
sig
<$> filter (\(NarSignature publicKey _) -> publicKey == "cache.nixos.org-1")
(Set.toList (metadataSigs exampleMetadata))
of
(x:_) -> x
_ -> error "impossible"
sig' `shouldSatisfy` Ed25519.verify pubkey msg

exampleFingerprint :: Text
Expand Down
4 changes: 3 additions & 1 deletion hnix-store-nar/src/System/Nix/Nar/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ parseSymlink = do
currentDirectoryAndFile :: Monad m => NarParser m (FilePath, FilePath)
currentDirectoryAndFile = do
dirStack <- State.gets directoryStack
pure (List.foldr1 (</>) (List.reverse $ drop 1 dirStack), head dirStack)
case dirStack of
(x:xs) -> pure (List.foldr1 (</>) (List.reverse xs), x)
_ -> error "currentDirectoryAndFile: empty dirStack"

-- | Internal data type representing symlinks encountered in the NAR
data LinkInfo = LinkInfo
Expand Down
28 changes: 5 additions & 23 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,11 @@ let
} // (lib.filterAttrs (n: v: n != "url") x));
in
{
# srk 2023-11-18: this is pinned in nixpkgs unstable to 1.0.5
# causing trouble with ghc963
some = hself.callHackageDirect
{ pkg = "some";
ver = "1.0.6";
sha256 = "sha256-AnjaUzSlsLi3lIURrEfs92Jo5FzX49RyNdfDSfFV3Kk=";
} {};

# srk 2023-12-06: until in unstable
dependent-sum-template = hself.callHackageDirect
{ pkg = "dependent-sum-template";
ver = "0.2.0.1";
sha256 = "sha256-quwgFuEBrK96JZenJZcyfk/O0Gp+ukwKEpe1hMqDbIg=";
} {};

# srk 2023-11-19: wider unix bound via CPP
# Required for ghc963 since linux-namespaces is pinned
# in unstable to 0.1.3.0
linux-namespaces = hself.callCabal2nix "linux-namespaces"
(fetchGitHubPR {
url = "https://github.com/redneb/hs-linux-namespaces/pull/4";
sha256 = "sha256-R61OCu6b4YoDzIl0vg8cSoP7611TlEdWZfVDnZrJY+g=";
}) {};
# srk 2024-07-28: allow template-haskell 2.22 (GHC 9.8)
# https://github.com/obsidiansystems/dependent-sum-template/pull/13
dependent-sum-template =
haskellLib.doJailbreak
hsuper.dependent-sum-template_0_2_0_1;

hnix-store-core =
lib.pipe
Expand Down

0 comments on commit 1525aef

Please sign in to comment.