Skip to content

Commit d4189fc

Browse files
authored
Merge branch 'master' into random-test-ghc-env
2 parents a4f3c08 + 4749864 commit d4189fc

File tree

187 files changed

+6844
-2622
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+6844
-2622
lines changed

.github/workflows/arm64-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ARM64 Release
1+
name: ARM64 (AArch64) Release
22

33
on:
44
pull_request:
@@ -17,18 +17,18 @@ jobs:
1717
runs-on: [self-hosted, linux, ARM64]
1818
steps:
1919
- name: Clone project
20-
uses: actions/checkout@v2
21-
- shell: bash
20+
uses: actions/checkout@v3
21+
- name: Build bindist
22+
shell: bash
2223
run: |
2324
set -ex
24-
2525
docker build . -f etc/dockerfiles/arm64.Dockerfile -t stack --build-arg USERID=$(id -u) --build-arg GROUPID=$(id -g)
2626
rm -rf _release
2727
mkdir -p _release
2828
docker run --rm -v $(pwd):/src -w /src stack bash -c "/home/stack/release build"
2929
3030
- name: Upload bindist
31-
uses: actions/upload-artifact@v2
31+
uses: actions/upload-artifact@v3
3232
with:
3333
name: Linux-ARM64
3434
path: _release/stack-*

