From 0a15b7b255bd800442ae97e252c4832c4ec1fcd5 Mon Sep 17 00:00:00 2001 From: zhen-zen <66577170+zhen-zen@users.noreply.github.com> Date: Wed, 2 Dec 2020 15:33:02 -0800 Subject: [PATCH] Switch to GitHub Actions --- .github/workflows/main.yml | 95 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 34 -------------- README.md | 2 +- 3 files changed, 96 insertions(+), 35 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 0000000..9bc4979 --- /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 NVMeFix -configuration Debug CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ] + - run: xcodebuild analyze -quiet -scheme NVMeFix -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 8fd10ce..0000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: cpp - -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: M68OrYwLI5Nfqp1SLWv9Mc7Ru60l2RALu6ibF1fVQplBs1ZvzADHbKXtEOboDtoxg/rpBubmlm67B5daEJuTUuskZrymjXnolnRIZE5kNcTim8JM/xJ3cYAQnlQZW3Z5Lxc3qi2tZEsw1WvCK93RETZaCVnariBTJismj03tRd142k4alOfUfq+bsuxEzsCDapmrtXBrw6I0jcYOV6dwfIkRjQGt3up41eIMINmmsk1PKPrFB+rw2dDV4jYXxkLuMHps9mYM6flB3+PPWXlct15xtYMSn0okmQ336hrkKzrx/JFiMHru4KM2cTZ1hG8O0Q81XLSUyJ4vIZtmWNPbXstKW7RKJwm1j4tfFolaSacMlwGiuzR+WoCd++tsEm5fprutWocIZ34qMFQ9sVtiaeCuKPobzBed9Rvvjbk+e1KVaUaQfuMwQsM92Yuy/BRS8l11tgzfQQNEYrqhRuaaNqSmenDoWjj21ADIhMNWk7wz0yTKBlm6nI1hwxVcW5mAuAbNzqkJdePVwjrG6CqyZhjSRjGkxp51e7cXKhygNeVeCn84LIzaouzci668YZ5rjuXDx6ucH35GdqXZ076MWmqG6+qEV9VG41XzOoh95BjvvJKTzfDsmtkKfSw2IN6cOeCdzRkJ3fHfo2Ezib9vgj3ziCNK0A4kU7Gg+JRIF7s= - 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 NVMeFix -configuration Debug CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ] - - xcodebuild analyze -quiet -scheme NVMeFix -configuration Release CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ] diff --git a/README.md b/README.md index 6e2fb40..5d0e47a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ NVMeFix ======= -[![Build Status](https://travis-ci.com/acidanthera/NVMeFix.svg?branch=master)](https://travis-ci.com/acidanthera/NVMeFix) +[![Build Status](https://github.com/acidanthera/NVMeFix/workflows/CI/badge.svg?branch=master)](https://github.com/acidanthera/NVMeFix/actions) [![Scan Status](https://scan.coverity.com/projects/22192/badge.svg?flat=1)](https://scan.coverity.com/projects/22192) NVMeFix is a set of patches for the Apple NVMe storage driver, IONVMeFamily. Its goal is to improve compatibility with non-Apple SSDs. It may be used both on Apple and non-Apple