Skip to content

Commit

Permalink
Update CI for cabal-install and cabal-install-solver
Browse files Browse the repository at this point in the history
* Changes needed for GenValidate and release.py to
  accommmodate new solver dependency
* Bumps bootstrap plans to modern GHC versions
* Update `validate.sh` and `release.py` to accommodate new solver dep.
* Update `Makefile` targets
  • Loading branch information
emilypi committed May 2, 2021
1 parent a54f9d2 commit bf8dff5
Show file tree
Hide file tree
Showing 26 changed files with 954 additions and 888 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
- uses: actions/checkout@v2
- name: Package project
run: |
cabal v2-sdist --builddir=sdist Cabal cabal-install
python3.8 release.py --tarlib=sdist/sdist/Cabal-*.tar.gz --tarexe=sdist/sdist/cabal-install-*.tar.gz
cabal v2-sdist --builddir=sdist Cabal cabal-install-solver cabal-install
python3.8 release.py --tarlib=sdist/sdist/Cabal-*.tar.gz --tarsolver=sdist/sdist/cabal-install-solver-3.*.tar.gz --tarexe=sdist/sdist/cabal-install-3.*.tar.gz
- uses: actions/upload-artifact@v2
with:
name: cabal-linux
Expand Down Expand Up @@ -62,8 +62,8 @@ jobs:
- uses: actions/checkout@v2
- name: Package project
run: |
cabal v2-sdist --builddir=sdist Cabal cabal-install
python3 release.py --tarlib=sdist/sdist/Cabal-*.tar.gz --tarexe=sdist/sdist/cabal-install-*.tar.gz
cabal v2-sdist --builddir=sdist Cabal cabal-install-solver cabal-install
python3 release.py --tarlib=sdist/sdist/Cabal-*.tar.gz --tarsolver=sdist/sdist/cabal-install-solver-3.*.tar.gz --tarexe=sdist/sdist/cabal-install-3.*.tar.gz
- uses: actions/upload-artifact@v2
with:
name: cabal-macos
Expand Down Expand Up @@ -93,9 +93,9 @@ jobs:
- name: Package project
# We hardcode version 3 here to make first glob not overlap with cabal-install
run: |
cabal v2-sdist --builddir=sdist Cabal cabal-install
cabal v2-sdist --builddir=sdist Cabal cabal-install-solver cabal-install
New-Item -Path "_build" -ItemType "directory"
python release.py --tarlib=$(Resolve-Path -Path sdist/sdist/Cabal-3.*.tar.gz) --tarexe=$(Resolve-Path -Path sdist/sdist/cabal-install-3.*.tar.gz)
python release.py --tarlib=$(Resolve-Path -Path sdist/sdist/Cabal-3.*.tar.gz) --tarsolver=$(Resolve-Path -Path sdist/sdist/cabal-install-solver-3.*.tar.gz) --tarexe=$(Resolve-Path -Path sdist/sdist/cabal-install-3.*.tar.gz)
- uses: actions/upload-artifact@v2
with:
name: cabal-windows
Expand Down
42 changes: 10 additions & 32 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ jobs:
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s print-config
- name: Validate print-tool-versions
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s print-tool-versions
- name: Validate make-cabal-install-dev
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s make-cabal-install-dev
- name: Validate build
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s build
- name: Validate lib-tests
Expand Down Expand Up @@ -140,8 +138,6 @@ jobs:
run: sh validate.sh -j 2 -w ghc-8.8.3 -v --solver-benchmarks -s print-config
- name: Validate print-tool-versions
run: sh validate.sh -j 2 -w ghc-8.8.3 -v --solver-benchmarks -s print-tool-versions
- name: Validate make-cabal-install-dev
run: sh validate.sh -j 2 -w ghc-8.8.3 -v --solver-benchmarks -s make-cabal-install-dev
- name: Validate build
run: sh validate.sh -j 2 -w ghc-8.8.3 -v --solver-benchmarks -s build
- name: Validate lib-tests
Expand Down Expand Up @@ -188,8 +184,6 @@ jobs:
run: sh validate.sh -j 2 -w ghc-8.6.5 -v --complete-hackage-tests -s print-config
- name: Validate print-tool-versions
run: sh validate.sh -j 2 -w ghc-8.6.5 -v --complete-hackage-tests -s print-tool-versions
- name: Validate make-cabal-install-dev
run: sh validate.sh -j 2 -w ghc-8.6.5 -v --complete-hackage-tests -s make-cabal-install-dev
- name: Validate build
run: sh validate.sh -j 2 -w ghc-8.6.5 -v --complete-hackage-tests -s build
- name: Validate lib-tests
Expand Down Expand Up @@ -236,8 +230,6 @@ jobs:
run: sh validate.sh -j 2 -w ghc-8.4.4 -v -s print-config
- name: Validate print-tool-versions
run: sh validate.sh -j 2 -w ghc-8.4.4 -v -s print-tool-versions
- name: Validate make-cabal-install-dev
run: sh validate.sh -j 2 -w ghc-8.4.4 -v -s make-cabal-install-dev
- name: Validate build
run: sh validate.sh -j 2 -w ghc-8.4.4 -v -s build
- name: Validate lib-tests
Expand Down Expand Up @@ -284,8 +276,6 @@ jobs:
run: sh validate.sh -j 2 -w ghc-8.2.2 -v -s print-config
- name: Validate print-tool-versions
run: sh validate.sh -j 2 -w ghc-8.2.2 -v -s print-tool-versions
- name: Validate make-cabal-install-dev
run: sh validate.sh -j 2 -w ghc-8.2.2 -v -s make-cabal-install-dev
- name: Validate build
run: sh validate.sh -j 2 -w ghc-8.2.2 -v -s build
- name: Validate lib-tests
Expand Down Expand Up @@ -329,21 +319,15 @@ jobs:
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.0.2 -v -s print-config
run: sh validate.sh -j 2 -w ghc-8.0.2 -v --lib-only -s print-config
- name: Validate print-tool-versions
run: sh validate.sh -j 2 -w ghc-8.0.2 -v -s print-tool-versions
- name: Validate make-cabal-install-dev
run: sh validate.sh -j 2 -w ghc-8.0.2 -v -s make-cabal-install-dev
run: sh validate.sh -j 2 -w ghc-8.0.2 -v --lib-only -s print-tool-versions
- name: Validate build
run: sh validate.sh -j 2 -w ghc-8.0.2 -v -s build
run: sh validate.sh -j 2 -w ghc-8.0.2 -v --lib-only -s build
- name: Validate lib-tests
run: sh validate.sh -j 2 -w ghc-8.0.2 -v -s lib-tests
run: sh validate.sh -j 2 -w ghc-8.0.2 -v --lib-only -s lib-tests
- name: Validate lib-suite
run: sh validate.sh -j 2 -w ghc-8.0.2 -v -s lib-suite
- name: Validate cli-tests
run: sh validate.sh -j 2 -w ghc-8.0.2 -v -s cli-tests
- name: Validate cli-suite
run: sh validate.sh -j 2 -w ghc-8.0.2 -v -s cli-suite
run: sh validate.sh -j 2 -w ghc-8.0.2 -v --lib-only -s lib-suite
validate-7_10_3:
name: validate.sh ghc-7.10.3
runs-on: ubuntu-18.04
Expand Down Expand Up @@ -377,21 +361,15 @@ jobs:
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-7.10.3 -v -s print-config
run: sh validate.sh -j 2 -w ghc-7.10.3 -v --lib-only -s print-config
- name: Validate print-tool-versions
run: sh validate.sh -j 2 -w ghc-7.10.3 -v -s print-tool-versions
- name: Validate make-cabal-install-dev
run: sh validate.sh -j 2 -w ghc-7.10.3 -v -s make-cabal-install-dev
run: sh validate.sh -j 2 -w ghc-7.10.3 -v --lib-only -s print-tool-versions
- name: Validate build
run: sh validate.sh -j 2 -w ghc-7.10.3 -v -s build
run: sh validate.sh -j 2 -w ghc-7.10.3 -v --lib-only -s build
- name: Validate lib-tests
run: sh validate.sh -j 2 -w ghc-7.10.3 -v -s lib-tests
run: sh validate.sh -j 2 -w ghc-7.10.3 -v --lib-only -s lib-tests
- name: Validate lib-suite
run: sh validate.sh -j 2 -w ghc-7.10.3 -v -s lib-suite
- name: Validate cli-tests
run: sh validate.sh -j 2 -w ghc-7.10.3 -v -s cli-tests
- name: Validate cli-suite
run: sh validate.sh -j 2 -w ghc-7.10.3 -v -s cli-suite
run: sh validate.sh -j 2 -w ghc-7.10.3 -v --lib-only -s lib-suite
validate-7_8_4:
name: validate.sh ghc-7.8.4
runs-on: ubuntu-18.04
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jobs:
run: sh validate.sh -j 2 -w ghc-8.8.3 -v -s print-config
- name: Validate print-tool-versions
run: sh validate.sh -j 2 -w ghc-8.8.3 -v -s print-tool-versions
- name: Validate make-cabal-install-dev
run: sh validate.sh -j 2 -w ghc-8.8.3 -v -s make-cabal-install-dev
- name: Validate build
run: sh validate.sh -j 2 -w ghc-8.8.3 -v -s build
- name: Validate lib-tests
Expand Down Expand Up @@ -112,8 +110,6 @@ jobs:
run: sh validate.sh -j 2 -w ghc-8.6.5 -v -s print-config
- name: Validate print-tool-versions
run: sh validate.sh -j 2 -w ghc-8.6.5 -v -s print-tool-versions
- name: Validate make-cabal-install-dev
run: sh validate.sh -j 2 -w ghc-8.6.5 -v -s make-cabal-install-dev
- name: Validate build
run: sh validate.sh -j 2 -w ghc-8.6.5 -v -s build
- name: Validate lib-tests
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/quick-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
make -B spdx
make -B templates
make -B github-actions
make -B cabal-install-cabal
- name: Check that diff is clean
run: |
git status > /dev/null
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ jobs:
- name: Update Hackage index
run: cabal v2-update
- uses: actions/checkout@v2
- name: make cabal-install-dev
run: cp cabal-install/cabal-install.cabal.dev cabal-install/cabal-install.cabal
# We cannot ask for all dependencies, but we can for Cabal.
- name: cabal v2-build Cabal --only-dependencies
run: cabal v2-build Cabal --only-dependencies
Expand All @@ -51,10 +49,10 @@ jobs:
run: |
cd cabal-install
cabal v2-run cabal-install:memory-usage-tests
- name: cabal-install solver-quickcheck
- name: cabal-install long-tests
run: |
cd cabal-install
cabal v2-run cabal-install:solver-quickcheck
cabal v2-run cabal-install:long-tests -- --pattern "! (/FileMonitor/ || /VCS/ || /Get/)"
- name: cabal-install integration-tests2
run: |
cd cabal-install
Expand Down Expand Up @@ -87,8 +85,6 @@ jobs:
- name: Update Hackage index
run: cabal v2-update
- uses: actions/checkout@v2
- name: make cabal-install-dev
run: cp cabal-install/cabal-install.cabal.dev cabal-install/cabal-install.cabal
# We cannot ask for all dependencies, but we can for Cabal.
- name: cabal v2-build Cabal --only-dependencies
run: cabal v2-build Cabal --only-dependencies
Expand All @@ -101,10 +97,10 @@ jobs:
run: |
cd cabal-install
cabal v2-run cabal-install:memory-usage-tests
- name: cabal-install solver-quickcheck
- name: cabal-install long-tests
run: |
cd cabal-install
cabal v2-run cabal-install:solver-quickcheck
cabal v2-run cabal-install:long-tests -- --pattern "! (/FileMonitor/ || /VCS/ || /Get/)"
- name: cabal-install integration-tests2
run: |
cd cabal-install
Expand Down
35 changes: 8 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.PHONY : all lexer sdpx lib exe doctest
.PHONY : cabal-install-dev cabal-install-prod
.PHONY : phony

