-
Notifications
You must be signed in to change notification settings - Fork 3
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
[#164] Improve Windows support #191
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,81 @@ | ||
# SPDX-FileCopyrightText: 2020 Kowainik | ||
# SPDX-FileCopyrightText: 2022 Serokell <https://serokell.io/> | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
# Sources: | ||
# • https://github.com/kowainik/validation-selective/blob/5b46cd4810bbaa09b704062ebbfa2bb47137425d/.github/workflows/ci.yml | ||
# • https://kodimensional.dev/github-actions | ||
# • https://github.com/serokell/tztime/blob/336f585c2c7125a8ba58ffbf3dbea4f36a7c40e7/.github/workflows/ci.yml | ||
|
||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
xrefcheck-build-and-test: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
stack: ["2.7.5"] | ||
ghc: ["9.0.2"] | ||
include: | ||
- ghc: "9.0.2" | ||
stackyaml: stack.yaml | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
|
||
- uses: haskell/actions/setup@v2.0.1 | ||
id: setup-haskell-stack | ||
name: Setup Haskell Stack | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
stack-version: ${{ matrix.stack }} | ||
|
||
- uses: actions/cache@v3 | ||
name: Cache stack root | ||
with: | ||
path: ~/AppData/Roaming/stack | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-stack | ||
|
||
- uses: actions/cache@v3 | ||
name: Cache AppData/Local/Programs/stack | ||
with: | ||
path: ~/AppData/Local/Programs/stack | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-appdata-stack | ||
|
||
|
||
# When editing this action, make sure it can run without using cached folders. | ||
# Yes, it tries to install mingw-w64-x86_64-pcre twice | ||
- name: install pacman dependencies | ||
run: | | ||
stack --system-ghc exec -- pacman -S --needed --noconfirm pkgconf; | ||
stack --system-ghc exec -- pacman -S --needed --noconfirm msys2-keyring; | ||
stack --system-ghc exec -- pacman --noconfirm -Syuu; | ||
stack --system-ghc exec -- pacman -S --needed --noconfirm mingw-w64-x86_64-pcre; | ||
stack --system-ghc exec -- pacman --noconfirm -Syuu; | ||
stack --system-ghc exec -- pacman -S --needed --noconfirm mingw-w64-x86_64-pcre; | ||
stack --system-ghc exec -- pacman -S --needed --noconfirm pcre-devel; | ||
- name: Build | ||
run: | | ||
stack build --system-ghc --stack-yaml ${{ matrix.stackyaml }} --test --bench --no-run-tests --no-run-benchmarks --ghc-options '-Werror' | ||
- name: stack test xrefcheck:xrefcheck-tests | ||
run: | | ||
stack test --system-ghc --stack-yaml ${{ matrix.stackyaml }} xrefcheck:xrefcheck-tests | ||
- name: install xrefcheck to use with golden tests | ||
run: | | ||
stack --system-ghc --stack-yaml ${{ matrix.stackyaml }} install; | ||
- uses: mig4/setup-bats@v1 | ||
name: Setup bats | ||
|
||
- name: Golden tests | ||
run: | | ||
export PATH=$PATH:/c/Users/runneradmin/AppData/Roaming/local/bin; | ||
bats ./tests/golden/** | ||
shell: bash |
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
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
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
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 |
---|---|---|
|
@@ -127,6 +127,7 @@ executables: | |
- xrefcheck | ||
- universum | ||
- with-utf8 | ||
- code-page | ||
|
||
tests: | ||
xrefcheck-tests: | ||
|
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
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
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
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
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
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
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
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
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
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
File renamed without changes.
35 changes: 35 additions & 0 deletions
35
tests/golden/check-ignoreExternalRefsTo/expected_windows.gold
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,35 @@ | ||
=== Invalid references found === | ||
|
||
➥ In file check-ignoreExternalRefsTo.md | ||
bad reference (external) at src:7:10-53: | ||
- text: "web-site" | ||
- link: https://localhost:20000/web-site | ||
- anchor: - | ||
|
||
⛂ InternalException (HostCannotConnect "localhost" [Network.Socket.connect: <socket: N>: failed (Connection refused (WSAECONNREFUSED)),Network.Socket.connect: <socket: N>: failed (Connection refused (WSAECONNREFUSED))]) | ||
|
||
➥ In file check-ignoreExternalRefsTo.md | ||
bad reference (external) at src:9:10-45: | ||
- text: "team" | ||
- link: https://127.0.0.1:20000/team | ||
- anchor: - | ||
|
||
⛂ InternalException (HostCannotConnect "127.0.0.1" [Network.Socket.connect: <socket: N>: failed (Connection refused (WSAECONNREFUSED))]) | ||
|
||
➥ In file check-ignoreExternalRefsTo.md | ||
bad reference (external) at src:11:10-44: | ||
- text: "blog" | ||
- link: http://localhost:20000/blog | ||
- anchor: - | ||
|
||
⛂ ConnectionFailure Network.Socket.connect: <socket: N>: failed (Connection refused (WSAECONNREFUSED)) | ||
|
||
➥ In file check-ignoreExternalRefsTo.md | ||
bad reference (external) at src:13:10-44: | ||
- text: "labs" | ||
- link: http://127.0.0.1:20000/labs | ||
- anchor: - | ||
|
||
⛂ ConnectionFailure Network.Socket.connect: <socket: N>: failed (Connection refused (WSAECONNREFUSED)) | ||
|
||
Invalid references dumped, 4 in total. | ||
Martoon-00 marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pacman does not feel too well? 🧌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just recorded my shell history, and then realized it's the way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a bit of torture to see a mention of some magic without an explanation of why it is needed / why it works 😅
On the other hand, if all the possible explanation is "doing it once fails with X error, but somehow repeat helps both locally and in CI, no one knows why", then maybe it's really not necessary to provide.