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

Add nightly ci and cancel conflicting runs #500

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
37 changes: 31 additions & 6 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
name: Haskell CI
# If it's a scheduled (for us: nightly) build, set the name of this run to a static value, so we can identify it easier.
# Otherwise, replicate the default run name: either the PR title if it exists, or the commit message otherwise.
run-name: |
${{github.event_name == 'schedule' && 'Haskell CI - NIGHTLY'
|| github.event.pull_request.title == '' && github.event.head_commit.message
|| github.event.pull_request.title}}

on:
push:
branches: [ "master", "release/**" ]
pull_request:
branches: [ "**" ]
push:
branches: [ "master" ]
schedule:
# "Nightly" builds: Every day at 06:00 UTC
- cron: '0 6 * * *'
# for running the workflow manually - useful for branches without PRs, for which jobs don't get ran automatically
workflow_dispatch:
inputs:
nightly:
description: Run with the same settings as a nightly build
type: boolean
default: false

# Cancel running workflows when a new workflow on the same PR or branch is started,
# but put scheduled workflows into their own group
concurrency:
group: ${{
format('{0}-{1}{2}',
github.workflow,
github.event.pull_request.number || github.ref,
github.event_name == 'schedule' && '-scheduled' || '')}}
cancel-in-progress: true

jobs:
whitespace:
Expand Down Expand Up @@ -37,7 +62,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7", "9.2.8", "9.6.4", "9.8.2", "9.10.1"]
ghc: ["8.10.7", "9.2.8", "9.6.6", "9.8.2", "9.10.1"]
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
# GHC versions older than ghc-9.2 are not supported on macos-latest
exclude:
Expand All @@ -46,7 +71,7 @@ jobs:
- os: macos-13
ghc: "9.2.8"
- os: macos-13
ghc: "9.6.4"
ghc: "9.6.6"
- os: macos-13
ghc: "9.8.2"
- os: macos-13
Expand Down Expand Up @@ -165,7 +190,7 @@ jobs:
# limit-access-to-actor: true

- name: Cache HLS artifacts (used to speed up GitHub Codespaces bootstrapping)
if: runner.os == 'Linux' && (matrix.ghc == '8.10.7' || matrix.ghc == '9.6.4')
if: runner.os == 'Linux' && (matrix.ghc == '8.10.7' || matrix.ghc == '9.6.6')
uses: input-output-hk/actions/cache@latest
with:
ghc_version: ${{ matrix.ghc == '8.10.7' && 'ghc810' || matrix.ghc == '9.6.4' && 'ghc96' }}
ghc_version: ${{ matrix.ghc == '8.10.7' && 'ghc810' || matrix.ghc == '9.6.6' && 'ghc96' }}
Loading