From b5e4f127a430d2d791e2d2c2a3f373ba929da87a Mon Sep 17 00:00:00 2001 From: Stanislav Dmitrenko <7953703+avently@users.noreply.github.com> Date: Fri, 15 Sep 2023 19:17:55 +0300 Subject: [PATCH] action: fix building CLI on Windows (#3058) * action: fix building on Windows * fix package version on Windows * tail --- .github/workflows/build.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c2db6e3bb..85c87e8ae1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -210,19 +210,18 @@ jobs: # Unix / # / Windows - - # * 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 + # rm -rf dist-newstyle/src/direct-sq* is here because of the bug in cabal's dependency which prevents second build from finishing - name: Windows build id: windows_build if: matrix.os == 'windows-latest' - shell: cmd + shell: bash run: | + rm -rf dist-newstyle/src/direct-sq* + sed -i "s/, unix /--, unix /" simplex-chat.cabal cabal build --enable-tests - cabal list-bin simplex-chat > tmp_bin_path - set /p bin_path= < tmp_bin_path - echo ::set-output name=bin_path::%bin_path% + rm -rf dist-newstyle/src/direct-sq* + echo "::set-output name=bin_path::$(cabal list-bin simplex-chat | tail -n 1)" - name: Windows upload binary to release if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'windows-latest'