Skip to content

Commit 64d330d

Browse files
committed
Try reverting more
1 parent 701e066 commit 64d330d

File tree

2 files changed

+30
-165
lines changed

2 files changed

+30
-165
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: "CI"
22

33
on:
44
push:
5-
branches: [ "master" ]
5+
# branches: [ "master" ]
66
pull_request:
7-
branches: [ "master", "more-aggressive-dirty-module-checking" ]
7+
# branches: [ "master" ]
88
release:
99
types: [ "published" ]
1010

@@ -13,79 +13,38 @@ defaults:
1313
shell: "bash"
1414

1515
env:
16-
CI_PRERELEASE: "${{ github.event_name == 'push' }}"
1716
CI_RELEASE: "${{ github.event_name == 'release' }}"
18-
STACK_VERSION: "2.7.5"
19-
20-
concurrency:
21-
# We never want two prereleases building at the same time, since they would
22-
# likely both claim the same version number. Pull request builds can happen
23-
# in parallel with anything else, since they don't mutate global state with a
24-
# release. Release builds don't change their behavior based on published
25-
# state, so they don't interfere with each other and there's no point in
26-
# canceling a prerelease build if a release build starts; and we would never
27-
# want a release build to be canceled by a prerelease build either. (GitHub
28-
# Actions is either too cheap to give us `if` expressions or too lazy to
29-
# document them, but we have untyped boolean operators to fall back on.)
30-
group: "${{ github.event_name != 'push' && github.run_id || 'continuous-deployment' }}"
31-
cancel-in-progress: true
3217

3318
jobs:
3419
build:
3520
strategy:
3621
fail-fast: false # do not cancel builds for other OSes if one fails
3722
matrix:
38-
include:
39-
- # If upgrading the Haskell image, also upgrade it in the lint job below
40-
os: "ubuntu-latest"
41-
# image: "ghcr.io/purescript/haskell:9.2.3-stretch@sha256:70fd2b6255deb5daa961e6983591a0e21e9ac1e793923bee54aa2cc62e01f867"
42-
image: "haskell:9.2.3-buster@sha256:51e250369e4671a15c247cdc5047397be88d7eb8e95b97b0fd9f417854a78bec"
43-
- os: "macOS-11"
44-
- os: "windows-2019"
23+
# If upgrading Ubuntu, also upgrade it in the lint job below
24+
os: [ "ubuntu-18.04", "macOS-10.15", "windows-2016" ]
4525

4626
runs-on: "${{ matrix.os }}"
47-
container: "${{ matrix.image }}"
48-
49-
outputs:
50-
do-not-prerelease: "${{ steps.build.outputs.do-not-prerelease }}"
51-
version: "${{ steps.build.outputs.version }}"
5227

5328
steps:
54-
- # We need a proper Git repository, but the checkout step will unpack a tarball instead of doing a clone
55-
# if the Git version is less than 2.18.
56-
name: "(Linux only) Install a newer version of Git"
57-
if: "${{ runner.os == 'Linux' }}"
58-
run: |
59-
. /etc/os-release
60-
echo deb http://deb.debian.org/debian "$VERSION_CODENAME"-backports main >> /etc/apt/sources.list
61-
apt-get update && apt-get install -y git/"$VERSION_CODENAME"-backports
6229
- uses: "actions/checkout@v2"
6330

64-
- uses: "actions/setup-node@v2"
31+
- uses: "actions/setup-node@v1"
6532
with:
66-
node-version: "14"
33+
node-version: "10"
6734

6835
- id: "haskell"
69-
name: "(Non-Linux only) Install Haskell"
70-
if: "${{ runner.os != 'Linux' }}"
7136
uses: "haskell/actions/setup@v1"
7237
with:
7338
enable-stack: true
74-
stack-version: "${{ env.STACK_VERSION }}"
39+
# If upgrading Stack, also upgrade it in the lint job below
40+
stack-version: "2.7.1"
7541
stack-no-global: true
7642

77-
- name: "(Linux only) Check Stack version and fix working directory ownership"
78-
if: "${{ runner.os == 'Linux' }}"
79-
run: |
80-
[ "$(stack --numeric-version)" = "$STACK_VERSION" ]
81-
chown root:root .
82-
8343
- uses: "actions/cache@v2"
8444
with:
8545
path: |
86-
/root/.stack
8746
${{ steps.haskell.outputs.stack-root }}
88-
key: "${{ runner.os }}-${{ job.container.id }}-MdyPsf-${{ hashFiles('stack.yaml') }}"
47+
key: "${{ runner.os }}-${{ hashFiles('stack.yaml') }}"
8948

