build: disable compiler optimizations by default

This commit is contained in:
Evgeny @ SimpleX Chat
2026-06-09 15:41:04 +00:00
parent f144bf4560
commit fd6131a020
8 changed files with 59 additions and 18 deletions
+4 -4
View File
@@ -233,7 +233,7 @@ jobs:
run: |
cabal clean
cabal update
cabal build -j --enable-tests
cabal build -j --enable-tests ${{ github.event_name != 'pull_request' && '-foptimize' || '' }}
mkdir -p /out
for i in simplex-chat simplex-chat-test; do
bin=$(find /project/dist-newstyle -name "$i" -type f -executable)
@@ -527,7 +527,7 @@ jobs:
id: mac_cli_build
shell: bash
run: |
cabal build -j --enable-tests
cabal build -j --enable-tests ${{ github.event_name != 'pull_request' && '-foptimize' || '' }}
path=$(cabal list-bin simplex-chat)
echo "bin_path=$path" >> $GITHUB_OUTPUT
echo "bin_hash=$(echo SHA2-256\(${{ matrix.cli_asset_name }}\)= $(openssl sha256 $path | cut -d' ' -f 2))" >> $GITHUB_OUTPUT
@@ -575,7 +575,7 @@ jobs:
attempts=1
${{ (github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/tags/v')) }} && attempts=3
while [ "$i" -le "$attempts" ]; do
if cabal test --test-show-details=direct; then
if cabal test --test-show-details=direct ${{ github.event_name != 'pull_request' && '-foptimize' || '' }}; then
break
else
echo "Attempt $i failed, retrying..."
@@ -654,7 +654,7 @@ jobs:
rm -rf dist-newstyle/src/direct-sq*
sed -i "s/, unix /--, unix /" simplex-chat.cabal
cabal build -j --enable-tests
cabal build -j --enable-tests ${{ github.event_name != 'pull_request' && '-foptimize' || '' }}
rm -rf dist-newstyle/src/direct-sq*
path=$(cabal list-bin simplex-chat | tail -n 1)
echo "bin_path=$path" >> $GITHUB_OUTPUT