Skip to content
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

Fix windows build #121

Merged
merged 5 commits into from
Oct 1, 2023
Merged
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
10 changes: 7 additions & 3 deletions .github/workflows/ghc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ permissions:
jobs:
build:
name: "Build and test with GHC"
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: 📥 Checkout repository
Expand All @@ -47,12 +50,13 @@ jobs:
mkdir -p bin/
cp $(stack exec -- which rzk) bin/.
tar -cvzf rzk-bin.tar.gz bin/
shell: bash

- name: Upload rzk binary as Artifact
uses: actions/upload-artifact@v3
with:
path: rzk-bin.tar.gz
name: rzk-bin
name: rzk-${{ runner.os }}-${{ runner.arch }}.tar.gz
if-no-files-found: error

haddock:
Expand Down Expand Up @@ -95,7 +99,7 @@ jobs:
id: download
uses: actions/download-artifact@v3
with:
name: rzk-bin
name: rzk-${{ runner.os }}-${{ runner.arch }}.tar.gz

- name: Unpack rzk-bin.tar.gz
run: |
Expand Down
3 changes: 3 additions & 0 deletions rzk/Setup.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
-- Source: https://github.com/haskell/cabal/issues/6726#issuecomment-918663262

-- | Custom Setup that runs bnfc to generate the language sub-libraries
Expand All @@ -18,7 +19,9 @@ main :: IO ()
main = defaultMainWithHooks $ simpleUserHooks
{ hookedPrograms = [ bnfcProgram ]
, postConf = \args flags packageDesc localBuildInfo -> do
#ifndef mingw32_HOST_OS
_ <- system "bnfc -d -p Language.Rzk --generic --functor -o src/ grammar/Syntax.cf"
#endif
postConf simpleUserHooks args flags packageDesc localBuildInfo
}

Expand Down
1 change: 1 addition & 0 deletions rzk/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ ghc-options:
- -Wmissing-home-modules
- -Wpartial-fields
- -Wredundant-constraints
- -optP-Wno-nonportable-include-path

library:
source-dirs: src
Expand Down
8 changes: 4 additions & 4 deletions rzk/rzk.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ library
Paths_rzk
hs-source-dirs:
src
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -optP-Wno-nonportable-include-path
build-tools:
alex >=3.2.4
, happy >=1.19.9
Expand Down Expand Up @@ -99,7 +99,7 @@ executable rzk
Paths_rzk
hs-source-dirs:
app
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -optP-Wno-nonportable-include-path -threaded -rtsopts -with-rtsopts=-N
build-tools:
alex >=3.2.4
, happy >=1.19.9
Expand Down Expand Up @@ -128,7 +128,7 @@ test-suite doctests
main-is: doctests.hs
hs-source-dirs:
test
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -optP-Wno-nonportable-include-path
build-tools:
alex >=3.2.4
, happy >=1.19.9
Expand Down Expand Up @@ -157,7 +157,7 @@ test-suite rzk-test
Paths_rzk
hs-source-dirs:
test
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -optP-Wno-nonportable-include-path -threaded -rtsopts -with-rtsopts=-N
build-tools:
alex >=3.2.4
, happy >=1.19.9
Expand Down
Loading