Skip to content

Commit a4f3c08

Browse files
authored
Merge branch 'master' into random-test-ghc-env
2 parents 4cce213 + 11e9737 commit a4f3c08

File tree

82 files changed

+2488
-1539
lines changed

Some content is hidden

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

82 files changed

+2488
-1539
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.
1+
Note: Fixes for the online documentation of the current Stack release (https://docs.haskellstack.org/en/stable/) should target the 'stable' branch, not the 'master' branch.
22

3-
Please include the following checklist in your PR:
3+
Please include the following checklist in your pull request:
44

5-
* [ ] Any changes that could be relevant to users have been recorded in the ChangeLog.md
6-
* [ ] The documentation has been updated, if necessary.
5+
* [ ] Any changes that could be relevant to users have been recorded in ChangeLog.md.
6+
* [ ] The documentation has been updated, if necessary
77

88
Please also shortly describe how you tested your change. Bonus points for added tests!

.github/workflows/arm64-release.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
8-
- stable
9-
- rc/**
7+
- master
8+
- stable
9+
- rc/**
1010
tags:
11-
- '**'
11+
- '**'
1212
workflow_dispatch:
1313

1414
jobs:
1515
arm64:
1616
name: Publish bindist
1717
runs-on: [self-hosted, linux, ARM64]
1818
steps:
19-
- name: Clone project
20-
uses: actions/checkout@v2
21-
- shell: bash
22-
run: |
23-
set -ex
19+
- name: Clone project
20+
uses: actions/checkout@v2
21+
- shell: bash
22+
run: |
23+
set -ex
2424
25-
docker build . -f etc/dockerfiles/arm64.Dockerfile -t stack --build-arg USERID=$(id -u) --build-arg GROUPID=$(id -g)
26-
rm -rf _release
27-
mkdir -p _release
28-
docker run --rm -v $(pwd):/src -w /src stack bash -c "/home/stack/release build"
25+
docker build . -f etc/dockerfiles/arm64.Dockerfile -t stack --build-arg USERID=$(id -u) --build-arg GROUPID=$(id -g)
26+
rm -rf _release
27+
mkdir -p _release
28+
docker run --rm -v $(pwd):/src -w /src stack bash -c "/home/stack/release build"
2929
30-
- name: Upload bindist
31-
uses: actions/upload-artifact@v2
32-
with:
33-
name: Linux-ARM64
34-
path: _release/stack-*
30+
- name: Upload bindist
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: Linux-ARM64
34+
path: _release/stack-*

.github/workflows/integration-tests.yml

Lines changed: 134 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
8-
- stable
9-
- rc/**
7+
- master
8+
- stable
9+
- rc/**
1010
tags:
11-
- '**'
11+
- '**'
1212
schedule:
1313
- cron: "0 0 * * *"
1414
workflow_dispatch:
@@ -31,143 +31,152 @@ jobs:
3131
release-args: ""
3232
cache-bust: "1"
3333
steps:
34-
- name: Clone project
35-
uses: actions/checkout@v2
36-
- name: Cache dependencies
37-
uses: actions/cache@v1
38-
with:
39-
path: ~/.stack
40-
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}${{ matrix.cache-bust }}
41-
- shell: bash
42-
name: Install deps and run checks
43-
run: |
44-
set -ex
34+
- name: Clone project
35+
uses: actions/checkout@v2
36+
- name: Cache dependencies on Unix-like OS
37+
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
38+
uses: actions/cache@v3
39+
with:
40+
path: ~/.stack
41+
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}${{ matrix.cache-bust }}
42+
- name: Cache dependencies on Windows
43+
if: startsWith(runner.os, 'Windows')
44+
uses: actions/cache@v3
45+
with:
46+
path: |
47+
~\AppData\Roaming\stack
48+
~\AppData\Local\Programs\stack
49+
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}${{ matrix.cache-bust }}
50+
- shell: bash
51+
name: Install deps and run checks
52+
run: |
53+
set -ex
4554
46-
# Work around 'git status' always showing symlinks modified on Windows; see
47-
# https://github.com/git-for-windows/git/issues/2653#issuecomment-640234081
48-
git config --global core.fscache false
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
4958
50-
stack upgrade || curl -sSL https://get.haskellstack.org/ | sh -s - -f
59+
stack upgrade || curl -sSL https://get.haskellstack.org/ | sh -s - -f
5160
52-
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]
53-
then
54-
# Retry installing nix due to nondeterministic error
55-
# Fatal error: glibc detected an invalid stdio handle
56-
# See:
57-
# https://github.com/nh2/static-haskell-nix/pull/27#issuecomment-502652181
58-
# https://github.com/NixOS/nix/issues/2733
59-
(for i in {1..5}; do bash <(curl -sSL https://nixos.org/nix/install) && exit 0; done; exit 1)
60-
. ~/.nix-profile/etc/profile.d/nix.sh
61-
nix-channel --add https://nixos.org/channels/nixos-19.09 nixpkgs
62-
nix-channel --update # Get GHC 8.2.2
63-
elif [[ "${{ matrix.os }}" == "windows-latest" ]]
64-
then
65-
choco install nsis-unicode -y
66-
fi
61+
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]
62+
then
63+
# Retry installing nix due to nondeterministic error
64+
# Fatal error: glibc detected an invalid stdio handle
65+
# See:
66+
# https://github.com/nh2/static-haskell-nix/pull/27#issuecomment-502652181
67+
# 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)
69+
. ~/.nix-profile/etc/profile.d/nix.sh
70+
nix-channel --add https://nixos.org/channels/nixos-19.09 nixpkgs
71+
nix-channel --update # Get GHC 8.2.2
72+
elif [[ "${{ matrix.os }}" == "windows-latest" ]]
73+
then
74+
choco install nsis-unicode -y
75+
fi
6776
68-
# Do this in the same step as installing deps to get relevant env var modifications
69-
stack etc/scripts/release.hs check ${{ matrix.release-args }}
77+
# Do this in the same step as installing deps to get relevant env var modifications
78+
stack etc/scripts/release.hs check ${{ matrix.release-args }}
7079
71-
set +ex
80+
set +ex
7281
73-
- shell: bash
74-
name: Build bindist
75-
run: stack etc/scripts/release.hs build ${{ matrix.release-args }}
82+
- name: Build bindist
83+
shell: bash
84+
run: stack etc/scripts/release.hs build ${{ matrix.release-args }}
7685

77-
- name: Upload bindist
78-
uses: actions/upload-artifact@v2
79-
with:
80-
name: ${{ runner.os }}
81-
path: _release/stack-*
86+
- name: Upload bindist
87+
uses: actions/upload-artifact@v2
88+
with:
89+
name: ${{ runner.os }}
90+
path: _release/stack-*
8291

8392
github-release:
8493
name: Create Github release
8594
needs: integration-tests
8695
runs-on: ubuntu-latest
8796
if: startsWith(github.ref, 'refs/tags/')
8897
steps:
89-
- name: Download Linux artifact
90-
uses: actions/download-artifact@v2
91-
with:
92-
name: Linux
93-
path: _release
94-
- name: Download macOS artifact
95-
uses: actions/download-artifact@v2
96-
with:
97-
name: macOS
98-
path: _release
99-
- name: Download Windows artifact
100-
uses: actions/download-artifact@v2
101-
with:
102-
name: Windows
103-
path: _release
104-
- shell: bash
105-
name: Hash and sign assets
106-
env:
107-
RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }}
108-
run: |
109-
set -e
110-
echo "$RELEASE_SIGNING_KEY"|gpg --import
111-
cd _release
112-
for asset in *; do
113-
shasum -a 256 "$asset" >"$asset.sha256"
114-
gpg --digest-algo=sha512 --detach-sig --armor -u 0x575159689BEFB442 "$asset"
115-
done
116-
- name: Set Github ref variables
117-
id: github_ref_vars
118-
run: |
119-
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
120-
- name: Create Github release (final)
121-
if: "!startsWith(github.ref, 'refs/tags/rc/')"
122-
uses: actions/create-release@v1
123-
env:
124-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125-
with:
126-
tag_name: ${{ github.ref }}
127-
body: |
128-
See https://haskellstack.org/ for installation and upgrade instructions.
98+
- name: Download Linux artifact
99+
uses: actions/download-artifact@v2
100+
with:
101+
name: Linux
102+
path: _release
103+
- name: Download macOS artifact
104+
uses: actions/download-artifact@v2
105+
with:
106+
name: macOS
107+
path: _release
108+
- name: Download Windows artifact
109+
uses: actions/download-artifact@v2
110+
with:
111+
name: Windows
112+
path: _release
113+
- name: Hash and sign assets
114+
shell: bash
115+
env:
116+
RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }}
117+
run: |
118+
set -e
119+
echo "$RELEASE_SIGNING_KEY"|gpg --import
120+
cd _release
121+
for asset in *; do
122+
shasum -a 256 "$asset" >"$asset.sha256"
123+
gpg --digest-algo=sha512 --detach-sig --armor -u 0x575159689BEFB442 "$asset"
124+
done
125+
- name: Set Github ref variables
126+
id: github_ref_vars
127+
run: |
128+
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
129+
- name: Create Github release (final)
130+
if: "!startsWith(github.ref, 'refs/tags/rc/')"
131+
uses: actions/create-release@v1
132+
env:
133+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134+
with:
135+
tag_name: ${{ github.ref }}
136+
body: |
137+
See https://haskellstack.org/ for installation and upgrade instructions.
129138
130-
**Changes since v[INSERT PREVIOUS VERSION]:**
139+
**Changes since v[INSERT PREVIOUS VERSION]:**
131140
132-
[INSERT CHANGELOG]
141+
[INSERT CHANGELOG]
133142
134-
**Thanks to all our contributors for this release:**
143+
**Thanks to all our contributors for this release:**
135144
136-
[INSERT CONTRIBUTORS]
137-
draft: true
138-
prerelease: false
139-
- name: Create Github release (release candidate)
140-
if: "startsWith(github.ref, 'refs/tags/rc/')"
141-
uses: actions/create-release@v1
142-
env:
143-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144-
with:
145-
tag_name: ${{ github.ref }}
146-
body: |
147-
**Changes since v[INSERT PREVIOUS VERSION]:**
145+
[INSERT CONTRIBUTORS]
146+
draft: true
147+
prerelease: false
148+
- name: Create Github release (release candidate)
149+
if: "startsWith(github.ref, 'refs/tags/rc/')"
150+
uses: actions/create-release@v1
151+
env:
152+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
153+
with:
154+
tag_name: ${{ github.ref }}
155+
body: |
156+
**Changes since v[INSERT PREVIOUS VERSION]:**
148157
149-
[INSERT CHANGELOG]
150-
draft: true
151-
prerelease: true
152-
- name: Upload assets to Github release (final)
153-
if: "!startsWith(github.ref, 'refs/tags/rc/')"
154-
uses: xresloader/upload-to-github-release@v1
155-
env:
156-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157-
with:
158-
file: "_release/*"
159-
tag_name: ${{ steps.github_ref_vars.outputs.SOURCE_TAG }}
160-
draft: true
161-
prerelease: false
162-
overwrite: true
163-
- name: Upload assets to Github release (release candidate)
164-
if: "startsWith(github.ref, 'refs/tags/rc/')"
165-
uses: xresloader/upload-to-github-release@v1
166-
env:
167-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168-
with:
169-
file: "_release/*"
170-
tag_name: ${{ steps.github_ref_vars.outputs.SOURCE_TAG }}
171-
draft: true
172-
prerelease: true
173-
overwrite: true
158+
[INSERT CHANGELOG]
159+
draft: true
160+
prerelease: true
161+
- name: Upload assets to Github release (final)
162+
if: "!startsWith(github.ref, 'refs/tags/rc/')"
163+
uses: xresloader/upload-to-github-release@v1
164+
env:
165+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166+
with:
167+
file: "_release/*"
168+
tag_name: ${{ steps.github_ref_vars.outputs.SOURCE_TAG }}
169+
draft: true
170+
prerelease: false
171+
overwrite: true
172+
- name: Upload assets to Github release (release candidate)
173+
if: "startsWith(github.ref, 'refs/tags/rc/')"
174+
uses: xresloader/upload-to-github-release@v1
175+
env:
176+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177+
with:
178+
file: "_release/*"
179+
tag_name: ${{ steps.github_ref_vars.outputs.SOURCE_TAG }}
180+
draft: true
181+
prerelease: true
182+
overwrite: true

.github/workflows/lint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Linting
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
style:
9+
name: Linting
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Clone project
13+
uses: actions/checkout@v3
14+
- name: Apply yamllint
15+
uses: ibiqlik/action-yamllint@v3
16+
with:
17+
format: github
18+
- name: Set up HLint
19+
uses: haskell/actions/hlint-setup@v2
20+
with:
21+
version: "3.4"
22+
- name: Apply HLint
23+
run: |
24+
set -ex
25+
hlint src/
26+
hlint src/ --cpp-define=WINDOWS=1
27+
hlint test/ --cpp-simple

0 commit comments

Comments
 (0)