Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • T96-containers-0.7-empty-patch
  • alex
  • bifunctors-5.5.8
  • ci-test
  • drop-9.2-support
  • finley/hls-9.6-patches
  • finley/hls-9.6-patches-2
  • fix-1
  • foliage
  • ghc-bignum
  • ghc-from
  • hgeometry-deriveds
  • master
  • rts-stats
  • small-improvements
  • teo/more-c-deps
  • upstream-testing
  • wip/T93
  • wip/aarch64-ci
  • wip/atomic-counters
  • wip/benchmarks
  • wip/bifunctor
  • wip/broken-what34
  • wip/bump
  • wip/constraints
  • wip/docker-bump
  • wip/docker-env
  • wip/fix-repo
  • wip/fix-restricted-eval
  • wip/fix-upstream-url
  • wip/flake-aarch64
  • wip/ghc-11112-b
  • wip/ghc-debug-tests
  • wip/ghc-exactprint
  • wip/ghcide
  • wip/happy-1.20.0-GHC9.6
  • wip/liquidhaskell
  • wip/microstache
  • wip/monomorphic-list
  • wip/parallel-builds
  • wip/pizza-rolls
  • wip/romes/extend
  • wip/sand-witch/fixity-type-data
  • wip/separate-logs
  • wip/signal-9
  • wip/stackage-snapshots
  • wip/stackage-wip
  • wip/staged-pipeline
  • wip/teo/bump-ghc-debug
  • wip/teo/containers-foldl-prime
  • wip/text-2.0
  • wip/vty-5.36
52 results

Target

Select target project
  • ghc/head.hackage
  • RyanGlScott/head.hackage
  • vaibhavsagar/head.hackage
  • phadej/head.hackage
  • jessoune29/head.hackage
  • alanz/head.hackage
  • clint/head.hackage
  • osa1/head.hackage
  • supersven/head.hackage
  • fendor/head.hackage
  • hsyl20/head.hackage
  • adinapoli/head.hackage
  • alexbiehl/head.hackage
  • mimi.vx/head.hackage
  • Kleidukos/head.hackage
  • wz1000/head.hackage
  • alinab/head.hackage
  • teo/head.hackage
  • duog/head.hackage
  • sheaf/head.hackage
  • expipiplus1/head.hackage
  • drsooch/head.hackage
  • tobias/head.hackage
  • brandonchinn178/head.hackage
  • mpickering/hooks-setup-testing
  • Mikolaj/head.hackage
  • RandomMoonwalker/head.hackage
  • facundominguez/head.hackage
  • trac-fizzixnerd/head.hackage
  • neil.mayhew/head.hackage
  • jappeace/head.hackage
31 results
Select Git revision
  • FinleyMcIlwaine-master-patch-27418
  • alex
  • bifunctors-5.5.8
  • ci-test
  • drop-9.2-support
  • extra
  • finley/hls-9.6-patches
  • finley/hls-9.6-patches-2
  • fix-1
  • foliage
  • ghc-bignum
  • ghc-from
  • hgeometry-deriveds
  • master
  • rts-stats
  • small-improvements
  • staging
  • sv/ghcide-findercache
  • teo/more-c-deps
  • upstream-testing
  • wip/T93
  • wip/aarch64-ci
  • wip/add-ihaskell
  • wip/atomic-counters
  • wip/benchmarks
  • wip/bgamari
  • wip/bifunctor
  • wip/broken-what34
  • wip/bump
  • wip/constraints
  • wip/docker-bump
  • wip/docker-env
  • wip/fix-ghc-lib-parser
  • wip/fix-repo
  • wip/fix-restricted-eval
  • wip/fix-upstream-url
  • wip/flake-aarch64
  • wip/foliage
  • wip/ghc-11112-b
  • wip/ghc-debug-bump
  • wip/ghc-debug-commit
  • wip/ghc-debug-tests
  • wip/ghc-exactprint
  • wip/ghc-tcplugins
  • wip/ghcide
  • wip/ghcide-2.9.0.0
  • wip/happy-1.20.0-GHC9.6
  • wip/liquidhaskell
  • wip/luite/fix-ghcide-910
  • wip/mi_globals_liquidhaskell_boot
  • wip/microstache
  • wip/monomorphic-list
  • wip/no-update-branch-on-mr
  • wip/parallel-builds
  • wip/pizza-rolls
  • wip/romes/extend
  • wip/romes/hpt-refactor
  • wip/sand-witch/revert-th-argpat
  • wip/separate-logs
  • wip/signal-9
  • wip/stackage-snapshots
  • wip/stackage-wip
  • wip/staged-pipeline
  • wip/teo/bump-ghc-debug
  • wip/teo/containers-0.8
  • wip/teo/linear-broken
  • wip/text-2.0
  • wip/update-doctest-patch
  • wip/vty-5.36
  • wip/windows
  • wip/zubin-stackage
