]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CI: migrate macOS jobs from Azure and Travis CI to GitHub Actions
authorMarc Hoersken <info@marc-hoersken.de>
Tue, 24 Mar 2020 17:18:15 +0000 (18:18 +0100)
committerMarc Hoersken <info@marc-hoersken.de>
Tue, 24 Mar 2020 17:18:15 +0000 (18:18 +0100)
Reduce workload on Azure Pipelines and Travis CI while
consolidating macOS jobs onto less utilized GitHub Actions.

Reviewed-by: Daniel Stenberg
Closes #5124

.azure-pipelines.yml
.github/workflows/macos.yml [new file with mode: 0644]
.travis.yml

index ac00a8e4d2899ed6f0018d85baf838b38f97132f..cfab11e77618fc68f9803ee78da5641c342b5253 100644 (file)
@@ -172,88 +172,6 @@ stages:
       env:
         TFLAGS: "-n -t --shallow=40 !FTP"
 
-##########################################
-### macOS jobs below
-##########################################
-
-- stage: macos
-  dependsOn: []
-  jobs:
-  - job: macos_vanilla
-    displayName: macos default
-    timeoutInMinutes: 30
-    pool:
-      vmImage: 'macOS-latest'
-    steps:
-    - script: brew update && brew install libtool autoconf automake nghttp2 pkg-config
-      displayName: 'brew install'
-
-    - script: ./buildconf && ./configure --enable-debug --enable-werror --without-brotli
-      displayName: 'configure debug without brotli'
-
-    - script: make
-      displayName: 'make'
-
-    - script: make test-nonflaky
-      displayName: 'test'
-      env:
-        AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
-
-  - job: macos_libssh2
-    displayName: macos libssh2
-    timeoutInMinutes: 30
-    pool:
-      vmImage: 'macOS-latest'
-    steps:
-    - script: brew update && brew install libtool autoconf automake nghttp2 pkg-config libssh2
-      displayName: 'brew install'
-
-    - script: ./buildconf && ./configure --enable-debug --with-libssh2
-      displayName: 'configure debug with libssh2'
-
-    - script: make
-      displayName: 'make'
-
-    - script: make test-nonflaky
-      displayName: 'test'
-      env:
-        AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
-
-  - job: macos_cmake
-    displayName: macos cmake openssl
-    timeoutInMinutes: 20
-    pool:
-      vmImage: 'macOS-latest'
-    steps:
-    - script: brew update && brew install libtool autoconf automake nghttp2 pkg-config openssl
-      displayName: 'brew install'
-
-    - script: cmake -H. -Bbuild -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON && cmake --build build
-      displayName: 'cmake build'
-
-- stage: macos_torture
-  dependsOn: macos
-  jobs:
-  - job: macos_torture
-    displayName: macos torture
-    timeoutInMinutes: 60
-    pool:
-      vmImage: 'macOS-latest'
-    steps:
-    - script: brew update && brew install libtool autoconf automake nghttp2 pkg-config
-      displayName: 'brew install'
-
-    - script: ./buildconf && ./configure --enable-debug --disable-shared --disable-threaded-resolver --enable-alt-svc
-      displayName: 'configure torture'
-
-    - script: make
-      displayName: 'make'
-
-    - script: make test-nonflaky
-      displayName: 'torture test'
-      env:
-        TFLAGS: "-n -t --shallow=25 !FTP"
-
 ##########################################
 ### Windows jobs below
 ##########################################
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
new file mode 100644 (file)
index 0000000..36eb46d
--- /dev/null
@@ -0,0 +1,88 @@
+name: CI\r
+\r
+on: [push, pull_request]\r
+\r
+jobs:\r
+  autotools:\r
+    name: macos ${{ matrix.build.name }}\r
+    runs-on: 'macos-latest'\r
+    strategy:\r
+      fail-fast: false\r
+      matrix:\r
+        build:\r
+        - name: normal\r
+          install: nghttp2\r
+        - name: debug\r
+          install: nghttp2\r
+          configure: --enable-debug --enable-werror --without-brotli\r
+        - name: libssh2\r
+          install: nghttp2 libssh2\r
+          configure: --enable-debug --with-libssh2\r
+        - name: c-ares\r
+          install: nghttp2\r
+          configure: --enable-debug --enable-ares\r
+        - name: HTTP only\r
+          install: nghttp2\r
+          configure: --enable-debug --enable-werror --enable-maintainer-mode --disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap --disable-ldap --disable-pop3 --disable-rtmp --disable-rtsp --disable-scp --disable-sftp --disable-smb --disable-smtp --disable-telnet --disable-tftp --disable-unix-sockets --disable-shared --without-brotli --without-gssapi --without-libidn2 --without-libmetalink --without-libpsl --without-librtmp --without-libssh2 --without-nghttp2 --without-ntlm-auth --without-ssl --without-zlib\r
+        - name: SecureTransport metalink\r
+          install: nghttp2 openssl libmetalink\r
+          configure: --enable-debug --without-ssl --with-darwinssl --with-libmetalink\r
+        - name: OpenSSL metalink\r
+          install: nghttp2 openssl libmetalink\r
+          configure: --enable-debug --with-ssl=/usr/local/opt/openssl --with-libmetalink\r
+        - name: LibreSSL metalink\r
+          install: nghttp2 libressl libmetalink\r
+          configure: --enable-debug --with-ssl=/usr/local/opt/libressl --with-libmetalink\r
+        - name: torture\r
+          install: nghttp2 openssl\r
+          configure: --enable-debug --disable-shared --disable-threaded-resolver --enable-alt-svc\r
+          tflags: -n -t --shallow=25 !FTP\r
+    steps:\r
+    - uses: actions/checkout@v2\r
+\r
+    - run: brew update && brew install libtool autoconf automake pkg-config ${{ matrix.build.install }}\r
+      name: 'brew install'\r
+\r
+    - run: ./buildconf && ./configure ${{ matrix.build.configure }}\r
+      name: 'configure'\r
+\r
+    - run: make\r
+      name: 'make'\r
+\r
+    - run: make test-nonflaky\r
+      name: 'test'\r
+      env:\r
+        TFLAGS: "${{ matrix.build.tflags }} ~1452"\r
+\r
+  cmake:\r
+    name: macos cmake ${{ matrix.compiler.CC }} ${{ matrix.build.name }}\r
+    runs-on: 'macos-latest'\r
+    env: ${{ matrix.compiler }}\r
+    strategy:\r
+      fail-fast: false\r
+      matrix:\r
+        compiler:\r
+        - CC: clang\r
+          CXX: clang++\r
+        - CC: gcc-8\r
+          CXX: g++-8\r
+        - CC: gcc-9\r
+          CXX: g++-9\r
+        build:\r
+        - name: OpenSSL\r
+          install: nghttp2 openssl\r
+          generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON\r
+        - name: LibreSSL\r
+          install: nghttp2 libressl\r
+          generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON\r
+    steps:\r
+    - uses: actions/checkout@v2\r
+\r
+    - run: brew update && brew install libtool autoconf automake pkg-config ${{ matrix.build.install }}\r
+      name: 'brew install'\r
+\r
+    - run: cmake -H. -Bbuild ${{ matrix.build.generate }}\r
+      name: 'cmake generate'\r
+\r
+    - run: cmake --build build\r
+      name: 'cmake build'\r
index 580bf6223a3db06cce453373ac7f86c33090dcd9..88cb835719c6b9bc54a12d3238d45530641f807d 100644 (file)
@@ -267,28 +267,6 @@ matrix:
           env:
               - T=iconv
               - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
