-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixed macos ci by intalling stack * use haskell-actions * install llvm@12 * only macos * fixed llvm@12 path * print path and llvm dir * brew reccommended paths * remove Cellar * add opt * ls brew prefix * more ls * fixed paths * splitting matrix into different jobs * invalid strategy * fixed os name * find error * indent * build * @->V * test old * remove anchor * old steps * checkout@2 * narrow * widen * widen * narrow * widen * move checkout * for resolver * narrow * widen * install llvm@12 * matrix * fix list * quotes * lts * added other OSs * added --extra-*-dir instead of env var * removed single quotes * libffi * removed quotes * -I to extra-include-dirs * specific path * llvm 12 -> 13 * cache stack work * widen lts versions * stack path reorder * print largest cache file size * exclude .stack/programs * use haskell-actions to install ghc\ninstead of stack so ghc is not cached * clean up * added cabal builds * use sh and cabal * install correct ghc version non-macos, show versions * added cabal.project * chaned cache paths for windows * unique ids * minimize conflict set * restore-keys, fixed stack cache path * base_ref * base_ref -> head_ref, cabal uses 9.8.2 * cabal uses 9.8.2 * use haskell setup for all OSs * added build-tools: hspec-discover * cabal cleanup
- Loading branch information
1 parent
0447f25
commit 8ada6b1
Showing
10 changed files
with
101 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,30 +11,97 @@ jobs: | |
name: Stack | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
resolver: | ||
# Missing some packages now | ||
#- "--resolver nightly" | ||
- lts-18.16 # Win32 issue | ||
- lts-16 | ||
stack-yaml: | ||
- stack.yaml | ||
- stack-new-time.yaml | ||
exclude: | ||
- resolver: lts-16 | ||
stack-yaml: stack-new-time.yaml | ||
- os: windows-latest | ||
stack-yaml: stack-new-time.yaml | ||
|
||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
versions: | ||
#- <lts version> <ghc version> | ||
- 22.28 9.6.6 | ||
- 21.25 9.4.8 | ||
- 20.26 9.2.8 | ||
- 19.33 9.0.2 | ||
- 18.28 8.10.7 | ||
steps: | ||
- name: Parse lts and ghc versions | ||
shell: sh | ||
run: | | ||
echo snapshot=$(echo ${{ matrix.versions }} | cut -d ' ' -f 1) >> $GITHUB_ENV | ||
echo ghcVersion=$(echo ${{ matrix.versions }} | cut -d ' ' -f 2) >> $GITHUB_ENV | ||
- name: Install LLVM 13 | ||
if: ${{ matrix.os == 'macos-latest' && env.snapshot < 20 }} | ||
shell: sh | ||
run: | | ||
brew install llvm@13 | ||
echo "/opt/homebrew/opt/llvm@13/bin" >> $GITHUB_PATH | ||
echo extraLibDirs="--extra-lib-dirs /opt/homebrew/opt/llvm@13/lib" >> $GITHUB_ENV | ||
echo extraIncludeDirsLLVM="--extra-include-dirs /opt/homebrew/opt/llvm@13/include" >> $GITHUB_ENV | ||
echo extraIncludeDirsFFI="--extra-include-dirs /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ffi" >> $GITHUB_ENV | ||
- name: Setup Haskell | ||
id: setup-haskell-stack | ||
uses: haskell-actions/[email protected] | ||
with: | ||
ghc-version: ${{ env.ghcVersion }} | ||
enable-stack: true | ||
stack-version: 'latest' | ||
cabal-update: false | ||
- name: Clone project | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
- name: Use Cache | ||
uses: actions/cache@v4 | ||
with: | ||
key: ${{ matrix.os }}_${{ env.snapshot }}_${{ github.head_ref }} | ||
restore-keys: | | ||
${{ matrix.os }}_${{ env.snapshot }}_${{ github.head_ref }} | ||
${{ matrix.os }}_${{ env.snapshot }}_${{ github.base_ref }} | ||
${{ matrix.os }}_${{ env.snapshot }}_ | ||
${{ matrix.os }}_${{ env.snapshot }} | ||
path: | | ||
${{ steps.setup-haskell-stack.outputs.stack-root }} | ||
.stack-work | ||
*/.stack-work | ||
- name: Build and run tests | ||
shell: bash | ||
run: | | ||
set -ex | ||
ghc --version | ||
stack --version | ||
stack test --system-ghc $extraLibDirs $extraIncludeDirsLLVM $extraIncludeDirsFFI --fast --no-terminal --snapshot=lts-$snapshot | ||
Cabal: | ||
name: Cabal | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- macos-latest | ||
- macos-13 | ||
- ubuntu-latest | ||
- windows-latest | ||
steps: | ||
- name: Setup Haskell | ||
id: setup-haskell-cabal | ||
uses: haskell-actions/[email protected] | ||
with: | ||
ghc-version: 9.6.6 | ||
- name: Clone project | ||
uses: actions/checkout@v4 | ||
- name: Use Cache | ||
uses: actions/cache@v4 | ||
with: | ||
key: ${{ matrix.os }}_cabal_${{ github.head_ref }} | ||
restore-keys: | | ||
${{ matrix.os }}_cabal_${{ github.head_ref }} | ||
${{ matrix.os }}_cabal_${{ github.base_ref }} | ||
${{ matrix.os }}_cabal_ | ||
${{ matrix.os }}_cabal | ||
path: | | ||
${{ steps.setup-haskell-cabal.outputs.cabal-store }} | ||
dist-newstyle | ||
- name: Build and run tests | ||
shell: bash | ||
run: | | ||
set -ex | ||
stack --version | ||
stack test --fast --no-terminal --stack-yaml=${{ matrix.stack-yaml }} --resolver=${{ matrix.resolver }} | ||
ghc --version | ||
cabal --version | ||
cabal test --minimize-conflict-set -O0 all |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
packages: | ||
*/*.cabal |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,4 @@ tests: | |
- classy-prelude-conduit | ||
- QuickCheck | ||
- conduit | ||
build-tools: hspec-discover |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,3 +64,4 @@ tests: | |
- hspec >=1.3 | ||
- QuickCheck | ||
- containers | ||
build-tools: hspec-discover |
This file contains 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
This file contains 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
This file contains 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
This file contains 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