From ff35a3fee5be3150a575603207ff68f2fe9d1f66 Mon Sep 17 00:00:00 2001 From: JRoberts <8711996+jr-simplex@users.noreply.github.com> Date: Thu, 15 Sep 2022 00:28:21 +0400 Subject: [PATCH] core: sqlcipher stack build (#991) * wip * uncomment * comment * ci split build step * check openssl * openssl version * add stack params * update mac openssl parameters * ls openssl * clean stack.yaml * clean up build.yml Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> --- .github/workflows/build.yml | 23 ++++++++++++++++++++++- stack.yaml | 3 ++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5984b70b0..5b386017d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -82,7 +82,7 @@ jobs: - name: Unix build id: unix_build - if: matrix.os != 'windows-latest' + if: matrix.os == 'ubuntu-20.04' || matrix.os == 'ubuntu-18.04' shell: bash run: | stack build --test @@ -99,6 +99,27 @@ jobs: # Unix / + # / Mac + + - name: Mac build + id: mac_build + if: matrix.os == 'macos-latest' + shell: bash + run: | + stack build --test --extra-include-dirs=/usr/local/opt/openssl@1.1/include --extra-lib-dirs=/usr/local/opt/openssl@1.1/lib + echo "::set-output name=local_install_root::$(stack path --local-install-root)" + + - name: Unix 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.unix_build.outputs.local_install_root }}/bin/simplex-chat + asset_name: ${{ matrix.asset_name }} + tag: ${{ github.ref }} + + # Mac / + # / 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 diff --git a/stack.yaml b/stack.yaml index ad0e40179a..3f01145672 100644 --- a/stack.yaml +++ b/stack.yaml @@ -69,6 +69,8 @@ flags: zip: disable-bzip2: true disable-zstd: true + direct-sqlcipher: + openssl: true # Extra package databases containing global packages # extra-package-dbs: [] @@ -84,7 +86,6 @@ flags: # arch: x86_64 # # Extra directories used by stack for building -# extra-include-dirs: [/path/to/dir] # extra-lib-dirs: [/path/to/dir] # # Allow a newer minor version of GHC than the snapshot specifies