Skip to content

Commit a55a715

Browse files
committed
chore: setup stack lts 22
1 parent b066cd4 commit a55a715

File tree

3 files changed

+173
-0
lines changed

3 files changed

+173
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Haskell CI (Stack)
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
stack:
12+
name: Stack LTS 22.44 on ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, macos-latest]
18+
19+
steps:
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
22+
- uses: haskell-actions/setup@v2
23+
id: setup
24+
with:
25+
ghc-version: '9.6'
26+
enable-stack: true
27+
28+
- name: Show toolchain versions
29+
shell: bash
30+
run: |
31+
ghc --numeric-version
32+
stack --numeric-version
33+
34+
- name: Cache Stack global package DB
35+
uses: actions/cache@v4
36+
with:
37+
path: ~/.stack
38+
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('simplex-method.cabal') }}
39+
restore-keys: |
40+
${{ runner.os }}-stack-global-
41+
42+
- name: Cache Stack work directory
43+
uses: actions/cache@v4
44+
with:
45+
path: .stack-work
46+
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('simplex-method.cabal') }}-${{ hashFiles('**/*.hs') }}
47+
restore-keys: |
48+
${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('simplex-method.cabal') }}-
49+
${{ runner.os }}-stack-work-
50+
51+
- name: Build dependencies
52+
run: stack build --system-ghc --only-dependencies --test
53+
54+
- name: Build the package
55+
run: stack build --system-ghc
56+
57+
- name: Run tests
58+
run: stack test --system-ghc

stack.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
2+
# A snapshot resolver dictates the compiler version and the set of packages
3+
# to be used for project dependencies. For example:
4+
#
5+
# resolver: lts-3.5
6+
# resolver: nightly-2015-09-21
7+
# resolver: ghc-7.10.2
8+
#
9+
# The location of a snapshot can be provided as a file or url. Stack assumes
10+
# a snapshot provided as a file might change, whereas a url resource does not.
11+
#
12+
# resolver: ./custom-snapshot.yaml
13+
# resolver: https://example.com/snapshots/2018-01-01.yaml
14+
resolver: lts-22.44
15+
16+
# User packages to be built.
17+
# Various formats can be used as shown in the example below.
18+
#
19+
# packages:
20+
# - some-directory
21+
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
22+
# subdirs:
23+
# - auto-update
24+
# - wai
25+
packages:
26+
- .
27+
28+
# Dependency packages to be pulled from upstream that are not in the resolver.
29+
# These entries can reference officially published versions as well as
30+
# forks / in-progress versions pinned to a git hash. For example:
31+
#
32+
# extra-deps:
33+
# - acme-missiles-0.3
34+
# - git: https://github.com/commercialhaskell/stack.git
35+
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
36+
#
37+
extra-deps:
38+
- QuickCheck-2.16.0.0
39+
- hspec-2.11.17
40+
- hspec-core-2.11.17
41+
- hspec-discover-2.11.17
42+
- hspec-expectations-0.8.4
43+
44+
# Override default flag values for local packages and extra-deps
45+
# flags: {}
46+
47+
# Extra package databases containing global packages
48+
# extra-package-dbs: []
49+
50+
# Control whether we use the GHC we find on the path
51+
# system-ghc: true
52+
#
53+
# Require a specific version of stack, using version ranges
54+
# require-stack-version: -any # Default
55+
# require-stack-version: ">=2.5"
56+
#
57+
# Override the architecture used by stack, especially useful on Windows
58+
# arch: i386
59+
# arch: x86_64
60+
#
61+
# Extra directories used by stack for building
62+
# extra-include-dirs: [/path/to/dir]
63+
# extra-lib-dirs: [/path/to/dir]
64+
#
65+
# Allow a newer minor version of GHC than the snapshot specifies
66+
# compiler-check: newer-minor
67+
68+
system-ghc: true

stack.yaml.lock

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This file was autogenerated by Stack.
2+
# You should not edit this file by hand.
3+
# For more information, please see the documentation at:
4+
# https://docs.haskellstack.org/en/stable/topics/lock_files
5+
6+
packages:
7+
- completed:
8+
hackage: QuickCheck-2.16.0.0@sha256:f4210647167f873196b01050ac074a44821b6687e26f792ad3474b6388c5f8b7,9208
9+
pantry-tree:
10+
sha256: d9ad9ff0ac7979e9ad808bd3485d17da1a386dda43a5c81b48901a0360290d81
11+
size: 2627
12+
original:
13+
hackage: QuickCheck-2.16.0.0
14+
- completed:
15+
hackage: hspec-2.11.17@sha256:b4bfce6799c83582e64b7f0771ce8ff5f67253bc974ac295687c71f192ecf754,1822
16+
pantry-tree:
17+
sha256: 52fb09e6ca71f8ffdc1b759b5172967a422979b9675ef93705da8aed08b53d6a
18+
size: 584
19+
original:
20+
hackage: hspec-2.11.17
21+
- completed:
22+
hackage: hspec-core-2.11.17@sha256:8d50ead0c44f93a32232dd3f2713567da55e883498418802df0b9e6dfed74172,7610
23+
pantry-tree:
24+
sha256: 32f003fb454d6239a829d506facee35327455d28e7aee6813b114a29d987dbf2
25+
size: 6797
26+
original:
27+
hackage: hspec-core-2.11.17
28+
- completed:
29+
hackage: hspec-discover-2.11.17@sha256:41721d7aa18ebeebe5aeb882ad43920cc394579ada666695788612accd6bdec3,2171
30+
pantry-tree:
31+
sha256: a1283d604ca99b218eb939c8fd4dbd8aca5a5a19e37c383e499037462417ab67
32+
size: 829
33+
original:
34+
hackage: hspec-discover-2.11.17
35+
- completed:
36+
hackage: hspec-expectations-0.8.4@sha256:4237f094a7931202ff57ac6475542b0b314b50a7024550e2b6eb87cfb0d4ff93,1702
37+
pantry-tree:
38+
sha256: 87681840d430b84686f83f1ab8b5873b09c349775698665233443914acf9ba2b
39+
size: 741
40+
original:
41+
hackage: hspec-expectations-0.8.4
42+
snapshots:
43+
- completed:
44+
sha256: 238fa745b64f91184f9aa518fe04bdde6552533d169b0da5256670df83a0f1a9
45+
size: 721141
46+
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/44.yaml
47+
original: lts-22.44

0 commit comments

Comments
 (0)