Skip to content

Commit

Permalink
Initial windows workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
coot committed Mar 15, 2020
1 parent 50f059c commit 36e484b
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 0 deletions.
147 changes: 147 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: "Windows"
on: [push]

jobs:
test-windows-8_6_5:
name: "Win32 GHC-8.6.5"
runs-on: windows-latest
steps:
#
# Provisioning:
# * install ghc-8.6.5, msys2, cabal-isntall
# * setup path
# * close the repository
#
- name: Configure Chocolatey
run: choco source add -n mistuke -s https://www.myget.org/F/mistuke/api/v2
- name: Install msys2
run: choco install -y msys2
- name: Install GHC
run: choco install -y ghc --version 8.6.5
- name: Install Cabal
run: choco install -y cabal --version 3.0.0.0
- name: Set PATH
run: |
[Environment]::GetEnvironmentVariable("Path")
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\cabal\tools\cabal-3.0.0.0"
Write-Host "::add-path::C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.6.5\bin"
- name: Print versions
run: |
ghc --version
cabal --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: cabal-store-8.6.5
- name: Update Hackage index
run: cabal v2-update
- uses: actions/checkout@v2

- name: Use cabal.project.local.windows
run: Copy-Item "cabal.projcet.local.ci.windows" -Destination "cabal.proejct.local"


# Win32-network
- name: Build Win32-network dependencies
run: cabal v2-build --only-dependencies Win32-network

- name: Build Win32-network
run: cabal v2-build Win32-network

# ntp-client
- name: Build ntp-client dependencies
run: cabal v2-build -fdemo ntp-client

- name: Build ntp-client
run: cabal v2-build -fdemo ntp-client


# io-sim-classes
- name: Build io-sim-classes dependencies
run: cabal v2-build --only-dependencies io-sim-classes

- name: Build io-sim-classes
run: cabal v2-build io-sim-classes


# io-sim
- name: Build io-sim dependencies
run: cabal v2-build -fasserts --only-dependencies io-sim

- name: Build io-sim
run: cabal v2-build -fasserts io-sim


# typed-protocols
- name: Build typed-protcols dependencies
run: cabal v2-build --only-dependencies typed-protocols

- name: Build typed-protocols
run: cabal v2-build typed-protocols


# typed-protocols-examples
- name: Build typed-protocols-examples dependencies
run: cabal v2-build --only-dependencies typed-protocols-examples

- name: Build typed-protocols
run: cabal v2-build typed-protocols-examples


# network-mux
- name: Build network-mux dependencies
run: cabal v2-build --only-dependencies -fasserts network-mux

- name: Build typed-protocols
run: cabal v2-build -fasserts network-mux


# ouroboros-network-framework
- name: Build ouroboros-network-framework dependencies
run: cabal v2-build --only-dependencies -fasserts ouroboros-network-framework

- name: Build typed-protocols
run: cabal v2-build -fasserts ouroboros-network-framework

# ouroboros-network
- name: Build ouroboros-network dependencies
run: cabal v2-build --only-dependencies -fasserts ouroboros-network

- name: Build typed-protocols
run: cabal v2-build -fasserts ouroboros-network


#
# Tests
#
# GitHub-Actions stop as soon as one of them fails; initially we want to
# just check if everything builds, test support will come later; then we
# can move this tests to each section (failing early is then a plus)
#

- name: Test Win32-network
run: cabal v2-run test-Win32-network

- name: Test ntp-client
run: cabal v2-run test-ntp-client

- name: Test io-sim
run: cabal v2-run -fasserts test-sim

- name: Test typed-protocols-examples
run: cabal v2-run typed-protocols-tests

- name: Test network-mux
run: cabal v2-run -fasserts test-network-mux

- name: Test ourobors-network-framework
run: cabal v2-run -fasserts ouroboros-network-framework


- name: Test ouroboros-network
run: cabal v2-run -fasserts test-network

# TODO: we need to install the cddl tool
# - name: Test CDDL spec
# run: cabal v2-run -fasserts test-cddl
29 changes: 29 additions & 0 deletions cabal.project.local.ci.windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
packge Win32-network
ghc-options: -Wall -Werror
flags: +demo

package ntp-client
ghc-options: -Wall -Werror
flags: +demo

package io-sim-classes
ghc-options: -Wall -Werror
flags: -fasserts -fchecktvarinvariant

package typed-protocols
ghc-options: -Wall -Werror

package typed-protocols-examples
ghc-options: -Wall -Werror
flags:

package network-mux
ghc-options: -Wall -Werror
flags: +ipv6 +asserts

package ouroboros-network-framework
ghc-options: -Wall -Werror

package ouroboros-network
ghc-options: -Wall -Werror
flags: +ipv6 +cddl +asserts

0 comments on commit 36e484b

Please sign in to comment.