71 results
Show changes
Commits on Source (7)
...@@ -117,10 +117,12 @@ build-8.10: ...@@ -117,10 +117,12 @@ build-8.10:
after_script: after_script:
- ls -lh - ls -lh
# Create rts-stats/ so tar doesn't complain if we didn't collect rts stats
- mkdir -p rts-stats
- | - |
nix run -f ./ci -c \ nix run -f ./ci -c \
tar -cJf results.tar.xz -C ci/run \ tar -cJf results.tar.xz -C ci/run \
results.json logs results.json logs rts-stats
artifacts: artifacts:
when: always when: always
......
...@@ -254,9 +254,10 @@ buildPackage cfg pname version = do ...@@ -254,9 +254,10 @@ buildPackage cfg pname version = do
(makeTestCabalFile cfg pname version) (makeTestCabalFile cfg pname version)
-- run the build -- run the build
absDirName <- makeAbsolute "./store"
code <- runProcess $ setWorkingDir dirName code <- runProcess $ setWorkingDir dirName
$ proc "cabal" $ proc "cabal"
$ ["new-build"] ++ cabalOptions cfg $ ["--store-dir="++absDirName, "v2-build"] ++ cabalOptions cfg
-- figure out what happened -- figure out what happened
let planPath = dirName </> "dist-newstyle" </> "cache" </> "plan.json" let planPath = dirName </> "dist-newstyle" </> "cache" </> "plan.json"
...@@ -383,7 +384,7 @@ setup cfg = do ...@@ -383,7 +384,7 @@ setup cfg = do
, MakeConstraints.allowNewer MakeConstraints.bootPkgs , MakeConstraints.allowNewer MakeConstraints.bootPkgs
] ++ map PP.text extraFragments ] ++ map PP.text extraFragments
runProcess_ $ proc "cabal" ["new-update"] runProcess_ $ proc "cabal" ["v2-update"]
-- Force cabal to rebuild the index cache. -- Force cabal to rebuild the index cache.
buildPackage cfg "acme-box" (mkVersion [0,0,0,0]) buildPackage cfg "acme-box" (mkVersion [0,0,0,0])
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A small GHC wrapper script for preserving RTS -t output.
Arguments: GHC arguments
Environment:
GHC_RTS_STATS_DIR: Directory in which to place -t output. File will be named after
output path given by -o.
GHC_RTS_STATS_COMPILER: GHC to wrap.
"""
import subprocess
import sys
import os
from pathlib import Path
from typing import List, Optional
def find_output(args: List[str]) -> Optional[Path]:
"""
Find the value of the GHC -o flag.
"""
for arg0, arg1 in zip(args[:-1], args[1:]):
if arg0 == '-o':
return Path(arg1)
return None
def main() -> None:
output = find_output(sys.argv)
ghc_path = os.environ['GHC_RTS_STATS_COMPILER']
args = [ghc_path] + sys.argv[1:]
if output is not None:
print(args)
out_dir = Path(os.environ['GHC_RTS_STATS_DIR'])
out_dir.mkdir(parents=True, exist_ok=True)
stats_output = out_dir / (output.name + '.stats')
args += ['+RTS', '--machine-readable', '-t%s' % stats_output, '-RTS']
perf_dir = os.environ.get('GHC_PERF_STATS_DIR')
if perf_dir:
events = os.environ.get('GHC_PERF_STATS_EVENTS', 'cycles,instructions,cache-misses')
Path(perf_dir).mkdir(parents=True, exist_ok=True)
perf_output = Path(perf_dir) / (output.name + '.perf')
args = ['perf', 'stat', '-o', str(perf_output), '-e', events ] + args
ret = subprocess.call(args)
sys.exit(ret)
if __name__ == '__main__':
main()
#!/usr/bin/env bash #!/usr/bin/env bash
# head.hackage CI driver script
# =============================
#
# Environment variables:
# GHC: path to `ghc` executable (defaults to `ghc`)
# CI_CONFIG: path to a configuration script (defaults to `config.sh`)
# EXTRA_OPTS: extra options to pass to `head-hackage-ci`
# EXTRA_HC_OPTS: extra options to pass to `ghc`
# CPUS: parallelism amount
# USE_NIX: use `nix` to provide build dependencies.
# COLLECT_RTS_STATS
# collect runtime system statistics from compiler (forced on)
# COLLECT_PERF_STATS
# collect perf_events counters from compiler
# GHC_PERF_STATS_EVENTS
# which counters to collect
#
# Configuration script
# --------------------
#
# The configuration script (`config.sh` by default) provides various
# ad-hoc configuration including:
#
# - which packages are broken
# - extra packages to build (that don't have a patch)
set -e set -e
cd ci cd ci
...@@ -26,18 +52,19 @@ if [ -n "$EXTRA_HC_OPTS" ]; then ...@@ -26,18 +52,19 @@ if [ -n "$EXTRA_HC_OPTS" ]; then
EXTRA_OPTS="$EXTRA_OPTS --ghc-option=\"$EXTRA_HC_OPTS\"" EXTRA_OPTS="$EXTRA_OPTS --ghc-option=\"$EXTRA_HC_OPTS\""
fi fi
mkdir -p run OUT_DIR="$(realpath .)/run"
mkdir -p $OUT_DIR
echo "" > run/deps.cabal.project echo "" > $OUT_DIR/deps.cabal.project
if [ -n "$USE_NIX" ]; then if [ -n "$USE_NIX" ]; then
# Generate native library dependency mapping # Generate native library dependency mapping
nix eval --raw -f ./. cabalDepsSrc >> run/deps.cabal.project nix eval --raw -f ./. cabalDepsSrc >> $OUT_DIR/deps.cabal.project
run="nix run -f ../. -c head-hackage-ci" run="nix run -f ../. -c head-hackage-ci"
else else
run="head-hackage-ci" run="head-hackage-ci"
# Sigh, this is an abysmal hack # Sigh, this is an abysmal hack
bindir=$(realpath .)/run/bin bindir="$OUT_DIR/bin"
mkdir -p $bindir mkdir -p $bindir
PATH=$bindir:$PATH PATH=$bindir:$PATH
cp build-repo.sh $bindir/build-repo.sh cp build-repo.sh $bindir/build-repo.sh
...@@ -52,7 +79,34 @@ else ...@@ -52,7 +79,34 @@ else
cabal new-install head-hackage-ci --installdir=$bindir cabal new-install head-hackage-ci --installdir=$bindir
fi fi
cd run # Collect runtime system stats from compilation.
COLLECT_RTS_STATS=1
if [ -n "$COLLECT_RTS_STATS" ]; then
use_wrapper=1
export GHC_RTS_STATS_DIR="$OUT_DIR/rts-stats"
fi
# Collect perf stats from compilation.
if [ -n "$COLLECT_PERF_STATS" ]; then
use_wrapper=1
export GHC_PERF_STATS_DIR="$OUT_DIR/perf-stats"
# GHC_PERF_STATS_EVENTS can be set to determine which events are collected.
fi
# Compiler wrapper.
#
# To make this work we use ci/ghc-wrapper, which adds
# `+RTS --machine-readable -t...` to the compiler command-line.
if [ -n "$use_wrapper" ]; then
# We need to wrap both ghc and ghc-pkg since cabal-install needs to find the
# latter.
ln -sf $(pwd)/ghc-wrapper $OUT_DIR/ghc
ln -sf $(dirname $GHC)/ghc-pkg $OUT_DIR/ghc-pkg
export GHC_RTS_STATS_COMPILER="$GHC"
export GHC="$OUT_DIR/ghc"
fi
cd $OUT_DIR
rm -f cabal.project rm -f cabal.project
set -x set -x
$run \ $run \
......