99 - opened
1010 - synchronize
1111
12+ env :
13+ EXE_NAME : fortran-src
14+
1215jobs :
13- build-test- ubuntu-stack :
16+ ubuntu-stack-test :
1417 runs-on : ubuntu-latest
15- name : Ubuntu / Stack
18+ name : Ubuntu / Stack / test
1619 steps :
1720 - uses : actions/checkout@v2
1821
@@ -34,13 +37,22 @@ jobs:
3437 - name : Build and run tests
3538 run : stack --no-terminal haddock --test --no-haddock-deps
3639
37- build-test-ubuntu-cabal :
40+ - name : Install (to place executable at a known location)
41+ run : stack --no-terminal install
42+
43+ - name : Upload executable
44+ uses : actions/upload-artifact@v2
45+ with :
46+ name : ${{ env.EXE_NAME }}-linux-x64-stack-${{ github.sha }}
47+ path : ~/.local/bin/${{ env.EXE_NAME }}
48+
49+ ubuntu-cabal-test :
3850 runs-on : ubuntu-latest
39- name : Ubuntu / GHC ${{ matrix.ghc }}, Cabal ${{ matrix.cabal }}
51+ name : Ubuntu / GHC ${{ matrix.ghc }}, Cabal ${{ matrix.cabal }} / test
4052 strategy :
4153 fail-fast : false # don't stop if one job (= GHC version) fails
4254 matrix :
43- cabal : ["3.4"] # latest as of 2021-04-28
55+ cabal : ["3.4"] # latest as of 2021-08-11
4456 ghc :
4557 - " 8.6"
4658 - " 8.8"
@@ -94,3 +106,54 @@ jobs:
94106 run : cabal test --test-show-details=streaming
95107 env :
96108 HSPEC_OPTIONS : --color
109+
110+ windows-cabal-test :
111+ runs-on : windows-latest
112+ name : Windows / GHC ${{ matrix.ghc }}, Cabal ${{ matrix.cabal }} / test
113+ strategy :
114+ fail-fast : false # don't stop if one job (= GHC version) fails
115+ matrix :
116+ cabal : ["3.4"] # latest as of 2021-08-11
117+ ghc : ["9.0"]
118+ steps :
119+ # TODO can't do cache fixer on Windows b/c it's a Bash script...
120+ - uses : actions/checkout@v2
121+ with :
122+ fetch-depth : 0
123+
124+ - name : Setup Haskell build environment
125+ id : setup-haskell-build-env
126+ uses : haskell/actions/setup@v1
127+ with :
128+ ghc-version : ${{ matrix.ghc }}
129+ cabal-version : ${{ matrix.cabal }}
130+
131+ - name : Freeze Cabal plan
132+ run : cabal freeze
133+
134+ - name : Cache Cabal build artifacts
135+ uses : actions/cache@v2
136+ with :
137+ path : |
138+ ${{ steps.setup-haskell-build-env.outputs.cabal-store }}
139+ dist-newstyle
140+ key : ${{ runner.os }}-cabal-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
141+ restore-keys : |
142+ ${{ runner.os }}-cabal-${{ matrix.ghc }}
143+
144+ - name : Build
145+ run : cabal build
146+
147+ - name : Test
148+ run : cabal test --test-show-details=streaming
149+ env :
150+ HSPEC_OPTIONS : --color
151+
152+ - name : Install (to place executable at a known location)
153+ run : cabal install
154+
155+ - name : Upload executable
156+ uses : actions/upload-artifact@v2
157+ with :
158+ name : ${{ env.EXE_NAME }}-windows-cabal-${{ github.sha }}.exe
159+ path : " C:/Users/runneradmin/AppData/Roaming/cabal/bin/${{ env.EXE_NAME }}.exe"
0 commit comments