-        - os: osx
-          compiler: gcc
-          env: T=debug C="--disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap --disable-ldap --disable-pop3 --disable-rtmp --disable-rtsp --disable-scp --disable-sftp --disable-smb --disable-smtp --disable-telnet --disable-tftp --disable-unix-sockets --disable-shared --enable-debug --enable-maintainer-mode --without-brotli --without-gssapi --without-libidn2 --without-libmetalink --without-libpsl --without-librtmp --without-libssh2 --without-nghttp2 --without-ntlm-auth --without-ssl --without-zlib"
-        - os: osx
-          compiler: gcc
-          env: T=debug C=--enable-ares
-        - os: osx
-          compiler: gcc
-          env: T=debug C="--with-ssl=/usr/local/opt/openssl --with-libmetalink"
-        - os: osx
-          compiler: gcc
-          env: T=debug C="--with-ssl=/usr/local/opt/libressl --with-libmetalink"
-        - os: osx
-          compiler: clang
-          osx_image: xcode10
-          env: T=debug C="--without-ssl --with-darwinssl --with-libmetalink"
-        - os: osx
-          compiler: clang
-          env: T=normal
-        - os: osx
-          compiler: clang
-          env: T=cmake
         - os: linux
           compiler: gcc
           dist: bionic
@@ -441,9 +419,6 @@ before_install:
 
 install:
   - if [ "$T" = "coverage" ]; then pip2 install --user cpp-coveralls; fi
-  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update > /dev/null; fi
-  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew reinstall libtool > /dev/null; fi
-  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install rtmpdump libssh2 c-ares libmetalink libressl nghttp2 libmetalink; fi
 
 # before_script and script:
 # Travis isn't reliable catching errors in inline script commands (#3730).