Skip to content
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
4 changes: 4 additions & 0 deletions .github/haskell-gha.conf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
hooks:
after-build:
- name: Generate tags for this repository
run: ./scripts/check-tags.sh
52 changes: 0 additions & 52 deletions .github/workflows/ci.yml

This file was deleted.

128 changes: 128 additions & 0 deletions .github/workflows/haskell-gha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# This file was generated by haskell-gha, do not edit it.
#
# To regenerate it, run:
# haskell-gha
#
# Version: 1.0
#
# For more information, see https://github.com/arybczak/haskell-gha
name: CI

on:
push:
branches:
- master
- main
pull_request:
merge_group:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
build:
name: GHC ${{ matrix.ghc }}
runs-on: ubuntu-26.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
ghc:
- '9.10'
- '9.12'
- '9.14'
steps:
- uses: actions/checkout@v7

- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.16.1.0'

- name: Show the versions
id: versions
run: |
ghc --version
cabal --version
echo "GHC ${{ steps.setup.outputs.ghc-version }}, cabal ${{ steps.setup.outputs.cabal-version }}, image $ImageOS $ImageVersion" >> "$GITHUB_STEP_SUMMARY"
echo "image=$ImageOS" >> "$GITHUB_OUTPUT"

- name: Unpack the source tarballs
run: |
shopt -s extglob
cabal sdist all --output-directory="$RUNNER_TEMP"/haskell-gha-sdist
mkdir "$RUNNER_TEMP"/haskell-gha
for f in cabal.project cabal.project.freeze cabal.project.local; do
if [ -f "$f" ]; then cp "$f" "$RUNNER_TEMP"/haskell-gha; fi
done
tar -xzf "$RUNNER_TEMP"/haskell-gha-sdist/ghc-tags-+([0-9.]).tar.gz --strip-components=1 -C "$RUNNER_TEMP"/haskell-gha

- name: Configure the project
working-directory: ${{ runner.temp }}/haskell-gha
run: |
cat >> cabal.project.local <<'EOF'
jobs: 4
tests: True
benchmarks: True

package ghc-tags
ghc-options: -Werror
EOF

- name: Enable the GHC job semaphore
working-directory: ${{ runner.temp }}/haskell-gha
run: |
echo 'semaphore: True' >> cabal.project.local

- name: Make the build plan
id: plan
working-directory: ${{ runner.temp }}/haskell-gha
run: |
cabal build all --dry-run
echo "hash=$(sha256sum dist-newstyle/cache/plan.json | cut -d ' ' -f 1)" >> "$GITHUB_OUTPUT"

- uses: actions/cache/restore@v6
id: cache
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ runner.os }}-${{ steps.versions.outputs.image }}-ghc-${{ steps.setup.outputs.ghc-version }}-${{ steps.plan.outputs.hash }}
restore-keys: ${{ runner.os }}-${{ steps.versions.outputs.image }}-ghc-${{ steps.setup.outputs.ghc-version }}-

- name: Build the dependencies
working-directory: ${{ runner.temp }}/haskell-gha
run: |
cabal build all --only-dependencies

- uses: actions/cache/save@v6
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: Build
working-directory: ${{ runner.temp }}/haskell-gha
run: |
cabal build all

- name: Generate tags for this repository
run: ./scripts/check-tags.sh

- name: Check the packages
working-directory: ${{ runner.temp }}/haskell-gha
run: |
cabal check

- name: Build the documentation
working-directory: ${{ runner.temp }}/haskell-gha
run: |
cabal haddock all --disable-documentation --haddock-all --haddock-for-hackage
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ghc-tags

[![Build Status](https://github.com/arybczak/ghc-tags/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/arybczak/ghc-tags/actions?query=branch%3Amaster)
[![Build Status](https://github.com/arybczak/ghc-tags/actions/workflows/haskell-gha.yml/badge.svg?branch=master)](https://github.com/arybczak/ghc-tags/actions?query=branch%3Amaster)
[![Hackage](https://img.shields.io/hackage/v/ghc-tags.svg)](https://hackage.haskell.org/package/ghc-tags)

A command line tool that generates etags
Expand Down
4 changes: 2 additions & 2 deletions ghc-tags.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ author: Andrzej Rybczak
maintainer: andrzej@rybczak.net
copyright: Andrzej Rybczak
category: Development
extra-source-files: CHANGELOG.md
extra-doc-files: CHANGELOG.md
README.md
homepage: https://github.com/arybczak/ghc-tags
bug-reports: https://github.com/arybczak/ghc-tags/issues
tested-with: GHC == { 9.10.3, 9.12.4, 9.14.1 }
tested-with: GHC ^>= { 9.10, 9.12, 9.14 }

source-repository head
type: git
Expand Down