Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve ci #226

Merged
merged 66 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
11cbf21
fixed macos ci by intalling stack
BebeSparkelSparkel Jul 8, 2024
f117d8c
use haskell-actions
BebeSparkelSparkel Jul 8, 2024
abe2cf8
install llvm@12
BebeSparkelSparkel Jul 8, 2024
5481055
only macos
BebeSparkelSparkel Jul 8, 2024
9797db2
fixed llvm@12 path
BebeSparkelSparkel Jul 8, 2024
6c4d697
print path and llvm dir
BebeSparkelSparkel Jul 8, 2024
03e021f
brew reccommended paths
BebeSparkelSparkel Jul 8, 2024
c6fbb6c
remove Cellar
BebeSparkelSparkel Jul 8, 2024
fa3f80e
add opt
BebeSparkelSparkel Jul 8, 2024
05ce730
ls brew prefix
BebeSparkelSparkel Jul 8, 2024
6d5b9a9
more ls
BebeSparkelSparkel Jul 8, 2024
9bbf0af
fixed paths
BebeSparkelSparkel Jul 8, 2024
8f6d4d9
splitting matrix into different jobs
BebeSparkelSparkel Jul 8, 2024
d8d8034
invalid strategy
BebeSparkelSparkel Jul 8, 2024
3ff9fa6
fixed os name
BebeSparkelSparkel Jul 8, 2024
b96a174
find error
BebeSparkelSparkel Jul 8, 2024
98cf7c5
indent
BebeSparkelSparkel Jul 8, 2024
d6d70bd
build
BebeSparkelSparkel Jul 8, 2024
ae06375
@->V
BebeSparkelSparkel Jul 8, 2024
9fe04a5
test old
BebeSparkelSparkel Jul 8, 2024
e9df8e2
remove anchor
BebeSparkelSparkel Jul 8, 2024
4985f47
old steps
BebeSparkelSparkel Jul 8, 2024
45f0389
checkout@2
BebeSparkelSparkel Jul 8, 2024
163a5e6
narrow
BebeSparkelSparkel Jul 8, 2024
99538ad
widen
BebeSparkelSparkel Jul 8, 2024
e26b037
widen
BebeSparkelSparkel Jul 8, 2024
81adca8
narrow
BebeSparkelSparkel Jul 8, 2024
54f39c9
widen
BebeSparkelSparkel Jul 8, 2024
6d43c1f
move checkout
BebeSparkelSparkel Jul 8, 2024
fa4624f
for resolver
BebeSparkelSparkel Jul 8, 2024
9e5c126
narrow
BebeSparkelSparkel Jul 8, 2024
31f21d2
widen
BebeSparkelSparkel Jul 8, 2024
4b9e224
install llvm@12
BebeSparkelSparkel Jul 8, 2024
37bf7f3
matrix
BebeSparkelSparkel Jul 8, 2024
e8ed625
fix list
BebeSparkelSparkel Jul 8, 2024
2f00c4a
quotes
BebeSparkelSparkel Jul 8, 2024
e6f4061
lts
BebeSparkelSparkel Jul 8, 2024
0e04e92
added other OSs
BebeSparkelSparkel Jul 8, 2024
cb0bf2f
added --extra-*-dir instead of env var
BebeSparkelSparkel Jul 8, 2024
7fae2ab
removed single quotes
BebeSparkelSparkel Jul 8, 2024
4373bc2
libffi
BebeSparkelSparkel Jul 8, 2024
4078be5
removed quotes
BebeSparkelSparkel Jul 8, 2024
abb5007
-I to extra-include-dirs
BebeSparkelSparkel Jul 10, 2024
76bb859
specific path
BebeSparkelSparkel Jul 10, 2024
b1f94de
llvm 12 -> 13
BebeSparkelSparkel Jul 10, 2024
f7c4b79
cache stack work
BebeSparkelSparkel Jul 10, 2024
d50a784
widen lts versions
BebeSparkelSparkel Jul 10, 2024
681fc86
stack path reorder
BebeSparkelSparkel Jul 10, 2024
7061a82
print largest cache file size
BebeSparkelSparkel Jul 11, 2024
0d5816b
exclude .stack/programs
BebeSparkelSparkel Jul 11, 2024
65000e2
use haskell-actions to install ghc\ninstead of stack so ghc is not ca…
BebeSparkelSparkel Jul 11, 2024
bb2f3bf
clean up
BebeSparkelSparkel Jul 11, 2024
9603405
added cabal builds
BebeSparkelSparkel Jul 11, 2024
f28bd94
use sh and cabal
BebeSparkelSparkel Jul 11, 2024
4cea702
install correct ghc version non-macos, show versions
BebeSparkelSparkel Jul 11, 2024
0c112a1
added cabal.project
BebeSparkelSparkel Jul 11, 2024
11b0f96
chaned cache paths for windows
BebeSparkelSparkel Jul 11, 2024
8934d43
unique ids
BebeSparkelSparkel Jul 11, 2024
8ff6776
minimize conflict set
BebeSparkelSparkel Jul 11, 2024
c805cf3
restore-keys, fixed stack cache path
BebeSparkelSparkel Jul 11, 2024
3ce7548
base_ref
BebeSparkelSparkel Jul 11, 2024
66723d0
base_ref -> head_ref, cabal uses 9.8.2
BebeSparkelSparkel Jul 11, 2024
3c8b33a
cabal uses 9.8.2
BebeSparkelSparkel Jul 11, 2024
273679e
use haskell setup for all OSs
BebeSparkelSparkel Jul 11, 2024
a22f91e
added build-tools: hspec-discover
BebeSparkelSparkel Jul 11, 2024
4b495cb
cabal cleanup
BebeSparkelSparkel Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 87 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,97 @@ jobs:
name: Stack
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
resolver:
# Missing some packages now
#- "--resolver nightly"
- lts-18.16 # Win32 issue
- lts-16
stack-yaml:
- stack.yaml
- stack-new-time.yaml
exclude:
- resolver: lts-16
stack-yaml: stack-new-time.yaml
- os: windows-latest
stack-yaml: stack-new-time.yaml