CABALBUILD := cabal v2-build
Expand Down Expand Up @@ -67,24 +66,6 @@ buildinfo-fields-reference : phony
cabal build --builddir=dist-newstyle-bi --project-file=cabal.project.buildinfo buildinfo-reference-generator
$$(cabal-plan list-bin --builddir=dist-newstyle-bi buildinfo-reference-generator) buildinfo-reference-generator/template.zinza | tee $@

# cabal-install.cabal file generation

cabal-install-cabal : phony cabal-install/cabal-install.cabal.dev cabal-install/cabal-install.cabal.prod

cabal-install/cabal-install.cabal.dev : cabal-install/cabal-install.cabal.zinza
cabal v2-run --builddir=dist-newstyle-meta --project-file=cabal.project.meta gen-cabal-install-cabal -- True cabal-install/cabal-install.cabal.zinza cabal-install/cabal-install.cabal.dev

cabal-install/cabal-install.cabal.prod : cabal-install/cabal-install.cabal.zinza
cabal v2-run --builddir=dist-newstyle-meta --project-file=cabal.project.meta gen-cabal-install-cabal -- False cabal-install/cabal-install.cabal.zinza cabal-install/cabal-install.cabal.prod

cabal-install-prod : cabal-install/cabal-install.cabal.prod
cp cabal-install/cabal-install.cabal.prod cabal-install/cabal-install.cabal

