From 04268b0e2dcc2b3a2ac785e8d7ee60db32d96a46 Mon Sep 17 00:00:00 2001 From: zhen-zen <66577170+zhen-zen@users.noreply.github.com> Date: Wed, 2 Dec 2020 14:38:28 -0800 Subject: [PATCH] Switch to GitHub Actions --- .github/workflows/main.yml | 95 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 65 -------------------------- README.md | 2 +- 3 files changed, 96 insertions(+), 66 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..3598b23e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,95 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + release: + types: [published] + +env: + PROJECT_TYPE: KEXT + +jobs: + build: + name: Build + runs-on: macos-latest + env: + JOB_TYPE: BUILD + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: acidanthera/MacKernelSDK + path: MacKernelSDK + - name: CI Bootstrap + run: | + src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1 + - name: Lilu Bootstrap + run: | + src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1 + + - run: xcodebuild -jobs 1 -configuration Debug + - run: xcodebuild -jobs 1 -configuration Release + + - name: Upload to Artifacts + uses: actions/upload-artifact@v2 + with: + name: Artifacts + path: build/*/*.zip + - name: Upload to Release + if: github.event_name == 'release' + uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: build/*/*.zip + tag: ${{ github.ref }} + file_glob: true + + analyze-clang: + name: Analyze Clang + runs-on: macos-latest + env: + JOB_TYPE: ANALYZE + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: acidanthera/MacKernelSDK + path: MacKernelSDK + - name: CI Bootstrap + run: | + src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1 + - name: Lilu Bootstrap + run: | + src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1 + + - run: xcodebuild analyze -quiet -scheme WhateverGreen -configuration Debug CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ] + - run: xcodebuild analyze -quiet -scheme WhateverGreen -configuration Release CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ] + + analyze-coverity: + name: Analyze Coverity + runs-on: macos-latest + env: + JOB_TYPE: COVERITY + if: github.repository_owner == 'acidanthera' && github.event_name != 'pull_request' + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: acidanthera/MacKernelSDK + path: MacKernelSDK + - name: CI Bootstrap + run: | + src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1 + - name: Lilu Bootstrap + run: | + src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1 + + - name: Run Coverity + run: | + src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/coverity/covstrap.sh) && eval "$src" || exit 1 + env: + COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + COVERITY_SCAN_EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} + COVERITY_BUILD_COMMAND: xcodebuild -configuration Release diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c24f3950..00000000 --- a/.travis.yml +++ /dev/null @@ -1,65 +0,0 @@ -language: cpp - -env: - global: - - secure: "lm3K4g1EhB+vUzg3sj+XO6rENj7H3n8IxwDnAVi2Xd2H/J9tfPxbupdZr4o8duaXtOKOVl623KF+EhC8VRDUmWNXw4yQO1ty91kog7tOd2LRytExv6l8wj2PD6KHgMdgWNTyzYj8OynCv39fepKitSw5euRJk6eiVn+a72FCyErddZUtDyrnH+nFOSmKPULoX+qNYOhuAuIiGrksr0VbL4aDiV0AQeRr6sS0fyzqdDM+KhE8bcCMtBAWh+4uF8MVgxOTXuaZs5x8ebVJfxnOP8qR6QfHDqP0BSUOYHObqwUBUQOReD+m6RcLa+Y/O0tw8NhhiUg/3IP39ospSkIOwbPU9nTIy2w7sgtyGv8+Tc19XJ77Nn00IAPcN+Tq3Ltk++d7FEeyR4unSY9m8bOaxtOSI9cC1FT0SqkmfoP0q9ED34wq+0NAOl1jwddX+3PNC0hzeXuBOaxdC2H1JWdPmp87iRvAHAD0zO3Jkvw9ag53Pa7wlaOFb2RsAM16iVB1XPJCC0bXs6cW64NXWjsjP/8sbxy05K7vzz24c48kPrZp65MJV4AnyT/F09ttXXJnylCyTiZKeTxs9wEVWokXFZDOh6p6b4H/Vqktn6bfhDNJCnJQRiS1we5ni3lqf3Ih9Nbqa1j+51KTq80PwIzwbO6B7uCXIVxiKxw8dw/vg4M=" - -matrix: - include: - - os: osx - name: "Build" - osx_image: xcode11.6 - compiler: clang - - script: - - git clone https://github.com/acidanthera/MacKernelSDK - - src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1 - - xcodebuild -jobs 1 -configuration Debug - - xcodebuild -jobs 1 -configuration Release - - deploy: - provider: releases - skip_cleanup: true - file: "build/*/*.zip" - file_glob: true - api_key: - secure: nATQn/Hh/He/VJHT/F2elSrNhFxwmNhgbubLfXvi4JxojgTj+RZ8CLF2R4fNAz/GgqnEzUGmiLFqjz+ytQ6u6qAsM2YsG6DtKoVeqJoVBUlSakZ1PUI/5Ib9VZQ3vNMEE2DpXlaFKZINLBDbf7VyaWiC5bm+Lts2FIFc0BiD+EvdWHhW6zDZMbOqUxUTaGQvGEX6lqpuoOq0/f8L/o4yn+Q36cSyWyusRzZqZX6n8GtKVPLGy73DF+ywdAGd7kDJhiAfk9NgeGXqwOhyemqSqm45Dc6krI/LwIkPTzUiSZcmiL7tWLkuxKMYi1k6OBYtKFZ24yyXOC1wlODYtQ5BomxJCO2GF6cLvZhfmaupHRHkN5GSN0v76MLxSu4SvxosRVVa4rUDBIWct88e0LL3WQlclRRLEPjf6qHhEChkp5DS163uyAxLh4ue3tv7c5ebBRaG/bIF1GtjOG0dPzM0V9vLIIDkJ7tE7w+8N+DcRRXsvZyxKG3siMxTaltLhuTrwVw9/fjCer72fWjw8AgvOPbzJRUszfij7C3L7P0eJa4NrHTj1C6681smKWQXHPOhAODKGwRCvlnFjjo4srNnzq9QxnYhBiniLleBlu9mGKHA3b2Y0fHo3jdUPvlTF9fcf53+BE82RKEp9mBeQ6btSwNVAup5P7xh1fGw34laJPQ= - on: - tags: true - - - os: osx - name: "Analyze Clang" - osx_image: xcode11 - compiler: clang - - script: - - git clone https://github.com/acidanthera/MacKernelSDK - - src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1 - - xcodebuild analyze -quiet -scheme WhateverGreen -configuration Debug CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ] - - xcodebuild analyze -quiet -scheme WhateverGreen -configuration Release CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ] - - - os: osx - name: "Analyze Coverity" - osx_image: xcode10.2 - compiler: clang - - before_install: - - git clone https://github.com/acidanthera/MacKernelSDK - - curl -Ls https://entrust.com/root-certificates/entrust_l1k.cer -o ~/entrust_l1k.crt || exit 1 - - curl -LS https://curl.haxx.se/ca/cacert.pem -o ~/cacert.pem || exit 1 - - cat ~/entrust_l1k.crt >> ~/cacert.pem || exit 1 - - echo "cacert=\"$HOME/cacert.pem\"" > ~/.curlrc || exit 1 - - echo "ca_certificate=$HOME/cacert.pem" > ~/.wgetrc || exit 1 - - script: - - echo "This script runs coverity..." - - addons: - coverity_scan: - project: - name: "acidanthera/WhateverGreen" - description: "WhateverGreen" - notification_email: $NOTIFICATION_EMAIL - build_command_prepend: "src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval \"$src\" || exit 1 ; src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/covstrap.sh) && eval \"$src\" || exit 1" - build_command: "xcodebuild -configuration Release" - branch_pattern: master diff --git a/README.md b/README.md index dd0319fa..7d28487b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ WhateverGreen ============= -[![Build Status](https://travis-ci.com/acidanthera/WhateverGreen.svg?branch=master)](https://travis-ci.com/acidanthera/WhateverGreen) [![Scan Status](https://scan.coverity.com/projects/16177/badge.svg?flat=1)](https://scan.coverity.com/projects/16177) +[![Build Status](https://github.com/acidanthera/WhateverGreen/workflows/CI/badge.svg?branch=master)](https://github.com/acidanthera/WhateverGreen/actions) [![Scan Status](https://scan.coverity.com/projects/16177/badge.svg?flat=1)](https://scan.coverity.com/projects/16177) [Lilu](https://github.com/acidanthera/Lilu) plugin providing patches to select GPUs on macOS. Requires Lilu 1.4.0 or newer.