.github/workflows/integration-tests.yml

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ on:
99
- rc/**
1010
tags:
1111
- '**'
12-
schedule:
13-
- cron: "0 0 * * *"
1412
workflow_dispatch:
1513

14+
# As of 11 August 2022, ubuntu-latest, windows-latest and macos-latest come with
15+
# Stack 2.7.5. windows-latest comes with NSIS 3.08, for which the default value
16+
# of the 'Unicode' installer attribute is 'true'.
17+
1618
jobs:
1719
integration-tests:
1820
name: Integration tests
@@ -26,52 +28,56 @@ jobs:
2628
cache-bust: ""
2729
- os: windows-latest
2830
release-args: ""
29-
cache-bust: ""
31+
cache-bust: "13"
3032
- os: macos-latest
3133
release-args: ""
32-
cache-bust: "1"
34+
cache-bust: "23"
3335
steps:
3436
- name: Clone project
35-
uses: actions/checkout@v2
37+
uses: actions/checkout@v3
3638
- name: Cache dependencies on Unix-like OS
3739
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
3840
uses: actions/cache@v3
3941
with:
4042
path: ~/.stack
41-
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}${{ matrix.cache-bust }}
43+
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}-${{ matrix.cache-bust }}
4244
- name: Cache dependencies on Windows
4345
if: startsWith(runner.os, 'Windows')
4446
uses: actions/cache@v3
4547
with:
4648
path: |
4749
~\AppData\Roaming\stack
4850
~\AppData\Local\Programs\stack
49-
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}${{ matrix.cache-bust }}
50-
- shell: bash
51-
name: Install deps and run checks
51+
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}-${{ matrix.cache-bust }}
52+
- name: Install deps and run checks
53+
shell: bash
5254
run: |
5355
set -ex
5456
55-
# Work around 'git status' always showing symlinks modified on Windows; see
56-
# https://github.com/git-for-windows/git/issues/2653#issuecomment-640234081
57-
git config --global core.fscache false
58-
59-
stack upgrade || curl -sSL https://get.haskellstack.org/ | sh -s - -f
60-
6157
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]
6258
then
6359
# Retry installing nix due to nondeterministic error
6460
# Fatal error: glibc detected an invalid stdio handle
6561
# See:
6662
# https://github.com/nh2/static-haskell-nix/pull/27#issuecomment-502652181
6763
# https://github.com/NixOS/nix/issues/2733
68-
(for i in {1..5}; do bash <(curl -sSL https://nixos.org/nix/install) && exit 0; done; exit 1)
64+
(for i in {1..5}; do bash <(curl -sSL https://nixos.org/nix/install) --no-daemon && exit 0; done; exit 1)
6965
. ~/.nix-profile/etc/profile.d/nix.sh
70-
nix-channel --add https://nixos.org/channels/nixos-19.09 nixpkgs
66+
nix-channel --add https://nixos.org/channels/nixos-22.05 nixpkgs
7167
nix-channel --update # Get GHC 8.2.2
72-
elif [[ "${{ matrix.os }}" == "windows-latest" ]]
68+
fi
69+
70+
if [[ "${{ matrix.release-args }}" == "--alpine" ]]
7371
then
74-
choco install nsis-unicode -y
72+
mkdir -p ~/.stack
73+
touch ~/.stack/config.yaml
74+
cat > ~/.stack/config.yaml <<EOF
75+
extra-include-dirs:
76+
- /usr/include
77+
extra-lib-dirs:
78+
- /lib
79+
- /usr/lib
80+
EOF
7581
fi
7682
7783
# Do this in the same step as installing deps to get relevant env var modifications
@@ -84,7 +90,7 @@ jobs:
8490
run: stack etc/scripts/release.hs build ${{ matrix.release-args }}
8591

8692
- name: Upload bindist
87-
uses: actions/upload-artifact@v2
93+
uses: actions/upload-artifact@v3
8894
with:
8995
name: ${{ runner.os }}
9096
path: _release/stack-*
@@ -96,17 +102,17 @@ jobs:
96102
if: startsWith(github.ref, 'refs/tags/')
97103
steps:
98104
- name: Download Linux artifact
99-
uses: actions/download-artifact@v2
105+
uses: actions/download-artifact@v3
100106
with:
101107
name: Linux
102108
path: _release
103109
- name: Download macOS artifact
104-
uses: actions/download-artifact@v2
110+
uses: actions/download-artifact@v3
105111
with:
106112
name: macOS
107113
path: _release
108114
- name: Download Windows artifact
109-
uses: actions/download-artifact@v2
115+
uses: actions/download-artifact@v3
110116
with:
111117
name: Windows
112118
path: _release

.github/workflows/lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Linting
33
on:
44
pull_request:
55
push:
6+
branches:
7+
- master
8+
- stable
9+
- rc/**
610

711
jobs:
812
style:

.github/workflows/stan.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: stan
2+
3+
# Disabled because Stan does not yet support GHC >= 9.0. See:
4+
# https://github.com/kowainik/stan/issues/423
5+
6+
# on:
7+
# pull_request:
8+
# push:
9+
# branches:
10+
# - master
11+
# - stable
12+
# - rc/**
13+
14+
jobs:
15+
build:
16+
name: ghc ${{ matrix.ghc }}
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
cabal: ["3.6"]
21+
ghc:
22+
- "8.10.7"
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
with:
27+
submodules: true
28+
29+
- uses: haskell/actions/setup@v1
30+
name: Setup GHC and cabal-install
31+
with:
32+
ghc-version: ${{ matrix.ghc }}
33+
cabal-version: ${{ matrix.cabal }}
34+
35+
- uses: actions/cache@v2
36+
name: cache ~/.cabal/store
37+
with:
38+
path: ~/.cabal/store
39+
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
40+
41+
- name: update
42+
run: cabal update
43+
44+
- name: install stan
45+
run: cabal install stan --installdir=.bin --install-method=copy --overwrite-policy=always
46+
47+
- name: generate .hie for analysis
48+
run: cabal build stack:lib:stack
49+
50+
- name: stan
51+
run: .bin/stan report

.github/workflows/unit-tests.yml

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- rc/**
1010
workflow_dispatch:
1111

12+
# As of 11 August 2022, ubuntu-latest, windows-latest and macos-latest come with
13+
# Stack 2.7.5. ubuntu-latest comes with GHC 9.2.4.
14+
1215
jobs:
1316
pedantic:
1417
name: Pedantic
@@ -17,7 +20,7 @@ jobs:
1720
- name: Clone project
1821
uses: actions/checkout@v3
1922
- name: Cache dependencies
20-
uses: actions/cache@v1
23+
uses: actions/cache@v3
2124
with:
2225
path: ~/.stack
2326
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}
@@ -40,44 +43,50 @@ jobs:
4043
stack-yaml: stack.yaml
4144
extra-suffix: "alpine"
4245
stack-args: "--docker --system-ghc --no-install-ghc --flag stack:static"
43-
- os: ubuntu-latest
44-
stack-yaml: stack-ghc-902.yaml
45-
extra-suffix: ""
46-
stack-args: ""
4746
- os: windows-latest
4847
stack-yaml: stack.yaml
4948
extra-suffix: ""
5049
stack-args: ""
51-
- os: windows-latest
52-
stack-yaml: stack-ghc-902.yaml
53-
extra-suffix: ""
54-
stack-args: ""
5550
- os: macos-latest
56-
stack-yaml: stack.yaml
51+
stack-yaml: stack-macos.yaml
5752
extra-suffix: ""
5853
stack-args: ""
5954
steps:
6055
- name: Clone project
61-
uses: actions/checkout@v2
56+
uses: actions/checkout@v3
6257
- name: Cache dependencies on Unix-like OS
6358
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
6459
uses: actions/cache@v3
6560
with:
6661
path: ~/.stack
67-
key: ${{ runner.os }}-${{ hashFiles( matrix.stack-yaml ) }}-${{ matrix.extra-suffix }}
62+
key: ${{ runner.os }}-${{ hashFiles(matrix.stack-yaml) }}-${{ matrix.extra-suffix }}
6863
- name: Cache dependencies on Windows
6964
if: startsWith(runner.os, 'Windows')
7065
uses: actions/cache@v3
7166
with:
7267
path: |
7368
~\AppData\Roaming\stack
7469
~\AppData\Local\Programs\stack
75-
key: ${{ runner.os }}-${{ hashFiles( matrix.stack-yaml ) }}-${{ matrix.extra-suffix }}
76-
- shell: bash
70+
key: ${{ runner.os }}-${{ hashFiles(matrix.stack-yaml) }}-${{ matrix.extra-suffix }}
71+
- name: Run tests
72+
shell: bash
7773
run: |
7874
set -ex
79-
stack upgrade || curl -sSL https://get.haskellstack.org/ | sh -s - -f
80-
stack test ${{ matrix.stack-args }} --haddock --no-haddock-deps --ghc-options="-Werror" --copy-bins --local-bin-path bin
75+
76+
if [[ "${{ matrix.extra-suffix }}" == "alpine" ]]
77+
then
78+
mkdir -p ~/.stack
79+
touch ~/.stack/config.yaml
80+
cat > ~/.stack/config.yaml <<EOF
81+
extra-include-dirs:
82+
- /usr/include
83+
extra-lib-dirs:
84+
- /lib
85+
- /usr/lib
86+
EOF
87+
fi
88+
89+
stack test ${{ matrix.stack-args }} --stack-yaml ${{ matrix.stack-yaml }} --haddock --no-haddock-deps --ghc-options="-Werror -O0" --copy-bins --local-bin-path bin
8190
8291
# Get output about whether the exe is dynamically linked
8392
if [[ "${{ matrix.os }}" == "macos-latest" ]]

.gitignore

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,48 @@
1+
# Cabal and GHC build artefacts
2+
dist/
3+
dist-newstyle/
14
*.hi
25
*.o
6+
7+
# Haskell Tool Stack-related
8+
.stack-work/
9+
test/integration/tests/**/*.yaml.lock
10+
11+
# Stack's GitHub workflow-related
12+
_release/
13+
14+
# MkDocs-related
15+
_site/
16+
17+
# Stan-related
18+
.hie
19+
stan.html
20+
21+
# Emacs-related
22+
.dir-locals.el
23+
*_flymake.hs
24+
25+
# Vim-related
326
*.swp
427
*.tag
5-
*~
6-
*_flymake.hs
28+
29+
# IntelliJ IDE-related
30+
.idea/
31+
*.iml
32+
33+
# hsenv-related
734
.hsenv
8-
.stack-work/
9-
.stack-root/
10-
/.cabal-sandbox/
11-
TAGS
12-
/Setup
13-
cabal-dev/
14-
cabal.sandbox.config
15-
dist/
16-
tags
17-
/_release/
35+
36+
# Vagrant-related
1837
.vagrant/
19-
*.imports
20-
/.idea/
21-
/*.iml
22-
/src/highlight.js
23-
/src/style.css
24-
/_site/
25-
/.dir-locals.el
26-
/.git/
27-
/etc/scripts/stack-scripts.cabal
38+
39+
# HSpec-related
2840
.hspec-failures
41+
42+
# Unexplained
43+
*~
44+
*.imports
45+
src/highlight.js
46+
src/style.css
47+
etc/scripts/stack-scripts.cabal
2948
better-cache/
30-
stack*.yaml.lock
31-
dist-newstyle/

.readthedocs.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-20.04
11+
tools:
12+
python: "3.6"
13+
14+
mkdocs:
15+
configuration: mkdocs.yml
16+
17+
# Optionally declare the Python requirements required to build your docs
18+
python:
19+
install:
20+
- requirements: doc/requirements.txt

0 commit comments

Comments
 (0)