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

Update CI for macOS/AArch64 and other developments #124

Merged
merged 1 commit into from
Feb 4, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up HLint
uses: haskell-actions/hlint-setup@v2
with:
version: "3.6.1"
version: "3.8"
- name: Apply HLint
run: |
set -ex
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/stan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-${{ hashFiles('stack.yaml') }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('stack.yaml') }}

- name: Install stan
run: |
Expand All @@ -33,7 +33,7 @@ jobs:
run: .bin/stan report --cabal-file-path=pantry.cabal

- name: Upload HTML report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Stan_report
path: stan.html
32 changes: 21 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
- master
workflow_dispatch:

# As of 6 January 2024, ubuntu-latest, windows-latest and macos-latest come
# with Stack 2.13.1.
# As of 4 February 2024, ubuntu-latest, windows-latest and macos-latest come
# with Stack 2.13.1. However, macos-14 does not come with Haskell tools.

jobs:
build:
Expand All @@ -21,34 +21,44 @@ jobs:
- ubuntu-latest
resolver:
- stack-ghc-9.4.8.yaml
- stack-ghc-9.6.3.yaml
- stack-ghc-9.6.4.yaml
- stack-ghc-9.8.1.yaml
include:
- os: macos-latest
resolver: stack-ghc-9.8.1.yaml
# macos-14 provides macOS/AArch64 (M1)
- os: macos-14
resolver: stack-ghc-9.8.1.yaml
- os: windows-latest
resolver: stack-ghc-9.8.1.yaml
steps:
- name: Clone project
uses: actions/checkout@v4
- name: Cache dependencies on Unix-like OS
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.resolver }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.resolver }}
- name: Cache dependencies on Windows
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~\AppData\Roaming\stack
~\AppData\Local\Programs\stack
key: ${{ runner.os }}-${{ matrix.resolver }}
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.resolver }}
- name: Build and run tests
shell: bash
run: |
set -ex

if [[ "${{ matrix.os }}" == "macos-14" ]]
then
# macos-14 does not include Haskell tools as at 2024-02-04.
curl -sSL https://get.haskellstack.org/ | sh
fi

stack --resolver ${{ matrix.resolver }} test --bench --no-run-benchmarks --haddock --no-haddock-deps
test-pretty-exceptions:
name: Test build of test-pretty-exceptions
Expand All @@ -66,18 +76,18 @@ jobs:
uses: actions/checkout@v4
- name: Cache dependencies on Unix-like OS
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.resolver }}-pretty
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.resolver }}-pretty
- name: Cache dependencies on Windows
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~\AppData\Roaming\stack
~\AppData\Local\Programs\stack
key: ${{ runner.os }}-${{ matrix.resolver }}-pretty
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.resolver }}-pretty
- name: Build test-pretty-exceptions
shell: bash
run: |
Expand Down
4 changes: 4 additions & 0 deletions .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
name: "Use fewer imports"
within:
- Pantry.Types
- ignore:
name: "Functor law"
within:
- Pantry.Types
2 changes: 1 addition & 1 deletion stack-ghc-9.2.8.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Snapshot specification for GHC 9.2.8.
resolver: lts-20.26 # GHC 9.2.8
snapshot: lts-20.26 # GHC 9.2.8

packages:
- aeson-warning-parser-0.1.1@sha256:e5b81492d39bfe5de99fdc838e54e0fc0f2e290eb9fcfd4531cabf24baeada76,1353
Expand Down
2 changes: 1 addition & 1 deletion stack-ghc-9.4.8.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Snapshot specification for GHC 9.4.8.
resolver: lts-21.25 # GHC 9.4.8
snapshot: lts-21.25 # GHC 9.4.8

packages:
- aeson-warning-parser-0.1.1@sha256:e5b81492d39bfe5de99fdc838e54e0fc0f2e290eb9fcfd4531cabf24baeada76,1353
Expand Down
6 changes: 0 additions & 6 deletions stack-ghc-9.6.3.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions stack-ghc-9.6.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Snapshot specification for GHC 9.6.4.
snapshot: lts-22.9 # GHC 9.6.4

flags:
hackage-security:
cabal-syntax: true
2 changes: 1 addition & 1 deletion stack-ghc-9.8.1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Snapshot specification for GHC 9.8.1.
resolver: nightly-2024-01-17 # GHC 9.8.1
snapshot: nightly-2024-02-04 # GHC 9.8.1

packages:
- hedgehog-1.4@sha256:47633efec27b49fe5a21d51f3b9fce428ca4b945d39eaa163b2b6a1d3e1465be,4724
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
resolver: stack-ghc-9.6.3.yaml
snapshot: stack-ghc-9.6.4.yaml
8 changes: 4 additions & 4 deletions stack.yaml.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.