Skip to content

Commit

Permalink
start building out github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
shayne-fletcher committed Jan 27, 2024
1 parent fa89fe3 commit 9508325
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/hlint-from-scratch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
- run: stack upgrade
- run: brew install automake
if: matrix.os == 'macos'
- run: cabal update
- run: cabal install apply-refact
- run: |-
echo "GHCLIB_AZURE='1'" >> $GITHUB_ENV
echo "repo_dir=$(mktemp -d)" >> $GITHUB_ENV
Expand Down
8 changes: 2 additions & 6 deletions hlint-from-scratch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ if [ -z "$GHC_FLAVOR" ]; then
else
eval "$cmd" "$GHC_FLAVOR"
fi
sha_ghc_lib_parser=$(shasum -a 256 "$repo_dir"/ghc-lib/ghc-lib-parser-"$version".tar.gz | awk '{ print $1 }')
#sha_ghc_lib_parser=$(shasum -a 256 "$repo_dir"/ghc-lib/ghc-lib-parser-"$version".tar.gz | awk '{ print $1 }')

# temp disable while i focus on minimal set of github actions
if false; then
Expand Down Expand Up @@ -306,15 +306,13 @@ $allow_newer\n\
extra-deps:\n\
# ghc-lib-parser\n\
- archive: ${repo_dir}/ghc-lib/ghc-lib-parser-${version}.tar.gz\n\
sha256: \"${sha_ghc_lib_parser}\";\
g" | \
sed -e "s;^resolver:.*$;resolver: ${resolver};g" > stack-head.yaml
else
cat > stack-head.yaml <<EOF
resolver: $resolver
extra-deps:
- archive: ${repo_dir}/ghc-lib/ghc-lib-parser-$version.tar.gz
sha256: "$sha_ghc_lib_parser"
ghc-options:
"$DOLLAR$everything": -j
"$DOLLAR$locals": -ddump-to-file -ddump-hi -Wall -Wno-name-shadowing -Wunused-imports
Expand All @@ -334,7 +332,7 @@ stack_yaml_flag="--stack-yaml $stack_yaml"
# No need to pass $resolver_flag here, we fixed the resolver in
# 'stack-head.yaml'.
eval "$runhaskell $stack_yaml_flag CI.hs -- $no_builds $stack_yaml_flag --version-tag $version"
sha_ghc_lib_parser_ex=$(shasum -a 256 "$repo_dir"/ghc-lib-parser-ex/ghc-lib-parser-ex-"$version".tar.gz | awk '{ print $1 }')
#sha_ghc_lib_parser_ex=$(shasum -a 256 "$repo_dir"/ghc-lib-parser-ex/ghc-lib-parser-ex-"$version".tar.gz | awk '{ print $1 }')

# Hlint

Expand Down Expand Up @@ -376,9 +374,7 @@ packages:
- .
extra-deps:
- archive: $repo_dir/ghc-lib/ghc-lib-parser-$version.tar.gz
sha256: "$sha_ghc_lib_parser"
- archive: $repo_dir/ghc-lib-parser-ex/ghc-lib-parser-ex-$version.tar.gz
sha256: "$sha_ghc_lib_parser_ex"
ghc-options:
"$DOLLAR$everything": -j
"$DOLLAR$locals": -ddump-to-file -ddump-hi -Werror=unused-imports -Werror=unused-local-binds -Werror=unused-top-binds -Werror=orphans
Expand Down

0 comments on commit 9508325

Please sign in to comment.