-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from haskell/use-crypton-and-bootstrap-ci
Use crypton and bootstrap CI
- Loading branch information
Showing
4 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist-newstyle | ||
cabal.project.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters