Skip to content

Add CI dogfood test; only Windows for this PR #7653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 104 additions & 8 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-haskell@v1.1.4
with:
ghc-version: '8.6.5'
cabal-version: '3.2.0.0'
cabal-version: '3.4.0.0'
- name: Print versions
run: |
[Environment]::GetEnvironmentVariable("Path")
Expand All @@ -37,9 +37,12 @@ jobs:
- name: Update Hackage index
run: cabal v2-update
- uses: actions/checkout@v2
# 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
# all dependencies of Cabal already there (due to GHC depending on Cabal)
- name: cabal v2-build Cabal
run: cabal v2-build Cabal
# We cannot ask for all dependencies, but we can for cabal-install.
- name: cabal v2-build cabal-install --only-dependencies
run: cabal v2-build cabal-install --only-dependencies
- name: cabal v2-build
run: cabal v2-build all
- name: Cabal unit-tests
Expand All @@ -64,14 +67,59 @@ jobs:
- name: cabal-tests
# Using only one job, -j1, to fail less.
run: cabal v2-run cabal-testsuite:cabal-tests -- -j1 --with-cabal=dist-newstyle\build\x86_64-windows\ghc-8.6.5\cabal-install-3.7.0.0\x\cabal\build\cabal\cabal.exe

#TODO: store the exe from above as artifact and re-use it here instead of building anew
test-windows-8_6_5-dogfood:
name: test ghc-8.6.5 dogfood
runs-on: windows-latest
steps:
- uses: actions/setup-haskell@v1.1.4
with:
ghc-version: '8.6.5'
cabal-version: '3.4.0.0'
- name: Print versions
run: |
[Environment]::GetEnvironmentVariable("Path")
cabal --version
ghc --version
cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3
- uses: actions/cache@v1
with:
path: C:\SR
key: windows-store-meta
- name: Update Hackage index
run: cabal v2-update
- uses: actions/checkout@v2
# all dependencies of Cabal already there (due to GHC depending on Cabal)
- name: cabal v2-build Cabal
run: cabal v2-build Cabal
# We cannot ask for all dependencies, but we can for cabal-install.
- name: cabal v2-build cabal-install --only-dependencies
run: cabal v2-build cabal-install --only-dependencies
- name: cabal v2-build
run: cabal v2-build all
- name: wipe out cabal store
run: Remove-Item -Recurse -Force C:\SR
- name: eat its own dogfood by building own Cabal source with itself
run: |
cp $(cabal list-bin exe:cabal) ./cabal-exe-current
./cabal-exe-current --version
./cabal-exe-current v2-build Cabal
shell: bash
- name: eat its own dogfood by building all deps with itself
run: ./cabal-exe-current v2-build cabal-install --only-dependencies
shell: bash
- name: eat its own dogfood by building own source with itself
run: ./cabal-exe-current v2-build all
shell: bash
test-windows-8_10_4:
name: test ghc-8.10.4
runs-on: windows-latest
steps:
- uses: actions/setup-haskell@v1.1.4
with:
ghc-version: '8.10.4'
cabal-version: '3.2.0.0'
cabal-version: '3.4.0.0'
- name: Print versions
run: |
[Environment]::GetEnvironmentVariable("Path")
Expand All @@ -85,9 +133,12 @@ jobs:
- name: Update Hackage index
run: cabal v2-update
- uses: actions/checkout@v2
# 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
# all dependencies of Cabal already there (due to GHC depending on Cabal)
- name: cabal v2-build Cabal
run: cabal v2-build Cabal
# We cannot ask for all dependencies, but we can for cabal-install.
- name: cabal v2-build cabal-install --only-dependencies
run: cabal v2-build cabal-install --only-dependencies
- name: cabal v2-build
run: cabal v2-build all
- name: Cabal unit-tests
Expand All @@ -112,3 +163,48 @@ jobs:
- name: cabal-tests
# Using only one job, -j1, to fail less.
run: cabal v2-run cabal-testsuite:cabal-tests -- -j1 --with-cabal=dist-newstyle\build\x86_64-windows\ghc-8.10.4\cabal-install-3.7.0.0\x\cabal\build\cabal\cabal.exe

