diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000000..601bf91605e --- /dev/null +++ b/.github/workflows/windows.yml @@ -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 diff --git a/cabal.project.local.ci.windows b/cabal.project.local.ci.windows new file mode 100644 index 00000000000..ad7d543eff4 --- /dev/null +++ b/cabal.project.local.ci.windows @@ -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