diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000000..cdf9fa67240 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,86 @@ +name: "Windows" +on: [push] + +jobs: + test-windows-8_6_5: + name: "Win32 GHC-8.6.5" + runs-on: windows-latest + steps: + - 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 + + # Win32-network + - name: Build Win32-network dependencies + run: cabal v2-build -fdemo --only-dependencies Win32-network + - name: Build Win32-network + run: cabal v2-build -fdemo Win32-network + + # io-sim-classes + - name: Build io-sim-classes dependencies + run: cabal v2-build -fasserts -fchecktvarinvariant --only-dependencies io-sim-classes + - name: Build io-sim-classes + run: cabal v2-build -fasserts -fchecktvarinvariant 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 + + # + # 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 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