cabal-install-dev : cabal-install/cabal-install.cabal.dev
cp cabal-install/cabal-install.cabal.dev cabal-install/cabal-install.cabal
@echo "tell git to ignore changes to cabal-install.cabal:"
@echo "git update-index --assume-unchanged cabal-install/cabal-install.cabal"

# analyse-imports
analyse-imports : phony
find Cabal/src cabal-install/src -type f -name '*.hs' | xargs cabal v2-run --builddir=dist-newstyle-meta --project-file=cabal.project.meta analyse-imports --
Expand Down Expand Up @@ -115,7 +96,7 @@ doctest :

# This is not run as part of validate.sh (we need hackage-security, which is tricky to get).
doctest-cli :
doctest -D__DOCTEST__ --fast cabal-install/src cabal-install/cabal-install-solver/src cabal-install/cabal-install-solver/src-assertion
doctest -D__DOCTEST__ --fast cabal-install/src cabal-install-solver/src cabal-install-solver/src-assertion

# tests

Expand Down Expand Up @@ -237,17 +218,17 @@ bootstrap-plans-linux: phony
@if [ $$(uname) != "Linux" ]; then echo "Not Linux"; false; fi
cabal v2-build --project=cabal.project.release --with-compiler ghc-8.6.5 --dry-run cabal-install:exe:cabal
cp dist-newstyle/cache/plan.json bootstrap/linux-8.6.5.plan.json
cabal v2-build --project=cabal.project.release --with-compiler ghc-8.8.3 --dry-run cabal-install:exe:cabal
cp dist-newstyle/cache/plan.json bootstrap/linux-8.8.3.plan.json
cabal v2-build --project=cabal.project.release --with-compiler ghc-8.10.1 --dry-run cabal-install:exe:cabal
cp dist-newstyle/cache/plan.json bootstrap/linux-8.10.1.plan.json
cabal v2-build --project=cabal.project.release --with-compiler ghc-8.8.4 --dry-run cabal-install:exe:cabal
cp dist-newstyle/cache/plan.json bootstrap/linux-8.8.4.plan.json
cabal v2-build --project=cabal.project.release --with-compiler ghc-8.10.4 --dry-run cabal-install:exe:cabal
cp dist-newstyle/cache/plan.json bootstrap/linux-8.10.4.plan.json

