-
-
Notifications
You must be signed in to change notification settings - Fork 391
Restore TemplateHaskell pragma in hls-graph #2549
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8376151
restore TemplateHaskell pragma
pepeiborra c415398
CI: add flags workflow
Anton-Latukha ca30ee9
hls-graph: STM.Stats: fx stm-stats build
Anton-Latukha 45b29b4
hls-graph: Internal.Types: mk 8.6.5 code as such
Anton-Latukha 01959d5
hls-graph: Internal.Types: treat MonadFail
Anton-Latukha a3504a5
CI: {caching, test, bench, flags}: fx freeze phase
Anton-Latukha 9b199ed
hls-graph: Internal.Types: fx TVar import
Anton-Latukha 3f0a641
CI: {caching, test, bench, flags}: ('' -> "")
Anton-Latukha dc5c389
Apply suggestions from code review
Anton-Latukha 219e511
CI: flags: post-review fxs
Anton-Latukha 238ab90
Merge branch 'master' into fix-hls-graph-build
Anton-Latukha ea73089
Merge branch 'master' into fix-hls-graph-build
jneira f0256d1
Merge branch 'master' into fix-hls-graph-build
Anton-Latukha 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 hidden or 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 hidden or 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 hidden or 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,165 @@ | ||
name: Flags | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. | ||
concurrency: | ||
group: ${{ github.head_ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
pre_job: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
should_skip_ghcide: ${{ steps.skip_ghcide_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@v3.4.1 | ||
with: | ||
cancel_others: false | ||
paths_ignore: '[ "**/docs/**" | ||
, "**.md" | ||
, "**/LICENSE" | ||
, "install/**" | ||
, "**.nix" | ||
, "flake.lock" | ||
, "**/README.md" | ||
, "FUNDING.yml" | ||
, ".circleci/**" | ||
, "**/stack*.yaml" | ||
]' | ||
# If we only change ghcide downstream packages we have not test ghcide itself | ||
- id: skip_ghcide_check | ||
uses: fkirc/skip-duplicate-actions@v3.4.1 | ||
with: | ||
cancel_others: false | ||
paths_ignore: '[ "hls-test-utils/**" | ||
, "plugins/**" | ||
, "src/**" | ||
, "exe/**" | ||
, "test/**" | ||
, "shake-bench/**" | ||
]' | ||
|
||
flags: | ||
if: needs.pre_job.outputs.should_skip != 'true' | ||
needs: pre_job | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
ghc: [ "8.10.7" | ||
] | ||
os: [ "ubuntu-latest" | ||
] | ||
cabal: ['3.6'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: haskell/actions/setup@v1 | ||
id: HaskEnvSetup | ||
with: | ||
ghc-version : ${{ matrix.ghc }} | ||
cabal-version: ${{ matrix.cabal }} | ||
enable-stack: false | ||
|
||
- if: runner.os == 'Windows' | ||
name: (Windows) Platform config | ||
run: | | ||
echo "CABAL_PKGS_DIR=C:\\cabal\\packages" >> $GITHUB_ENV | ||
- if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' ) | ||
name: (Linux,macOS) Platform config | ||
run: | | ||
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV | ||
|
||
# All workflows which distinquishes cache on `cabal.project` needs this. | ||
- name: Workaround shorten binary names | ||
run: | | ||
sed -i.bak -e 's/haskell-language-server/hls/g' \ | ||
-e 's/haskell_language_server/hls/g' \ | ||
haskell-language-server.cabal cabal.project | ||
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \ | ||
src/**/*.hs exe/*.hs | ||
|
||
- name: Retrieving `cabal.project` Hackage timestamp | ||
run: | | ||
# Form: index-state: 2021-11-29T08:11:08Z | ||
INDEX_STATE_ENTRY=$(grep index-state cabal.project) | ||
# Form: 2021-11-29T08-11-08Z | ||
INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-') | ||
echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV | ||
|
||
- name: Form the package list ('cabal.project.freeze') | ||
continue-on-error: true | ||
run: | | ||
cabal v2-freeze && \ | ||
echo "" && \ | ||
echo 'Output:' && \ | ||
echo "" && \ | ||
cat 'cabal.project.freeze' && \ | ||
echo "" || \ | ||
echo 'WARNING: Could not produce the `freeze`.' | ||
|
||
- name: Hackage sources cache | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: hackage-sources | ||
with: | ||
path: ${{ env.CABAL_PKGS_DIR }} | ||
key: ${{ env.cache-name }}-${{ env.INDEX_STATE }} | ||
restore-keys: ${{ env.cache-name }}- | ||
|
||
- name: Compiled deps cache | ||
id: compiled-deps | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: compiled-deps | ||
with: | ||
path: ${{ steps.HaskEnvSetup.outputs.cabal-store }} | ||
key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }} | ||
restore-keys: | | ||
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}- | ||
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- | ||
${{ env.cache-name }}-${{ runner.os }}- | ||
|
||
- if: needs.pre_job.outputs.should_skip != 'true' | ||
Anton-Latukha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
name: Build `hls-graph` with flags | ||
Anton-Latukha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: cabal v2-build hls-graph --flags="pedantic embed-files stm-stats" | ||
|
||
- if: needs.pre_job.outputs.should_skip != 'true' | ||
name: Build `hie-compat` with flags | ||
Anton-Latukha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: cabal v2-build hie-compat --flags="ghc-lib" | ||
|
||
- if: needs.pre_job.outputs.should_skip != 'true' | ||
name: Build `hls-plugin-api` with flags | ||
Anton-Latukha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: cabal v2-build hls-plugin-api --flags="pedantic" | ||
|
||
- if: needs.pre_job.outputs.should_skip != 'true' | ||
name: Build `hls-test-utils` with flags | ||
Anton-Latukha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: cabal v2-build hls-test-utils --flags="pedantic" | ||
|
||
# repeating builds to workaround segfaults in windows and ghc-8.8.4 | ||
- if: needs.pre_job.outputs.should_skip_ghcide != 'true' | ||
Anton-Latukha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
name: Build | ||
Anton-Latukha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: cabal v2-build ghcide --flags="ghc-patched-unboxed-bytecode test-exe executable bench-exe" || cabal v2-build ghcide --flags="ghc-patched-unboxed-bytecode test-exe executable bench-exe" || cabal v2-build ghcide --flags="ghc-patched-unboxed-bytecode test-exe executable bench-exe" | ||
|
||
flags_post_job: | ||
if: always() | ||
runs-on: ubuntu-latest | ||
needs: [pre_job, flags] | ||
steps: | ||
- run: | | ||
echo "jobs info: ${{ toJSON(needs) }}" | ||
- if: contains(needs.*.result, 'failure') | ||
run: exit 1 | ||
- if: contains(needs.*.result, 'cancelled') && needs.pre_job.outputs.should_skip != 'true' | ||
run: exit 1 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.