change multipleChoice to accept Nothing option for "what" #160
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
| --- | |
| name: Haskell CI | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macOS-latest, windows-latest] | |
| plan: | |
| - {resolver: lts-19.33} | |
| - {resolver: lts-20.26} | |
| - {resolver: lts-21.25} | |
| - {resolver: lts-22.44} | |
| - {resolver: lts-23.28} | |
| - {resolver: lts-24.17} | |
| - {resolver: nightly, stack-yaml: nightly-stack.yaml} | |
| exclude: | |
| - os: macOS-latest | |
| plan: {resolver: lts-19.33} | |
| include: | |
| - os: macOS-latest | |
| brew: openssl | |
| - os: windows-latest | |
| choco: openssl | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Install ${{ matrix.os }} Packages | |
| uses: amitie10g/install-package@v1.2.5 | |
| with: | |
| # apt-get: ${{ matrix.apt-get }} | |
| brew: ${{ matrix.brew }} | |
| msystem: mingw64 | |
| choco: ${{ matrix.choco }} | |
| - name: Set extra directories (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| PREFIX="$(brew --prefix openssl)" | |
| cat <<EOF >> "$GITHUB_ENV" | |
| EXTRA_INCLUDE_DIRS=${PREFIX}/include | |
| EXTRA_LIB_DIRS=${PREFIX}/lib | |
| EOF | |
| - name: Set extra directories (Windows) | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| PREFIX="$(cygpath -m '/c/Program Files/OpenSSL')" | |
| cat <<EOF >> "$GITHUB_ENV" | |
| EXTRA_INCLUDE_DIRS=${PREFIX}/include | |
| EXTRA_LIB_DIRS=C:/mingw64/opt/lib | |
| EOF | |
| - uses: actions/checkout@v4 | |
| - name: Restore ~/.stack cache | |
| id: restore-stack | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.stack | |
| key: ${{ runner.os }}-stack-global-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('nightly-stack.yaml') }}-${{ hashFiles('package.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-stack-global-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('nightly-stack.yaml') }} | |
| ${{ runner.os }}-stack-global-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }} | |
| ${{ runner.os }}-stack-global-${{ matrix.plan.resolver }} | |
| ${{ runner.os }}-stack-global- | |
| if: contains(matrix.os, 'windows') == false | |
| - name: Restore %APPDATA%\stack %LOCALAPPDATA%\Programs\stack cache | |
| id: restore-stack-windows | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| ~\AppData\Roaming\stack | |
| ~\AppData\Local\Programs\stack | |
| key: ${{ runner.os }}-stack-global-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('nightly-stack.yaml') }}-${{ hashFiles('package.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-stack-global-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('nightly-stack.yaml') }} | |
| ${{ runner.os }}-stack-global-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }} | |
| ${{ runner.os }}-stack-global-${{ matrix.plan.resolver }} | |
| ${{ runner.os }}-stack-global- | |
| if: contains(matrix.os, 'windows') | |
| - name: Restore .stack-work cache | |
| id: restore-stack-work | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: .stack-work | |
| key: | |
| ${{ runner.os }}-stack-work-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('nightly-stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }} | |
| restore-keys: | | |
| ${{ runner.os }}-stack-work-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('nightly-stack.yaml') }} | |
| ${{ runner.os }}-stack-work-${{ matrix.plan.resolver }}-${{ hashFiles('stack.yaml') }} | |
| ${{ runner.os }}-stack-work-${{ matrix.plan.resolver }} | |
| ${{ runner.os }}-stack-work- | |
| - name: Setup stack | |
| uses: haskell-actions/setup@v2 | |
| with: | |
| enable-stack: true | |
| stack-no-global: true | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| set -ex | |
| # shellcheck disable=SC2086 | |
| stack --no-terminal --install-ghc \ | |
| ${EXTRA_INCLUDE_DIRS:+--extra-include-dirs="$EXTRA_INCLUDE_DIRS"} \ | |
| ${EXTRA_LIB_DIRS:+--extra-lib-dirs="$EXTRA_LIB_DIRS"} \ | |
| ${RESOLVER:+--resolver="$RESOLVER"} \ | |
| ${STACK_YML:+--stack-yaml="$STACK_YML"} \ | |
| test --bench --only-dependencies | |
| set +ex | |
| env: | |
| RESOLVER: ${{ matrix.plan.resolver }} | |
| STACK_YML: ${{ matrix.plan.stack-yaml }} | |
| - name: Build and test | |
| shell: bash | |
| run: | | |
| set -ex | |
| # shellcheck disable=SC2086 | |
| stack --no-terminal --install-ghc \ | |
| ${EXTRA_INCLUDE_DIRS:+--extra-include-dirs="$EXTRA_INCLUDE_DIRS"} \ | |
| ${EXTRA_LIB_DIRS:+--extra-lib-dirs="$EXTRA_LIB_DIRS"} \ | |
| ${RESOLVER:+--resolver="$RESOLVER"} \ | |
| ${STACK_YML:+--stack-yaml="$STACK_YML"} \ | |
| test --coverage --bench --no-run-benchmarks --haddock --no-haddock-deps | |
| set +ex | |
| env: | |
| RESOLVER: ${{ matrix.plan.resolver }} | |
| STACK_YML: ${{ matrix.plan.stack-yaml }} | |
| - name: Cache ~/.stack | |
| uses: actions/cache/save@v4 | |
| if: contains(matrix.os, 'windows') == false && always() && steps.restore-stack.outputs.cache-hit != 'true' && steps.restore-stack-work.outputs.cache-hit != 'true' | |
| with: | |
| path: ~/.stack | |
| key: ${{ steps.restore-stack.outputs.cache-primary-key }} | |
| - name: Cache %APPDATA%\stack %LOCALAPPDATA%\Programs\stack | |
| uses: actions/cache/save@v4 | |
| if: contains(matrix.os, 'windows') && always() && steps.restore-stack-windows.outputs.cache-hit != 'true' && steps.restore-stack-work.outputs.cache-hit != 'true' | |
| with: | |
| path: | | |
| ~\AppData\Roaming\stack | |
| ~\AppData\Local\Programs\stack | |
| key: ${{ steps.restore-stack-windows.outputs.cache-primary-key }} | |
| - name: Cache .stack-work | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: .stack-work | |
| key: ${{ steps.restore-stack-work.outputs.cache-primary-key }} |