bootstrap-jsons-linux: phony
@if [ $$(uname) != "Linux" ]; then echo "Not Linux"; false; fi
cabal v2-build --builddir=dist-newstyle-bootstrap --project=cabal.project.bootstrap cabal-bootstrap-gen
cabal v2-run -vnormal+stderr --builddir=dist-newstyle-bootstrap --project=cabal.project.bootstrap cabal-bootstrap-gen -- bootstrap/linux-8.6.5.plan.json | python -m json.tool | tee bootstrap/linux-8.6.5.json
cabal v2-run -vnormal+stderr --builddir=dist-newstyle-bootstrap --project=cabal.project.bootstrap cabal-bootstrap-gen -- bootstrap/linux-8.8.3.plan.json | python -m json.tool | tee bootstrap/linux-8.8.3.json
cabal v2-run -vnormal+stderr --builddir=dist-newstyle-bootstrap --project=cabal.project.bootstrap cabal-bootstrap-gen -- bootstrap/linux-8.10.1.plan.json | python -m json.tool | tee bootstrap/linux-8.10.1.json
cabal v2-run -vnormal+stderr --builddir=dist-newstyle-bootstrap --project=cabal.project.bootstrap cabal-bootstrap-gen -- bootstrap/linux-8.6.5.plan.json | python3 -m json.tool | tee bootstrap/linux-8.6.5.json
cabal v2-run -vnormal+stderr --builddir=dist-newstyle-bootstrap --project=cabal.project.bootstrap cabal-bootstrap-gen -- bootstrap/linux-8.8.4.plan.json | python3 -m json.tool | tee bootstrap/linux-8.8.4.json
cabal v2-run -vnormal+stderr --builddir=dist-newstyle-bootstrap --project=cabal.project.bootstrap cabal-bootstrap-gen -- bootstrap/linux-8.10.4.plan.json | python3 -m json.tool | tee bootstrap/linux-8.10.4.json

