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

Use crypton and bootstrap CI #155

Merged
merged 3 commits into from
Mar 5, 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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

# Trigger the workflow on push or pull request, but only for the main branch
on:
pull_request:
push:
branches: ["master"]

jobs:
generate-matrix:
name: "Generate matrix from cabal"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
- name: Extract the tested GHC versions
id: set-matrix
uses: kleidukos/get-tested@v0.1.6.0
with:
cabal-file: wreq.cabal
ubuntu: true
version: 0.1.6.0
tests:
name: ${{ matrix.ghc }} on ${{ matrix.os }}
needs: generate-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
steps:
- name: Checkout base repo
uses: actions/checkout@v4
- name: Set up Haskell
id: setup-haskell
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 'latest'
- name: Configure
run: cabal configure --enable-tests
- name: Freeze
run: cabal freeze
- name: Cache
uses: actions/cache@v4.0.1
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-
- name: Build
run: cabal new-build
- name: Test
run: cabal new-test all
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist-newstyle
cabal.project.local
4 changes: 2 additions & 2 deletions wreq.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ maintainer: bos@serpentine.com
copyright: 2014 Bryan O'Sullivan
category: Web
build-type: Custom
tested-with: GHC==9.2.8
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4
extra-source-files:
README.md
TODO.md
Expand Down Expand Up @@ -110,7 +110,7 @@ library
bytestring >= 0.9,
case-insensitive,
containers,
cryptonite,
crypton,
exceptions >= 0.5,
ghc-prim,
hashable,
Expand Down
Loading