Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
image: haskell:9.2.8@sha256:b3b2f3909c7381bb96b8f18766f9407a3d6f61e0f07ea95e812583ac4f442cbb
- os: ["macOS-14"]
- os: ["windows-2019"]
- os: ["self-hosted", "macos", "ARM64"]
- os: ["self-hosted", "Linux", "ARM64"]
- os: [self-hosted, macOS, ARM64]
- os: [self-hosted, Linux, ARM64]

runs-on: "${{ matrix.os }}"
container: "${{ matrix.image }}"
Expand All @@ -82,7 +82,7 @@ jobs:
- uses: "actions/checkout@v2"
- uses: "actions/setup-node@v2"
with:
node-version: "16"
node-version: "22"

- id: "haskell"
name: "(Non-Linux only) Install Haskell"
Expand Down Expand Up @@ -144,7 +144,6 @@ jobs:
# Moreover, npm has a hook issue that will cause spago to fail to install
# We upgrade npm to fix this
run: |
npm i -g [email protected]
../ci/fix-home stack --haddock exec ../ci/build-package-set.sh

- name: Verify that 'libtinfo' isn't in binary
Expand Down Expand Up @@ -199,7 +198,7 @@ jobs:

- name: "(Prerelease only) Upload bundle"
if: "${{ env.CI_PRERELEASE == 'true' && steps.build.outputs.do-not-prerelease != 'true' }}"
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4.6.0"
with:
name: "${{ runner.os }}-${{ runner.arch }}-bundle"
path: |
Expand Down
14 changes: 4 additions & 10 deletions ci/build-package-set.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,17 @@ export PATH="$tmpdir/node_modules/.bin:$PATH"
cd "$tmpdir"

echo ::group::Ensure Spago is available
which spago || npm install spago@0.20.8
which spago || npm install spago@0.93.43
echo ::endgroup::

echo ::group::Create dummy project
echo 'let upstream = https://github.com/purescript/package-sets/releases/download/XXX/packages.dhall in upstream' > packages.dhall
echo '{ name = "my-project", dependencies = [] : List Text, packages = ./packages.dhall, sources = [] : List Text }' > spago.dhall
spago upgrade-set
# Override the `metadata` package's version to match `purs` version
# so that `spago build` actually works
sed -i'' "\$c in upstream with metadata.version = \"v$(purs --version | { read v z && echo $v; })\"" packages.dhall
spago install $(spago ls packages | while read name z; do if [[ $name != metadata ]]; then echo $name; fi; done)
spago init
echo ::endgroup::

echo ::group::Compile package set
spago build
spago ls packages --json | jq -r 'keys[]' | xargs spago install
echo ::endgroup::

echo ::group::Document package set
spago docs --no-search
spago docs
echo ::endgroup::