update build.yaml
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 30b2861..93400b4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -23,12 +23,18 @@
     steps:
     - uses: actions/checkout@v1
     
-    - name: dependencies (ubuntu and macos)
-      if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }}
+    - name: dependencies (macos)
+      if: ${{ matrix.os == 'macos-latest' }}
+      run: |
+        brew uninstall openssl
+        brew install pkgconfig doctest
+        brew reinstall openssl@1.1
+    
+    - name: dependencies (ubuntu)
+      if: ${{ matrix.os == 'ubuntu-latest' }}
       run: |
         brew install pkgconfig doctest
-        brew reinstall openssl
-    
+
     - name: dependencies (windows)
       if: ${{ matrix.os == 'windows-latest' }}
       run: |