]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA/macos: tidy-ups, install impacket for cmake jobs
authorViktor Szakats <commit@vsz.me>
Sat, 14 Sep 2024 20:03:54 +0000 (22:03 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 15 Sep 2024 00:34:17 +0000 (02:34 +0200)
- install impacket for cmake jobs.

- stop installing autotools for cmake jobs.
  (also saving the extra seconds necessary for impacket install.)

- delete no longer necessary openssl pkg-config patch.

- `brew unlink openssl` unconditionally. This is safe, we no longer need
  it at the default path, and the condition were never met anyway for
  a while now.

- stop installing openssl, it's there on the base image.
  (it was also missed for cmake, but that's okay)

before: https://github.com/curl/curl/actions/runs/10864438947/job/30149718802
after: https://github.com/curl/curl/actions/runs/10865247916/job/30151507582

Closes #14911

.github/workflows/macos.yml

index 37490c393931153343b120414411d3deb1f42ffe..6412116c114fa4a5d0893855b514404fb6a9850f 100644 (file)
@@ -157,28 +157,14 @@ jobs:
         # while running the tests, for example
         # https://github.com/curl/curl/runs/4095721123?check_suite_focus=true
         run: |
-          echo libtool autoconf automake pkg-config libpsl libssh2 nghttp2 openssl stunnel ${{ matrix.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
+          echo autoconf automake libtool pkg-config libpsl libssh2 nghttp2 stunnel ${{ matrix.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
           while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done
 
       - name: 'brew unlink openssl'
         run: |
-          case "${{ matrix.install }}" in
-            *openssl*)
-              (
-                cd $(brew --prefix openssl)/lib/pkgconfig/
-                for i in libssl.pc libcrypto.pc; do
-                  sudo cp $i $i.orig
-                  sudo sed s,libdir=$(brew --prefix)'/Cellar/openssl@3/3.3.0$',libdir=$(brew --prefix)/Cellar/openssl@3/3.3.0/lib,g < $i.orig > /tmp/$i
-                  sudo cp /tmp/$i $i
-                  cat $i
-                done
-              )
-              ;;
-            *)
-              if test -d $(brew --prefix)/include/openssl; then
-                brew unlink openssl
-              fi;;
-          esac
+          if test -d $(brew --prefix)/include/openssl; then
+            brew unlink openssl
+          fi
 
       - name: 'pip3 install'
         run: |
@@ -320,19 +306,20 @@ jobs:
     steps:
       - name: 'brew install'
         run: |
-          echo libtool autoconf automake pkg-config libpsl libssh2 nghttp2 openssl stunnel ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
+          echo pkg-config libpsl libssh2 nghttp2 stunnel ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
           while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done
 
       - name: 'brew unlink openssl'
         run: |
-          case "${{ matrix.build.install }}" in
-            *openssl*)
-              ;;
-            *)
-              if test -d $(brew --prefix)/include/openssl; then
-                brew unlink openssl
-              fi;;
-          esac
+          if test -d $(brew --prefix)/include/openssl; then
+            brew unlink openssl
+          fi
+
+      - name: 'pip3 install'
+        run: |
+          python3 -m venv $HOME/venv
+          source $HOME/venv/bin/activate
+          python3 -m pip install impacket
 
       - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
 
@@ -479,7 +466,7 @@ jobs:
       - name: 'install autotools'
         if: ${{ matrix.build == 'autotools' }}
         run: |
-          echo autoconf automake libtool openssl | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
+          echo autoconf automake libtool | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
           while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done
 
       - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4