os:
- macos-latest
- ubuntu-latest
- windows-latest
versions:
#- <lts version> <ghc version>
- 22.28 9.6.6
- 21.25 9.4.8
- 20.26 9.2.8
- 19.33 9.0.2
- 18.28 8.10.7
steps:
- name: Parse lts and ghc versions
shell: sh
run: |
echo snapshot=$(echo ${{ matrix.versions }} | cut -d ' ' -f 1) >> $GITHUB_ENV
echo ghcVersion=$(echo ${{ matrix.versions }} | cut -d ' ' -f 2) >> $GITHUB_ENV
- name: Install LLVM 13
if: ${{ matrix.os == 'macos-latest' && env.snapshot < 20 }}
shell: sh
run: |
brew install llvm@13
echo "/opt/homebrew/opt/llvm@13/bin" >> $GITHUB_PATH
echo extraLibDirs="--extra-lib-dirs /opt/homebrew/opt/llvm@13/lib" >> $GITHUB_ENV
echo extraIncludeDirsLLVM="--extra-include-dirs /opt/homebrew/opt/llvm@13/include" >> $GITHUB_ENV
echo extraIncludeDirsFFI="--extra-include-dirs /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ffi" >> $GITHUB_ENV
- name: Setup Haskell
id: setup-haskell-stack
uses: haskell-actions/[email protected]
with:
ghc-version: ${{ env.ghcVersion }}
enable-stack: true
stack-version: 'latest'
cabal-update: false
- name: Clone project
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Use Cache
uses: actions/cache@v4
with:
key: ${{ matrix.os }}_${{ env.snapshot }}_${{ github.head_ref }}
restore-keys: |
${{ matrix.os }}_${{ env.snapshot }}_${{ github.head_ref }}
${{ matrix.os }}_${{ env.snapshot }}_${{ github.base_ref }}
${{ matrix.os }}_${{ env.snapshot }}_
${{ matrix.os }}_${{ env.snapshot }}
path: |
${{ steps.setup-haskell-stack.outputs.stack-root }}
.stack-work
*/.stack-work
- name: Build and run tests
shell: bash
run: |
set -ex
ghc --version
stack --version
stack test --system-ghc $extraLibDirs $extraIncludeDirsLLVM $extraIncludeDirsFFI --fast --no-terminal --snapshot=lts-$snapshot

Cabal:
name: Cabal
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- macos-13
- ubuntu-latest
- windows-latest
steps:
- name: Setup Haskell
id: setup-haskell-cabal
uses: haskell-actions/[email protected]
with:
ghc-version: 9.6.6
- name: Clone project
uses: actions/checkout@v4
- name: Use Cache
uses: actions/cache@v4
with:
key: ${{ matrix.os }}_cabal_${{ github.head_ref }}
restore-keys: |
${{ matrix.os }}_cabal_${{ github.head_ref }}
${{ matrix.os }}_cabal_${{ github.base_ref }}
${{ matrix.os }}_cabal_
${{ matrix.os }}_cabal
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
- name: Build and run tests
shell: bash
run: |
set -ex
stack --version
stack test --fast --no-terminal --stack-yaml=${{ matrix.stack-yaml }} --resolver=${{ matrix.resolver }}
ghc --version
cabal --version
cabal test --minimize-conflict-set -O0 all
2 changes: 2 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages:
*/*.cabal
2 changes: 2 additions & 0 deletions classy-prelude-conduit/classy-prelude-conduit.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ test-suite spec
Paths_classy_prelude_conduit
hs-source-dirs:
test
build-tool-depends:
hspec-discover:hspec-discover
build-depends:
QuickCheck
, base >=4.13 && <5
Expand Down
1 change: 1 addition & 0 deletions classy-prelude-conduit/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ tests:
- classy-prelude-conduit
- QuickCheck
- conduit
build-tools: hspec-discover
2 changes: 2 additions & 0 deletions classy-prelude/classy-prelude.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ test-suite test
hs-source-dirs:
test
ghc-options: -Wall
build-tool-depends:
hspec-discover:hspec-discover
build-depends:
QuickCheck
, base >=4.13 && <5
Expand Down
1 change: 1 addition & 0 deletions classy-prelude/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ tests:
- hspec >=1.3
- QuickCheck
- containers
build-tools: hspec-discover
2 changes: 2 additions & 0 deletions mono-traversable/mono-traversable.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ test-suite test
hs-source-dirs:
test
ghc-options: -O0
build-tool-depends:
hspec-discover:hspec-discover
build-depends:
HUnit
, QuickCheck
Expand Down
1 change: 1 addition & 0 deletions mono-traversable/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ tests:
- containers
- unordered-containers
- foldl
build-tools: hspec-discover
benchmarks:
all:
main: main.hs
Expand Down
2 changes: 2 additions & 0 deletions mutable-containers/mutable-containers.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ test-suite test
Paths_mutable_containers
hs-source-dirs:
test
build-tool-depends:
hspec-discover:hspec-discover
build-depends:
QuickCheck
, base >=4.13 && <5
Expand Down
1 change: 1 addition & 0 deletions mutable-containers/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ tests:
- hspec
- QuickCheck
- primitive
build-tools: hspec-discover
benchmarks:
deque:
main: deque.hs
Expand Down
Loading