9049
- name: "(Windows only) Configure Stack to store its programs in STACK_ROOT"
9150
# This ensures that the local GHC and MSYS binaries that Stack installs
@@ -96,38 +55,10 @@ jobs:
9655
mkdir -p "$STACK_ROOT"
9756
echo "local-programs-path: $STACK_ROOT/programs" > $STACK_ROOT/config.yaml
9857
99-
- id: "build"
100-
run: "ci/fix-home ci/build.sh || echo 0"
101-
102-
- name: "(Linux only) Build the entire package set"
103-
if: "${{ runner.os == 'Linux' }}"
104-
# We build in this directory in build.sh, so this is where we need to
105-
# launch `stack exec`. The actual package-set building happens in a
106-
# temporary directory.
107-
working-directory: "sdist-test"
108-
# The presence or absence of the --haddock flag changes the location
109-
# into which stack places all build artifacts. Since we use --haddock
110-
# in our CI builds, in order to actually get stack to find the purs
111-
# binary it created, we need to use the flag here as well.
112-
#
113-
# Moreover, npm has a hook issue that will cause spago to fail to install
114-
# We upgrade npm to fix this
115-
run: |
116-
npm i -g npm@8.8.0
117-
../ci/fix-home stack --haddock exec ../ci/build-package-set.sh
118-
119-
- name: Verify that 'libtinfo' isn't in binary
120-
if: runner.os == 'Linux'
121-
working-directory: "sdist-test"
122-
run: |
123-
if [ $(ldd $(../ci/fix-home stack path --local-doc-root)/../bin/purs | grep 'libtinfo' | wc -l) -ge 1 ]; then
124-
echo "libtinfo detected"
125-
ldd $(../ci/fix-home stack path --local-doc-root)/../bin/purs | grep 'libtinfo'
126-
exit 1
127-
fi
58+
- run: "ci/build.sh || echo 0"
12859

