22
33name : CI (Unix)
44
5+ defaults :
6+ run :
7+ shell : bash
8+
59on :
610 push :
711 branches : [master, ci-*, ci]
@@ -22,16 +26,30 @@ jobs:
2226 - name : 📥 Checkout repository
2327 uses : actions/checkout@v4
2428
25- - name : 🏗 Install yq
29+ - name : 🏗 Install yq (Windows)
30+ if : runner.os == 'Windows'
2631 uses : frenck/action-setup-yq@v1
2732
28- - name : 🔍 Determine stack resolver & GHC
33+ - name : 🔍 Determine Stack resolver & GHC version
2934 run : |
30- STACK_ROOT="$(stack path --stack-root)"
3135 STACK_RESOLVER=$(yq .resolver stack.yaml)
3236 GHC_VERSION=$(echo $(yq .compiler stack.yaml) | cut -c 5-)
3337 echo STACK_RESOLVER="${STACK_RESOLVER}" >> "${GITHUB_ENV}"
34- echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
38+ echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
39+
40+ - name : 🏗 Setup Haskell
41+ if : runner.os == 'macOS'
42+ uses : haskell-actions/setup@v2
43+ id : setup-haskell
44+ with :
45+ ghc-version : ${{ env.GHC_VERSION }}
46+ enable-stack : true
47+ stack-version : ' latest'
48+
49+ - name : 🔍 Determine Stack root
50+ run : |
51+ STACK_ROOT="$(stack path --stack-root)"
52+ echo STACK_ROOT="${STACK_ROOT}" >> "${GITHUB_ENV}"
3553
3654 # things to be restored:
3755 # Include STACK_RESOLVER in cache key, otherwise caches accumulate build products for different resolvers.
@@ -60,19 +78,27 @@ jobs:
6078 run : |
6179 echo PKG_CONFIG_PATH="$(brew --prefix)/opt/icu4c/lib/pkgconfig" >> "${GITHUB_ENV}"
6280
63- - name : ⏬ Setup Haskell
64- uses : haskell-actions/setup@v2
65- id : setup-haskell
66- with :
67- ghc-version : ${{ env.GHC_VERSION }}
68- enable-stack : true
69- stack-version : ' latest'
81+ # - name: ⏬ Setup Haskell
82+ # uses: haskell-actions/setup@v2
83+ # id: setup-haskell
84+ # with:
85+ # ghc-version: ${{ env.GHC_VERSION }}
86+ # enable-stack: true
87+ # stack-version: 'latest'
88+
89+ - name : 📸 Build Snapshot
90+ run : |
91+ stack build --no-terminal --only-snapshot -j1
92+
93+ - name : 🧰 Build Dependencies
94+ run : |
95+ stack build --no-terminal --only-dependencies
7096
71- - name : 🔨 Build
72- run : stack build
97+ # - name: 🔨 Build
98+ # run: stack build
7399
74- - name : 🧪 Run tests
75- run : stack test
100+ # - name: 🧪 Run tests
101+ # run: stack test
76102
77103 # things to be cached
78104
@@ -215,10 +241,13 @@ jobs:
215241 mv zip/als-macos.zip .
216242 fi
217243
218- - name : 🔨 Build and run tests
219- run : |
244+ - name : 🧪 Run tests
245+ run : stack test --ta --als-path=zip/als
246+
247+ # - name: 🔨 Build and run tests
248+ # run: |
220249
221- stack test --ta --als-path=zip/als
250+ # stack test --ta --als-path=zip/als
222251
223252 # release (optional)
224253 - name : 🚢 Release Artifacts
0 commit comments