# documentation
##############################################################################
Expand Down
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ cache:
- "C:\\sr"

build_script:
- cp cabal-install/cabal-install.cabal.dev cabal-install/cabal-install.cabal
- cabal %CABOPTS% v2-configure --enable-tests
- appveyor-retry cabal %CABOPTS% v2-build lib:Cabal --only-dependencies
- cabal %CABOPTS% v2-build lib:Cabal
Expand All @@ -59,6 +58,6 @@ build_script:
- appveyor-retry cabal %CABOPTS% v2-build cabal-install:tests --only-dependencies
- cd cabal-install
- cabal %CABOPTS% v2-run cabal-install:memory-usage-tests
- cabal %CABOPTS% v2-run cabal-install:solver-quickcheck
- cabal %CABOPTS% v2-run cabal-install:long-tests -- --pattern "! (/FileMonitor/ || /VCS/ || /Get/)"
- cabal %CABOPTS% v2-run cabal-install:integration-tests2
- cabal %CABOPTS% v2-run cabal-install:unit-tests -- --pattern "! (/FileMonitor/ || /VCS/ || /Get/)"
2 changes: 2 additions & 0 deletions bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ def install_dep(dep: BootstrapDep, ghc: Compiler) -> None:
elif dep.source == PackageSource.LOCAL:
if dep.package == 'Cabal':
sdist_dir = Path('Cabal').resolve()
elif dep.package == 'cabal-install-solver':
sdist_dir = Path('cabal-install-solver').resolve()
elif dep.package == 'cabal-install':
sdist_dir = Path('cabal-install').resolve()
else:
Expand Down
Loading

0 comments on commit bf8dff5

Please sign in to comment.