From 6c7e81777e4d7440537f5da51b0d75561b4eba09 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Mon, 26 Sep 2022 17:02:06 +0100 Subject: [PATCH] ci: windows build (#1128) * ci: windows build * enable windows build * fix intermittently failing test --- .github/workflows/build.yml | 40 +++++++++++++++++-------------------- tests/ChatTests.hs | 4 ++-- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20c0dbbd58..de8f3ab5bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,9 +58,9 @@ jobs: - os: macos-latest cache_path: ~/.cabal/store asset_name: simplex-chat-macos-x86-64 - # - os: windows-latest - # cache_path: C:/sr - # asset_name: simplex-chat-windows-x86-64 + - os: windows-latest + cache_path: C:/cabal + asset_name: simplex-chat-windows-x86-64 steps: - name: Clone project uses: actions/checkout@v2 @@ -127,26 +127,22 @@ jobs: # * In powershell multiline commands do not fail if individual commands fail - https://github.community/t/multiline-commands-on-windows-do-not-fail-if-individual-commands-fail/16753 # * And GitHub Actions does not support parameterizing shell in a matrix job - https://github.community/t/using-matrix-to-specify-shell-is-it-possible/17065 - # * So we're running a separate set of actions for Windows build - # TODO run tests on Windows - # - name: Windows build - # id: windows_build - # if: matrix.os == 'windows-latest' - # shell: cmd - # run: | - # stack build - # stack path --local-install-root > tmp_file - # set /p local_install_root= < tmp_file - # echo ::set-output name=local_install_root::%local_install_root% + - name: Windows build + id: windows_build + if: matrix.os == 'windows-latest' + shell: cmd + run: | + cabal build --enable-tests + echo "::set-output name=bin_path::$(cabal list-bin simplex-chat)" - # - name: Windows upload binary to release - # if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'windows-latest' - # uses: svenstaro/upload-release-action@v2 - # with: - # repo_token: ${{ secrets.GITHUB_TOKEN }} - # file: ${{ steps.windows_build.outputs.local_install_root }}\bin\simplex-chat.exe - # asset_name: ${{ matrix.asset_name }} - # tag: ${{ github.ref }} + - name: Windows upload binary to release + if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'windows-latest' + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ steps.windows_build.outputs.bin_path }} + asset_name: ${{ matrix.asset_name }} + tag: ${{ github.ref }} # Windows / diff --git a/tests/ChatTests.hs b/tests/ChatTests.hs index 1325db5620..0d49bf109b 100644 --- a/tests/ChatTests.hs +++ b/tests/ChatTests.hs @@ -2392,8 +2392,8 @@ testAsyncInitiatingOffline = withTmpFiles $ do alice ##> "/c" getInvitation alice withNewTestChat "bob" bobProfile $ \bob -> do - bob ##> ("/c " <> inv) - bob <## "confirmation sent!" + bob `send` ("/c " <> inv) + bob <### ["/c " <> inv, "confirmation sent!"] withTestChat "alice" $ \alice -> do concurrently_ (bob <## "alice (Alice): contact is connected")