Skip to content

Commit

Permalink
Try GHC 9.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ephemient committed Dec 26, 2024
1 parent b083aab commit ae231c4
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 35 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/hs-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
build:
needs: [ get-inputs ]
runs-on: ubuntu-latest
strategy:
matrix:
ghc: [ '9.10', '9.12' ]

steps:
- uses: actions/checkout@v4
Expand All @@ -25,9 +28,9 @@ jobs:
- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: 9.10.1
ghc-version: ${{ matrix.ghc }}
- run: |
cabal configure --enable-tests --enable-benchmarks
cabal configure --enable-tests --enable-benchmarks --with-compiler=ghc-${{ matrix.ghc }} --allow-newer=aeson-2.2.3.0:ghc-prim,aeson-2.2.3.0:template-haskell,binary-orphans-1.0.5:base,indexed-traversable-0.1.4:base,indexed-traversable-instances-0.1.2:base,integer-conversion-0.1.1:base,microstache-1.0.3:base,process-1.6.25.0:base,process-1.6.25.0:filepath,scientific-0.3.8.0:base,scientific-0.3.8.0:filepath,scientific-0.3.8.0:template-haskell,semialign-1.3.1:base,these-1.2.1:base,time-compat-1.9.7:base,uuid-types-1.0.6:template-haskell
cabal build all --dry-run
working-directory: hs
- uses: actions/cache/restore@v4
Expand All @@ -51,13 +54,32 @@ jobs:
AOC2024_DATADIR: ${{ github.workspace }}/inputs
TRACE: 0
working-directory: hs
- uses: actions/upload-artifact@v4
with:
name: ghc-${{ matrix.ghc }}
path: hs/aoc2024-bench.html

docs:
needs: [ build ]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
ref: gh-docs
path: gh-docs
- run: mv hs/aoc2024-bench.html gh-docs/aoc2024-bench.html
- uses: EndBug/add-and-commit@v9
- uses: actions/download-artifact@v4
with:
name: ghc-9.10
- uses: actions/download-artifact@v4
with:
cwd: gh-docs
add: aoc2024-bench.html
message: 'Haskell Criterion ${{ github.sha }}'
name: ghc-9.12
path: aoc2024-bench-9.12.html
- run: |
git add aoc2024-bench.html aoc2024-bench-9.12.html
git commit -m 'Haskell Criterion ${{ github.sha }}'
git push
env:
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
18 changes: 12 additions & 6 deletions .github/workflows/hs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: [ '9.10', '9.12' ]

steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: 9.10.1
ghc-version: ${{ matrix.ghc }}
- run: |
cabal configure --enable-tests --enable-benchmarks
cabal configure --enable-tests --enable-benchmarks --with-compiler=ghc-${{ matrix.ghc }} --allow-newer=aeson-2.2.3.0:ghc-prim,aeson-2.2.3.0:template-haskell,binary-orphans-1.0.5:base,indexed-traversable-0.1.4:base,indexed-traversable-instances-0.1.2:base,integer-conversion-0.1.1:base,microstache-1.0.3:base,process-1.6.25.0:base,process-1.6.25.0:filepath,scientific-0.3.8.0:base,scientific-0.3.8.0:filepath,scientific-0.3.8.0:template-haskell,semialign-1.3.1:base,these-1.2.1:base,time-compat-1.9.7:base,uuid-types-1.0.6:template-haskell
cabal build all --dry-run
working-directory: hs
- uses: actions/cache/restore@v4
Expand All @@ -50,13 +53,13 @@ jobs:
cabal build all
echo "exe=$(cabal list-bin aoc2024)" >> $GITHUB_OUTPUT
working-directory: hs
- run: cabal test all --test-show-details=direct
- run: cabal test all
working-directory: hs
- run: cabal check
working-directory: hs
- uses: actions/upload-artifact@v4
with:
name: aoc2024-hs
name: aoc2024-hs-${{ matrix.ghc }}
path: ${{ steps.build.outputs.exe }}

