Skip to content

Fix CI and test with newer ghcs #109

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
50 changes: 33 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,37 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ['8.6', '8.8', '8.10', '9.0', '9.2']
ghc: ['9.6', '9.8', '9.10', '9.12']
include:
- cabal: latest
- ghc: '8.6'
cabal: '3.6'
- ghc: '8.8'
cabal: '3.6'
- ghc: '8.10'
cabal: '3.6'
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.3
name: Cache ~/.cabal/packages
with:
path: ~/.cabal/packages
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-packages
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.3
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.3
name: Cache dist-newstyle
with:
path: dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-dist-newstyle
- uses: haskell/actions/setup@v2.4.7
- uses: haskell-actions/setup@v2.7.11
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.6'
cabal-version: ${{ matrix.cabal }}
- name: Update cabal package database
run: cabal update
- name: Build
Expand All @@ -48,11 +56,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
stack-yaml: ['stack-8.10.yaml']
stack-yaml: ['stack-8.10.yaml', 'stack-9.8.yaml']
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.3
name: Cache ~/.stack
with:
path: ~/.stack
Expand All @@ -73,14 +81,18 @@ jobs:
stack bench --stack-yaml ${{ matrix.stack-yaml }} opentelemetry-extra --benchmark-arguments '+RTS -l'

macos-stack:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
stack-yaml: ['stack-8.10.yaml']
include:
- os: macOS-latest
stack-yaml: 'stack-9.8.yaml'
- os: macOS-13
stack-yaml: 'stack-8.10.yaml'
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.3
name: Cache ~/.stack
with:
path: ~/.stack
Expand All @@ -104,29 +116,33 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
ghc: ['8.10', '9.0', '9.2']
include:
- ghc: '9.8'
cabal: latest
- ghc: '8.10'
cabal: '3.8'
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.3
name: Cache ~/.cabal/packages
with:
path: ~/.cabal/packages
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-packages
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.3
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store
- uses: actions/cache@v3.3.1
- uses: actions/cache@v4.2.3
name: Cache dist-newstyle
with:
path: dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-dist-newstyle
- uses: haskell/actions/setup@v2.4.7
- uses: haskell-actions/setup@v2.7.11
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.6'
cabal-version: ${{ matrix.cabal }}
- name: Update cabal package database
run: cabal update
- name: Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ handleOpenTelemetryEventlogEvent m st (tid, now, m_trace_id) =
Nothing -> error $ "set spanid " <> show serial <> " " <> show span_id <> ": span id not found"
SetTraceEv (SpanInFlight serial) trace_id ->
case HM.lookup serial $ serial2sid st of
Nothing -> error $ "set traceid: span id not found for serial" <> show serial
Nothing -> error $ "set traceid: span id not found for serial " <> show serial
Just span_id ->
( (modifySpan span_id (setTraceId trace_id) st)
{ traceMap = HM.insert tid trace_id $ traceMap st
Expand All @@ -287,7 +287,7 @@ handleOpenTelemetryEventlogEvent m st (tid, now, m_trace_id) =
)
TagEv (SpanInFlight serial) k v ->
case HM.lookup serial $ serial2sid st of
Nothing -> error $ "set tag: span id not found for serial" <> show serial
Nothing -> error $ "set tag: span id not found for serial " <> show serial
Just span_id -> (modifySpan span_id (setTag k v) st, [], [])
EndSpanEv (SpanInFlight serial) ->
case HM.lookup serial $ serial2sid st of
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-extra/unit-tests/Arbitrary.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -Wno-orphans -fconstraint-solver-iterations=8 #-}

module Arbitrary where

Expand Down
6 changes: 1 addition & 5 deletions stack-8.10.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: nightly-2021-04-02
resolver: lts-18.28

packages:
- megaexample
Expand All @@ -8,7 +8,3 @@ packages:
- opentelemetry-wai

allow-newer: true

extra-deps:
- jsonifier-0.1.0.5
- ptr-poker-0.1.1.3
10 changes: 10 additions & 0 deletions stack-9.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resolver: lts-23.19

packages:
- megaexample
- opentelemetry
- opentelemetry-extra
- opentelemetry-lightstep
- opentelemetry-wai

allow-newer: true