Skip to content

Commit

Permalink
GitHub Actions: Fix macOS build issues
Browse files Browse the repository at this point in the history
Upgrade macOS OpenSSL dependency to use 3 instead of 1.1.

Python's pip from Homebrew now refuses to isntall globally:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
    xyz, where xyz is the package you are trying to
    install.

    If you wish to install a Python library that isn't in Homebrew,
    use a virtual environment:

    python3 -m venv path/to/venv
    source path/to/venv/bin/activate
    python3 -m pip install xyz

    If you wish to install a Python application that isn't in Homebrew,
    it may be easiest to use 'pipx install xyz', which will manage a
    virtual environment for you. You can install pipx with

    brew install pipx

    You may restore the old behavior of pip by passing
    the '--break-system-packages' flag to pip, or by adding
    'break-system-packages = true' to your pip.conf file. The latter
    will permanently disable this error.

    If you disable this error, we STRONGLY recommend that you additionally
    pass the '--user' flag to pip, or set 'user = true' in your pip.conf
    file. Failure to do this can result in a broken Homebrew installation.

    Read more about this behavior here: <https://peps.python.org/pep-0668/>

Using Pipx instead. Making the same change for Ubuntu just in case.
  • Loading branch information
micahsnyder committed May 3, 2024
1 parent 5c6b2d6 commit 9f2ca94
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ jobs:
- uses: actions/checkout@v1

- name: Install Build Tools
run: brew install bison flex
run: brew install bison flex pipx

- name: Install Dependencies
run: brew install bzip2 check curl-openssl json-c libxml2 ncurses openssl@1.1 pcre2 zlib
run: brew install bzip2 check curl json-c libxml2 ncurses openssl@3 pcre2 zlib

- name: Install pytest for easier to read test results
run: python3 -m pip install pytest
run: pipx install pytest

- uses: lukka/[email protected]

Expand All @@ -118,12 +118,14 @@ jobs:
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run:
cmake ${{runner.workspace}}/clamav -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DOPENSSL_ROOT_DIR=/usr/local/opt/[email protected]/
-DOPENSSL_CRYPTO_LIBRARY=/usr/local/opt/[email protected]/lib/libcrypto.1.1.dylib
-DOPENSSL_SSL_LIBRARY=/usr/local/opt/[email protected]/lib/libssl.1.1.dylib
-DENABLE_STATIC_LIB=ON
-DENABLE_EXAMPLES=ON
ls -la /opt/homebrew/
# &&
# cmake ${{runner.workspace}}/clamav -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
# -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@3/
# -DOPENSSL_CRYPTO_LIBRARY=/usr/local/opt/openssl@3/lib/libcrypto.3.dylib
# -DOPENSSL_SSL_LIBRARY=/usr/local/opt/openssl@3/lib/libssl.3.dylib
# -DENABLE_STATIC_LIB=ON
# -DENABLE_EXAMPLES=ON

- name: Build
shell: bash
Expand All @@ -148,13 +150,13 @@ jobs:
run: sudo apt-get update

- name: Install Build Tools
run: sudo apt-get install -y bison flex valgrind
run: sudo apt-get install -y bison flex valgrind pipx

- name: Install Dependencies
run: sudo apt-get install -y check libbz2-dev libcurl4-openssl-dev libjson-c-dev libmilter-dev libncurses5-dev libpcre3-dev libssl-dev libxml2-dev zlib1g-dev

- name: Install pytest for easier to read test results
run: python3 -m pip install pytest
run: pipx install pytest

- uses: lukka/[email protected]

Expand Down

0 comments on commit 9f2ca94

Please sign in to comment.