runtime: GitHub actions on MacOS failing since OPENSSL 1.0.2 removal

Related to https://github.com/actions/virtual-environments/issues/2089

I have an issue since the 14th December on my dotnet unit test workflow running on MacOS : The active test run was aborted. Reason: Test host process crashed : No usable version of libssl was found This occurs on netcoreapp3.1 with SDK 3.1.404.

Current runner version: '2.275.1' Operating System Mac OS X 10.15.7 19H15 Virtual Environment Environment: macos-10.15 Version: 20201212.1

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 28 (22 by maintainers)

Most upvoted comments

Given that the conversation has died down, and this is more about the GitHub Actions environment than .NET itself, I’m going to close the issue.

Hopefully all is quiet because things just work nicely in GitHub Actions. If not, at least we have a workaround (thanks, @vcsjones!)

Kevin’s workaround works great for me. Thanks!

Just for the sake of inspiration, this does the trick for me as I test on Ubuntu & macOS:

name: .NET Core
on: [push, pull_request]

jobs:
  build:
    strategy:
      matrix:
        operatingSystem: [ 'ubuntu-latest', 'macOS-latest' ]

    runs-on: ${{ matrix.operatingSystem }}
    timeout-minutes: 10

    steps:
    - name: Setup OpenSSL (macOS)
      if: matrix.operatingSystem == 'macOS-latest'
      run: |
        ln -s /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib /usr/local/lib/libssl.1.1.dylib
        ln -s /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib /usr/local/lib/libcrypto.1.1.dylib
    - uses: actions/checkout@v2
    - name: Setup .NET Core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 5.0.x
    - name: Install dependencies
      run: dotnet restore
    - name: Build
      run: dotnet build --configuration Release --no-restore
    - name: Test
      run: dotnet test --no-restore --verbosity normal