-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.9' of github.com:VoodooI2C/VoodooI2C into 2.9
- Loading branch information
Showing
12 changed files
with
296 additions
and
108 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
PROJECT_TYPE: KEXT | ||
|
||
jobs: | ||
build: | ||
name: Kext Build | ||
runs-on: macos-latest | ||
env: | ||
JOB_TYPE: BUILD | ||
steps: | ||
- name: Checkout VoodooI2C | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
fetch-depth: 500 | ||
- name: Checkout MacKernelSDK | ||
uses: actions/checkout@v4 | ||
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: VoodooInput Bootstrap | ||
run: | | ||
src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/VoodooInput/master/VoodooInput/Scripts/bootstrap.sh) && eval "$src" && mv VoodooInput Dependencies | ||
- name: Fetch tags | ||
run: git fetch --tags --recurse-submodules=no | ||
|
||
- name: Get Commit SHA | ||
id: vars | ||
run: | | ||
echo "sha_short=$(git rev-parse --short=8 ${{ github.sha }})" >> $GITHUB_OUTPUT | ||
- name: Build Debug VoodooI2C | ||
run: xcodebuild -workspace VoodooI2C.xcworkspace -scheme VoodooI2C -derivedDataPath build -jobs 1 -configuration Debug | ||
- name: Build Release VoodooI2C | ||
run: xcodebuild -workspace VoodooI2C.xcworkspace -scheme VoodooI2C -derivedDataPath build -jobs 1 -configuration Release | ||
|
||
- name: Generate Release Description | ||
if: github.event_name == 'release' | ||
run: | | ||
LAST_TAG=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`) | ||
LAST_TEN_COMMITS=$(git log --oneline --pretty=format:"%h - %s (%an)" ${LAST_TAG}..@ -n 10) | ||
NEW_LINES=$'\n\n\n' | ||
NUM_COMMITS="$(git rev-list ${LAST_TAG}..@ --count)" | ||
echo "Since the last release there have been ${NUM_COMMITS} commit(s). The descriptions for the first (at most) 10 of these are as follows${NEW_LINES}${LAST_TEN_COMMITS}" >> ./changelog.md | ||
- uses: softprops/action-gh-release@v2 | ||
if: github.event_name == 'release' | ||
with: | ||
files: build/Build/Products/*/*.zip | ||
body_path: ./changelog.md | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: VoodooI2C-${{ steps.vars.outputs.sha_short }} | ||
path: build/Build/Products/*/*.zip | ||
|
||
docs: | ||
name: Docs | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout VoodooI2C | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
- name: Checkout MacKernelSDK | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: acidanthera/MacKernelSDK | ||
path: MacKernelSDK | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
cache: 'pip' | ||
- name: Install python dependencies | ||
run: pip3 install -r requirements.txt | ||
|
||
- name: VoodooInput Bootstrap | ||
run: | | ||
src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/VoodooInput/master/VoodooInput/Scripts/bootstrap.sh) && eval "$src" && mv VoodooInput Dependencies | ||
- name: Build Documentation | ||
run: ./scripts/build_doc.sh | ||
|
||
- name: Package Documentation | ||
run: zip -r Docs.zip ./docs/* | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: VoodooI2C-Docs | ||
path: Docs.zip | ||
|
||
- name: Upload Docs to Github Pages | ||
if: ${{ (github.event_name == 'release') && (github.event.repository.full_name == 'VoodooI2C/VoodooI2C') }} | ||
working-directory: ./docs | ||
env: | ||
DOCUMENTATION_TOKEN: ${{ secrets.DOCUMENTATION_TOKEN }} | ||
USERNAME: github-actions[bot] | ||
run: | | ||
git init . | ||
git config user.name "$USERNAME" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git add -A | ||
git commit -m "${{ github.ref_name}} Documentation" | ||
git push -f https://$USERNAME:$DOCUMENTATION_TOKEN@github.com/VoodooI2C/VoodooI2C.github.io.git master | ||
lint: | ||
name: Lint | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout VoodooI2C | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
- name: Checkout MacKernelSDK | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: acidanthera/MacKernelSDK | ||
path: MacKernelSDK | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
cache: 'pip' | ||
- name: Install python dependencies | ||
run: pip3 install -r requirements.txt | ||
- name: Run Lint | ||
run: ./scripts/run_lint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Xcode - Build and Analyze | ||
|
||
on: | ||
push: | ||
branches: [ "*" ] | ||
pull_request: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
build: | ||
name: Build and analyse default scheme using xcodebuild command | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: download mackernelsdk | ||
run: git clone https://github.com/acidanthera/MacKernelSDK | ||
|
||
- run: src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/VoodooInput/master/VoodooInput/Scripts/bootstrap.sh) && eval "$src" && mv VoodooInput Dependencies | ||
- run: pip3 install --break-system-packages cpplint | ||
- run: pip3 install --break-system-packages git+https://github.com/voodooi2c/cldoc.git | ||
- run: git submodule init && git submodule update | ||
|
||
- name: xcodebuild | ||
run: xcodebuild -workspace "VoodooI2C.xcworkspace" -scheme "VoodooI2C" -derivedDataPath build clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | ||
|
||
- name: Upload to Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Artifacts | ||
path: build/Build/Products/Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.