#TODO: store the exe from above as artifact and re-use it here instead of building anew
test-windows-8_10_4-dogfood:
name: test ghc-8.10.4 dogfood
runs-on: windows-latest
steps:
- uses: actions/setup-haskell@v1.1.4
with:
ghc-version: '8.10.4'
cabal-version: '3.4.0.0'
- name: Print versions
run: |
[Environment]::GetEnvironmentVariable("Path")
cabal --version
ghc --version
cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3
- uses: actions/cache@v1
with:
path: C:\SR
key: windows-store-meta
- name: Update Hackage index
run: cabal v2-update
- uses: actions/checkout@v2
# all dependencies of Cabal already there (due to GHC depending on Cabal)
- name: cabal v2-build Cabal
run: cabal v2-build Cabal
# We cannot ask for all dependencies, but we can for cabal-install.
- name: cabal v2-build cabal-install --only-dependencies
run: cabal v2-build cabal-install --only-dependencies
- name: cabal v2-build
run: cabal v2-build all
- name: wipe out cabal store
run: Remove-Item -Recurse -Force C:\SR
- name: eat its own dogfood by building own Cabal source with itself
run: |
cp $(cabal list-bin exe:cabal) ./cabal-exe-current
./cabal-exe-current --version
./cabal-exe-current v2-build Cabal
shell: bash
- name: eat its own dogfood by building all deps with itself
run: ./cabal-exe-current v2-build cabal-install --only-dependencies
shell: bash
- name: eat its own dogfood by building own source with itself
run: ./cabal-exe-current v2-build all
shell: bash
59 changes: 55 additions & 4 deletions templates/ci-windows.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/setup-haskell@v1.1.4
with:
ghc-version: '{{ job.chocoVersion }}'
cabal-version: '3.2.0.0'
cabal-version: '3.4.0.0'
- name: Print versions
run: |
[Environment]::GetEnvironmentVariable("Path")
Expand All @@ -44,9 +44,12 @@ jobs:
- name: Update Hackage index
run: cabal v2-update
- uses: actions/checkout@v2
# 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
# all dependencies of Cabal already there (due to GHC depending on Cabal)
- name: cabal v2-build Cabal
run: cabal v2-build Cabal
# We cannot ask for all dependencies, but we can for cabal-install.
- name: cabal v2-build cabal-install --only-dependencies
run: cabal v2-build cabal-install --only-dependencies
- name: cabal v2-build
run: cabal v2-build all
- name: Cabal unit-tests
Expand All @@ -71,4 +74,52 @@ jobs:
- name: cabal-tests
# Using only one job, -j1, to fail less.
run: cabal v2-run cabal-testsuite:cabal-tests -- -j1 --with-cabal=dist-newstyle\build\x86_64-windows\ghc-{{ job.version }}\cabal-install-3.7.0.0\x\cabal\build\cabal\cabal.exe

#TODO: store the exe from above as artifact and re-use it here instead of building anew
test-windows-{{ mangleVersion job.version }}-dogfood:
name: test ghc-{{job.version}} dogfood
runs-on: windows-latest
{% for needs in job.needs %}
needs: test-windows-{{ mangleVersion needs }}
{% endfor %}
steps:
- uses: actions/setup-haskell@v1.1.4
with:
ghc-version: '{{ job.chocoVersion }}'
cabal-version: '3.4.0.0'
- name: Print versions
run: |
[Environment]::GetEnvironmentVariable("Path")
cabal --version
ghc --version
cabal user-config init -a "http-transport: plain-http" -a "store-dir: C:\SR" -f -v3
- uses: actions/cache@v1
with:
path: C:\SR
key: windows-store-meta
- name: Update Hackage index
run: cabal v2-update
- uses: actions/checkout@v2
# all dependencies of Cabal already there (due to GHC depending on Cabal)
- name: cabal v2-build Cabal
run: cabal v2-build Cabal
# We cannot ask for all dependencies, but we can for cabal-install.
- name: cabal v2-build cabal-install --only-dependencies
run: cabal v2-build cabal-install --only-dependencies
- name: cabal v2-build
run: cabal v2-build all
- name: wipe out cabal store
run: Remove-Item -Recurse -Force C:\SR
- name: eat its own dogfood by building own Cabal source with itself
run: |
cp $(cabal list-bin exe:cabal) ./cabal-exe-current
./cabal-exe-current --version
./cabal-exe-current v2-build Cabal
shell: bash
- name: eat its own dogfood by building all deps with itself
run: ./cabal-exe-current v2-build cabal-install --only-dependencies
shell: bash
- name: eat its own dogfood by building own source with itself
run: ./cabal-exe-current v2-build all
shell: bash
{% endfor %}