lint:
Expand Down Expand Up @@ -86,7 +89,10 @@ jobs:

steps:
- uses: actions/download-artifact@v4
- run: chmod +x aoc2024-hs/aoc2024
- run: aoc2024-hs/aoc2024
- run: chmod +x aoc2024-hs-9.10/aoc2024 aoc2024-hs-9.12/aoc2024
- run: aoc2024-hs-9.10/aoc2024
env:
AOC2024_DATADIR: inputs
- run: aoc2024-hs-9.12/aoc2024
env:
AOC2024_DATADIR: inputs
13 changes: 9 additions & 4 deletions .github/workflows/kt-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ jobs:
var providedBenchmarkStore = $(jq --null-input '$ARGS.named|map_values(.[0]|sort_by(.benchmark|[split("[.]|(?<!\\d)(?!\\D)|(?<!\\D)(?!\\d)")|map(try tonumber catch .),.]))' "${jsonargs[@]}");
EOF
- uses: EndBug/add-and-commit@v9
with:
add: jmh-visualizer
message: 'kotlinx.benchmark ${{ github.sha }}'
- run: |
git add jmh-visualizer
git commit -m 'kotlinx.benchmark ${{ github.sha }}'
git push
env:
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
15 changes: 10 additions & 5 deletions .github/workflows/py-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ jobs:
ref: gh-docs
path: gh-docs
- run: mv py/benchmark.svg gh-docs/benchmark.svg
- uses: EndBug/add-and-commit@v9
with:
cwd: gh-docs
add: benchmark.svg
message: 'pytest-benchmark ${{ github.sha }}'
- run: |
git add benchmark.svg
git commit -m 'pytest-benchmark ${{ github.sha }}'
git push
env:
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
working-directory: gh-docs
15 changes: 10 additions & 5 deletions .github/workflows/rs-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,13 @@ jobs:
});
</script>
EOF
- uses: EndBug/add-and-commit@v9
with:
cwd: gh-docs
add: criterion
message: 'Rust Criterion ${{ github.sha }}'
- run: |
git add criterion
git commit -m 'Rust Criterion ${{ github.sha }}'
git push
env:
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
working-directory: gh-docs
12 changes: 6 additions & 6 deletions hs/aoc2024.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ library

build-depends:
array ^>=0.5.7.0,
base ^>=4.20.0.0,
base >=4.20 && <4.22,
containers ^>=0.7,
heap ^>=1.0.4,
megaparsec ^>=9.7.0,
Expand All @@ -70,8 +70,8 @@ executable aoc2024
c-sources: app/cbits/main.c
build-depends:
aoc2024,
base ^>=4.20.0.0,
filepath ^>=1.5.2.0,
base >=4.20 && <4.22,
filepath >=1.5.2.0 && <1.6,
megaparsec ^>=9.7.0,
text ^>=2.1.1,

Expand Down Expand Up @@ -115,7 +115,7 @@ test-suite aoc2024-test

build-depends:
aoc2024,
base ^>=4.20.0.0,
base >=4.20 && <4.22,
hspec ^>=2.11.10,
text ^>=2.1.1,

Expand All @@ -137,9 +137,9 @@ benchmark aoc2024-bench
c-sources: bench/cbits/main.c
build-depends:
aoc2024,
base ^>=4.20.0.0,
base >=4.20 && <4.22,
criterion ^>=1.6.4.0,
filepath ^>=1.5.2.0,
filepath >=1.5.2.0 && <1.6,
text ^>=2.1.1,

ghc-options:
Expand Down
2 changes: 1 addition & 1 deletion hs/bench/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,6 @@ main =
env (getDayInput 24) $ \input ->
bgroup
"Day 25"
[ bench "part 2" $ nf Day25.part1 input
[ bench "part 1" $ nf Day25.part1 input
]
]

0 comments on commit ae231c4

Please sign in to comment.