129-
- name: "(Release/prerelease only) Create bundle"
130-
if: "${{ env.CI_RELEASE == 'true' || env.CI_PRERELEASE == 'true' && steps.build.outputs.do-not-prerelease != 'true' }}"
60+
- name: "(Release only) Create bundle"
61+
if: "${{ env.CI_RELEASE == 'true' }}"
13162
run: |
13263
os_name="${{ runner.os }}"
13364
case "$os_name" in
@@ -142,16 +73,7 @@ jobs:
14273
exit 1;;
14374
esac
14475
cd sdist-test
145-
../ci/fix-home bundle/build.sh "$bundle_os"
146-
147-
- name: "(Prerelease only) Upload bundle"
148-
if: "${{ env.CI_PRERELEASE == 'true' && steps.build.outputs.do-not-prerelease != 'true' }}"
149-
uses: "actions/upload-artifact@v3"
150-
with:
151-
name: "${{ runner.os }}-bundle"
152-
path: |
153-
sdist-test/bundle/*.sha
154-
sdist-test/bundle/*.tar.gz
76+
bundle/build.sh "$bundle_os"
15577
15678
- name: "(Release only) Publish bundle"
15779
if: "${{ env.CI_RELEASE == 'true' }}"
@@ -166,96 +88,40 @@ jobs:
16688
files: "sdist-test/bundle/*.{tar.gz,sha}"
16789

16890
lint:
169-
runs-on: "ubuntu-latest"
170-
# At the moment, this is a different image from the image used for
171-
# compilation, though the GHC versions match. This is because the
172-
# compilation image uses an old version of glibc, which we want because it
173-
# means our published binaries will work on the widest number of platforms.
174-
# But the HLint binary downloaded by this job requires a newer glibc
175-
# version.
176-
container: "haskell:9.2.3-buster@sha256:51e250369e4671a15c247cdc5047397be88d7eb8e95b97b0fd9f417854a78bec"
91+
runs-on: "ubuntu-18.04"
17792

17893
steps:
179-
- # We need a proper Git repository, but the checkout step will unpack a tarball instead of doing a clone
180-
# if the Git version is less than 2.18.
181-
name: "Install a newer version of Git"
182-
run: |
183-
. /etc/os-release
184-
echo deb http://deb.debian.org/debian "$VERSION_CODENAME"-backports main >> /etc/apt/sources.list
185-
apt-get update && apt-get install -y git/"$VERSION_CODENAME"-backports
18694
- uses: "actions/checkout@v2"
18795

188-
- name: "Fix working directory ownership"
189-
run: |
190-
chown root:root .
96+
- id: "haskell"
97+
uses: "haskell/actions/setup@v1"
98+
with:
99+
enable-stack: true
100+
stack-version: "2.7.1"
101+
stack-no-global: true
191102

192103
- uses: "actions/cache@v2"
193104
with:
194105
path: |
195-
/root/.stack
196-
key: "${{ runner.os }}-${{ job.container.id }}-UnWw0N-lint-${{ hashFiles('stack.yaml') }}"
106+
${{ steps.haskell.outputs.stack-root }}
107+
key: "${{ runner.os }}-lint-${{ hashFiles('stack.yaml') }}"
197108

198-
- run: "ci/fix-home ci/run-hlint.sh --git || echo 0"
109+
- run: "ci/run-hlint.sh --git || echo 0"
199110
env:
200-
VERSION: "3.5"
111+
VERSION: "2.2.11"
201112

202113
# Note: the weeder version will need to be updated when we next update our version
203-
# of GHC.
204-
#
205-
# weeder-2.2.0 has somewhat strange version deps. It doesn't appear to
206-
# support the exact versions of dhall and generic-lens in LTS-18.
207-
# However, forcing it to use the versions of dhall and generic-lens in
208-
# LTS-18 doesn't cause any problems when building, so the following
209-
# commands build weeder while ignoring version constraints.
210-
- name: Install weeder
211-
run: |
212-
# The `stack.yaml` file is copied to a separate file so that
213-
# adding `allow-newer: true` doesn't affect any subsequant
214-
# calls to `stack`.
215-
cp stack.yaml stack-weeder.yaml
216-
# `allow-newer: true` is needed so that weeder-2.2.0 can be
217-
# installed with the dependencies present in LTS-18.
218-
echo 'allow-newer: true' >> stack-weeder.yaml
219-
ci/fix-home stack --no-terminal --jobs=2 build --copy-compiler-tool --stack-yaml ./stack-weeder.yaml weeder-2.4.0
114+
# of GHC
115+
- run: "stack --no-terminal --jobs=2 build --copy-compiler-tool weeder-2.2.0"
220116

221-
- run: "ci/fix-home stack --no-terminal --jobs=2 build --fast --ghc-options -fwrite-ide-info"
117+
- run: "stack --no-terminal --jobs=2 build --fast --ghc-options -fwrite-ide-info"
222118

223-
- run: "ci/fix-home stack exec weeder"
119+
- run: "stack exec weeder"
224120

225121
# Now do it again, with the test suite included. We don't want a
226122
# reference from our test suite to count in the above check; the fact
227123
# that a function is tested is not evidence that it's needed. But we also
228124
# don't want to leave weeds lying around in our test suite either.
229-
- run: "ci/fix-home stack --no-terminal --jobs=2 build --fast --test --no-run-tests --ghc-options -fwrite-ide-info"
230-
231-
- run: "ci/fix-home stack exec weeder"
125+
- run: "stack --no-terminal --jobs=2 build --fast --test --no-run-tests --ghc-options -fwrite-ide-info"
232126

233-
make-prerelease:
234-
runs-on: "ubuntu-latest"
235-
needs:
236-
- "build"
237-
- "lint"
238-
if: "${{ github.event_name == 'push' && needs.build.outputs.do-not-prerelease != 'true' }}"
239-
steps:
240-
- uses: "actions/download-artifact@v3"
241-
- uses: "ncipollo/release-action@v1.10.0"
242-
with:
243-
tag: "v${{ needs.build.outputs.version }}"
244-
artifacts: "*-bundle/*"
245-
prerelease: true
246-
body: "This is an automated preview release. Get the latest stable release [here](https://github.com/purescript/purescript/releases/latest)."
247-
- uses: "actions/checkout@v3"
248-
- uses: "actions/setup-node@v3"
249-
with:
250-
node-version: "16.x"
251-
registry-url: "https://registry.npmjs.org"
252-
- name: "Publish npm package"
253-
working-directory: "npm-package"
254-
env:
255-
BUILD_VERSION: "${{ needs.build.outputs.version }}"
256-
NODE_AUTH_TOKEN: "${{ secrets.NPM_TOKEN }}"
257-
run: |
258-
src_version=$(node -pe 'require("./package.json").version')
259-
npm version --allow-same-version "$BUILD_VERSION"
260-
sed -i -e "s/--purs-ver=${src_version//./\\.}/--purs-ver=$BUILD_VERSION/" package.json
261-
npm publish --tag next
127+
- run: "stack exec weeder"

purescript.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ library
315315
Language.PureScript.TypeChecker.Types
316316
Language.PureScript.TypeChecker.TypeSearch
317317
Language.PureScript.TypeChecker.Unify
318-
Language.PureScript.CST.Parser
319318
PrettyPrint
320319
System.IO.UTF8
321320
other-modules:

0 commit comments

Comments
 (0)