-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cf9a3a9
Showing
116 changed files
with
33,330 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
optConfig: | ||
optOut: true |
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 @@ | ||
optConfig: | ||
optOut: true |
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,211 @@ | ||
name: Build and Test | ||
on: | ||
push: {branches: ["main"]} | ||
pull_request: | ||
|
||
jobs: | ||
ci-enumerate: | ||
name: Enumerate GHC Versions | ||
runs-on: ubuntu-latest | ||
outputs: | ||
plan: ${{steps.list-ci.outputs.plan}} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{github.event.pull_request.head.sha || github.sha}} | ||
- name: Enumerate CI plans | ||
id: list-ci | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const script = require('./ci/scripts/enumerate-ci.js') | ||
await script({github, context, core, glob, io, require}) | ||
build: | ||
name: Build (${{matrix.plan.name}}) | ||
needs: [ci-enumerate] | ||
continue-on-error: true | ||
strategy: | ||
matrix: | ||
## TODO: When OSS is ready, use the following line | ||
# plan: ${{fromJSON(needs.ci-enumerate.outputs.plan)}} | ||
|
||
## TODO: When OSS is ready, delete the following: | ||
plan: | ||
- path: "ci/configs/ghc-9.2.8.project" | ||
name: "ghc-9.2.8" | ||
ghc: "9.2.8" | ||
is_head: false | ||
fail-fast: false | ||
env: | ||
cabal-version: 3.10.2.0 | ||
cabal: "cabal --project-file=${{matrix.plan.path}}" | ||
ghc: ${{matrix.plan.ghc}} | ||
project-file: ${{matrix.plan.path}} | ||
plan: ${{matrix.plan.name}} | ||
artifact-name: "artifact-${{matrix.plan.name}}" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
benchmarks: ${{steps.list-bins.outputs.benchs}} | ||
tests: ${{steps.list-bins.outputs.tests}} | ||
artifact: "artifact-${{matrix.plan.name}}" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{github.event.pull_request.head.sha || github.sha}} | ||
- name: Calculate hash keys | ||
uses: actions/github-script@v6 | ||
id: cache-keys | ||
with: | ||
script: | | ||
const script = require('./ci/scripts/calc-cache-keys.js') | ||
await script({ os: "ubuntu", plan: ${{toJSON(env.plan)}}, path: ${{toJSON(env.project-file)}}, core, glob }) | ||
- name: Setup Haskell | ||
uses: haskell-actions/setup@v2 | ||
with: | ||
enable-stack: false | ||
cabal-version: ${{env.cabal-version}} | ||
ghc-version: ${{env.ghc}} | ||
- name: Restore ~/.cabal/store | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: ~/.cabal/store | ||
key: ${{steps.cache-keys.outputs.store}} | ||
restore-keys: ${{steps.cache-keys.outputs.store-restore}} | ||
- name: Restore dist-newstyle | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: dist-newstyle | ||
key: ${{steps.cache-keys.outputs.dist}} | ||
restore-keys: ${{steps.cache-keys.outputs.dist-restore}} | ||
- name: cabal configure | ||
run: | | ||
${{env.cabal}} v2-configure --enable-tests --enable-benchmarks --enable-optimisation=2 | ||
${{env.cabal}} update | ||
- name: Build Dependencies | ||
run: | | ||
${{env.cabal}} build --only-dependencies all | ||
- name: Save ~/.cabal/store Cache | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: ~/.cabal/store | ||
key: ${{steps.cache-keys.outputs.store}} | ||
- name: Build All | ||
run: | | ||
${{env.cabal}} build all | ||
- name: Save dist-newstyle Cache | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: dist-newstyle | ||
key: ${{steps.cache-keys.outputs.dist}} | ||
|
||
- name: Collect binaries | ||
continue-on-error: true | ||
run: bash ./ci/scripts/collect-bins.sh "${{env.artifact-name}}" | ||
- name: Upload Aritracts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: ${{env.artifact-name}}.tar.zst | ||
name: ${{env.artifact-name}} | ||
retention-days: 1 | ||
- name: List Binaries | ||
id: list-bins | ||
shell: bash | ||
run: | | ||
echo "benchs=$(jq -cMnR '[inputs]' <"${{env.artifact-name}}"/benchs.list)" >>"${GITHUB_OUTPUT}" | ||
echo "tests=$(jq -cMnR '[inputs]' <"${{env.artifact-name}}"/tests.list)" >>"${GITHUB_OUTPUT}" | ||
test: | ||
name: Test (${{matrix.plan.name}}) | ||
needs: [ci-enumerate, build] | ||
continue-on-error: ${{matrix.plan.is_head}} | ||
strategy: | ||
matrix: | ||
## TODO: When OSS is ready, use the following line | ||
# plan: ${{fromJSON(needs.ci-enumerate.outputs.plan)}} | ||
|
||
## TODO: When OSS is ready, delete the following: | ||
plan: | ||
- path: "ci/configs/ghc-9.2.8.project" | ||
name: "ghc-9.2.8" | ||
ghc: "9.2.8" | ||
is_head: false | ||
fail-fast: false | ||
env: | ||
cabal: 3.12.1.0 | ||
ghc: ${{matrix.plan.ghc}} | ||
project-file: ${{matrix.plan.path}} | ||
plan: ${{matrix.plan.name}} | ||
artifact: artifact-${{matrix.plan.name}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fail when Corresponding Build didn't succeed | ||
if: ${{needs.build.result != 'success' }} | ||
run: echo "BUILD FAILED" >&2; exit 1 | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{github.event.pull_request.head.sha || github.sha}} | ||
- name: Download artifacts | ||
id: download | ||
uses: actions/download-artifact@v3 | ||
- name: Decompress | ||
run: tar xaf ${{env.artifact}}/${{env.artifact}}.tar.zst | ||
- name: Run Tests | ||
shell: bash | ||
run: | | ||
set -euo pipefail | ||
TOTAL=0 | ||
SUCCESS=0 | ||
FAIL=0 | ||
while read -r TEST; do | ||
TOTAL=$((TOTAL + 1)) | ||
echo "--------" | ||
echo "Running: ${TEST}" | ||
set +e | ||
${{env.artifact}}/tests/"${TEST}" | ||
RESL=$? | ||
set -e | ||
if [ ${RESL} -eq 0 ]; then | ||
SUCCESS=$((SUCCESS + 1)) | ||
echo "Result: Successed" | ||
else | ||
FAIL=$((FAIL + 1)) | ||
echo 'Result: FAILED!' | ||
fi | ||
done <${{env.artifact}}/tests.list | ||
echo "" | ||
echo "----" | ||
if [ "${FAIL}" -eq 0 ]; then | ||
echo "All ${TOTAL} tests passed." | ||
else | ||
echo "${FAIL} out of ${TOTAL} tests FAILED"'!' | ||
exit 1 | ||
fi | ||
fourmolu: | ||
name: Fourmolu | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Note that you must checkout your code before running fourmolu/fourmolu-action | ||
- uses: actions/checkout@v2 | ||
- uses: fourmolu/fourmolu-action@v10 | ||
with: | ||
pattern: | | ||
**/*.hs | ||
!**/Setup.hs | ||
!**/Setup.lhs | ||
!dist-newstyle/** | ||
cabal-check: | ||
name: Cabal Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: haskell-actions/setup@v2 | ||
with: | ||
cabal-version: 3.10.2.0 | ||
ghc-version: latest | ||
- run: bash ./ci/scripts/cabal-check-packages.sh |
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,180 @@ | ||
### https://raw.github.com/github/gitignore/14f8a8b4c51ecc00b18905a95c117954e6c77b9d/Haskell.gitignore | ||
|
||
dist | ||
dist-* | ||
cabal-dev | ||
*.o | ||
*.hi | ||
*.hie | ||
*.chi | ||
*.chs.h | ||
*.dyn_o | ||
*.dyn_hi | ||
.hpc | ||
.hsenv | ||
.cabal-sandbox/ | ||
cabal.sandbox.config | ||
*.prof | ||
*.aux | ||
*.hp | ||
*.eventlog | ||
.stack-work/ | ||
cabal.project.local | ||
cabal.project.local~ | ||
.HTF/ | ||
.ghc.environment.* | ||
workspace | ||
|
||
### https://raw.github.com/github/gitignore/14f8a8b4c51ecc00b18905a95c117954e6c77b9d/Global/VisualStudioCode.gitignore | ||
|
||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
*.code-workspace | ||
|
||
# Local History for Visual Studio Code | ||
.history/ | ||
|
||
|
||
### https://raw.github.com/github/gitignore/14f8a8b4c51ecc00b18905a95c117954e6c77b9d/Global/macOS.gitignore | ||
|
||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
|
||
### https://raw.github.com/github/gitignore/14f8a8b4c51ecc00b18905a95c117954e6c77b9d/Global/Linux.gitignore | ||
|
||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
|
||
### Generated by gibo (https://github.com/simonwhitaker/gibo) | ||
### https://raw.github.com/github/gitignore/e5323759e387ba347a9d50f8b0ddd16502eb71d4/Haskell.gitignore | ||
|
||
dist | ||
dist-* | ||
cabal-dev | ||
*.o | ||
*.hi | ||
*.hie | ||
*.chi | ||
*.chs.h | ||
*.dyn_o | ||
*.dyn_hi | ||
.hpc | ||
.hsenv | ||
.cabal-sandbox/ | ||
cabal.sandbox.config | ||
*.prof | ||
*.aux | ||
*.hp | ||
*.eventlog | ||
.stack-work/ | ||
cabal.project.local | ||
cabal.project.local~ | ||
.HTF/ | ||
.ghc.environment.* | ||
|
||
|
||
### https://raw.github.com/github/gitignore/e5323759e387ba347a9d50f8b0ddd16502eb71d4/Global/VisualStudioCode.gitignore | ||
|
||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
!.vscode/*.code-snippets | ||
|
||
# Local History for Visual Studio Code | ||
.history/ | ||
|
||
# Built Visual Studio Code Extensions | ||
*.vsix | ||
|
||
|
||
### https://raw.github.com/github/gitignore/e5323759e387ba347a9d50f8b0ddd16502eb71d4/Global/macOS.gitignore | ||
|
||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
|
||
### https://raw.github.com/github/gitignore/e5323759e387ba347a9d50f8b0ddd16502eb71d4/Global/Linux.gitignore | ||
|
||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
workspace |
Oops, something went wrong.