Skip to content

Commit 1b0ea3c

Browse files
committed
Make workflow mandatory, fix build issues
1 parent 7a0a923 commit 1b0ea3c

File tree

4 files changed

+33
-11
lines changed

4 files changed

+33
-11
lines changed

.github/workflows/haskell.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Haskell CI
22

33
on:
4+
merge_group:
45
pull_request:
56
push:
67
# we need this to populate cache for `main` branch to make it available to the child branches, see
@@ -140,15 +141,30 @@ jobs:
140141
KEEP_WORKSPACE: 1
141142
run: cabal test all --enable-tests --test-show-details=direct
142143

143-
check:
144-
needs: build
144+
build-successful:
145+
needs: [build]
146+
if: ${{ always() }}
147+
runs-on: ubuntu-latest
148+
steps:
149+
- name: Check if any previous job failed
150+
run: |
151+
if [[ "${{ needs.build.result }}" == "failure" ]]; then
152+
# this ignores skipped dependencies
153+
echo 'Required jobs failed to build.'
154+
exit 1
155+
else
156+
echo 'Build complete'
157+
fi
158+
159+
make-tag:
160+
needs: build-successful
161+
if: ${{ github.ref == 'refs/heads/main' }}
145162
runs-on: ubuntu-latest
146163
outputs:
147164
tag: ${{ steps.tag.outputs.tag }}
148165

149166
steps:
150167
- uses: actions/checkout@v3
151-
152168
- name: Check if cabal project is sane
153169
run: |
154170
PROJECT_DIR="$PWD"
@@ -160,7 +176,6 @@ jobs:
160176
161177
- name: Tag new version
162178
id: tag
163-
if: ${{ github.ref == 'refs/heads/main' }}
164179
run: |
165180
package_version="$(cat *.cabal | grep '^version:' | cut -d : -f 2 | xargs)"
166181
@@ -176,19 +191,22 @@ jobs:
176191
177192
echo "::set-output name=tag::v$package_version"
178193
fi
194+
else
195+
echo "Tag v$package_version already exists. Not making new git tag."
179196
fi
180197
181-
- name: Show tag
198+
- name: Show new tag
199+
if: steps.tag.outputs.tag != ''
182200
run: |
183201
echo "Ref: ${{ github.ref }}"
184202
echo "Tag: ${{ steps.tag.outputs.tag }}"
185203
186204
187205
release:
188-
needs: [build, check]
206+
needs: [make-tag]
189207
runs-on: ubuntu-latest
190208

191-
if: ${{ needs.check.outputs.tag != '' || startsWith(github.ref, 'refs/tags/v') }}
209+
if: ${{ needs.make-tag.outputs.tag != '' || startsWith(github.ref, 'refs/tags/v') }}
192210

193211
outputs:
194212
upload_url: ${{ steps.create_release.outputs.upload_url }}
@@ -249,8 +267,9 @@ jobs:
249267
id: create_release
250268
uses: softprops/action-gh-release@v2
251269
with:
252-
tag_name: ${{ needs.check.outputs.tag != '' && needs.check.outputs.tag || github.ref_name }}
253-
name: Release ${{ needs.check.outputs.tag != '' && needs.check.outputs.tag || github.ref_name }}
270+
tag_name: ${{ needs.make-tag.outputs.tag != '' && needs.make-tag.outputs.tag || github.ref_name }}
271+
name: Release ${{ needs.make-tag.outputs.tag != '' && needs.make-tag.outputs.tag || github.ref_name }}
254272
body_path: changelog.txt
255273
draft: false
256274
prerelease: false
275+

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to the [Package Versioning Policy (PVP)](https://pvp.haskell.org/).
77

88
## [Unreleased]
9+
- Updated dependency on tar ^>= 0.7
910

1011
## [0.10.0.0] - 2025-09-09
1112

@@ -361,4 +362,4 @@ and this project adheres to the [Package Versioning Policy (PVP)](https://pvp.ha
361362
[0.4.4.1]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.4.0...v0.4.4.1
362363
[0.4.4.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.3.0...v0.4.4.0
363364
[0.4.3.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.2.0...v0.4.3.0
364-
[0.4.2.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.3.0.2...v0.4.2.0
365+
[0.4.2.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.3.0.2...v0.4.2.0

hedgehog-extras.cabal

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ license: Apache-2.0
1111
license-files: LICENSE
1212
NOTICE
1313
build-type: Simple
14+
extra-doc-files: CHANGELOG.md
15+
README.md
16+
1417

1518
source-repository head
1619
type: git

src/Hedgehog/Extras/Internal/Win32/NamedPipes.hsc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import Data.Function (($))
2323
import Data.String (String)
2424
import Foreign.C.String (withCString)
2525
import System.IO (IO)
26-
import System.Win32.File
2726
import System.Win32.Types hiding (try)
2827

2928
-- | Timeout in milliseconds.

0 commit comments

Comments
 (0)