Commit a211e2a8 authored by Ben Gamari's avatar Ben Gamari 🐢

squash

parent e5fe2580
Pipeline #2791 passed with stage
in 2 minutes and 10 seconds
......@@ -20,10 +20,7 @@ build-all:
echo "with-compiler: $GHC" >> cabal.project
echo "packages: packages/*" >> cabal.project
- ./scripts/patch-tool unpack_patch_all
- for pkg in `cat scripts/build-all.list`; do
echo "Building $pkg"
cabal new-install $pkg
done
- ./scripts/build-all.py
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
tags:
- x86_64-linux
......@@ -2,15 +2,22 @@
import subprocess
from pathlib import Path
import json
packages = open('scripts/build-all.list').read().split('\n')
for pkg_version in packages:
if not (Path('packages') / pkg_version).exists():
subprocess.check_call(['scripts/patch-tool', 'unpack-patch', 'patches/'+pkg_version+'.patch'])
def build_all(packages):
results = {}
for pkg_version in packages:
code = subprocess.call([
'cabal', 'new-build', pkg_version,
'--allow-newer=base,template-haskell',
'--ghc-option="-ddump-to-file -ddump-timings"'
])
results[pkg_version] = code
print(open('cabal.project.local').read())
for pkg_version in packages:
#pkg, version = line.split(' ')
#pkg_version = '%s-%s' % (pkg, version)
subprocess.check_call(['cabal', 'new-install', pkg_version])
return results
if __name__ == '__main__':
pkg_list = Path(__file__).parent / 'build-all.list'
packages = pkg_list.read_text().split('\n')
results = build_all(packages)
json.dump(results, open('build-all.json', 'w'))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment