Skip to content

Commit

Permalink
Release Version 2.9 (#532)
Browse files Browse the repository at this point in the history
* Sync VoodooGPIO with AMD support

* Update VoodooGPIO and VoodooI2CHID

* Github Actions CI workflow (#538)

* Create objective-c-xcode.yml

* Update objective-c-xcode.yml

* objective-c-xcode.yml: Update setup tools to fix pyparsing

* objective-c-xcode.yml: try fixing pyparsing directly

* objective-c-xcode.yml: use my fixed cldoc

* objective-c-xcode.yml: manually updating pyparsing was always useless

* Clean up CI/CD (#553)

* Drop CircleCI

* Switch back to VoodooI2C cldoc fork

* Set the pip3 --break-system-packages flag to potentially fix CD/CD

* Run actions on all PRs and branches

* Remove cldoc step

* GitHub Action (#561)

* Create main.yml

* Remove Pip Cache

* Fix Lint in VoodooI2CController.cpp

* Fix VoodooI2CControllerDriver Lint

* Try cursorkind=350

* Only allow one job

* Add separate lint and doc tasks, add archive script

* Fix generate description output, missing dependencies

* Use -r in pip install

* build_docs -> build_doc

* Build VoodooInput for docs

* Release try two

* Test commit

* Test commit 2

* Fix num commits and last_ten_commits

* Set number of max commits

* Fetch tags

* Get tags try 2

* Fix git fetch

* Revert back to using the published trigger

* Save off last tagged commit

* I forgot to save the conflict resolution :(

* Fix VoodooI2CHID submodule commit

* Update to latest master for VoodooI2CHID

* Update cldoc to clang 15

* Update cldoc to VoodooI2C master

* Fix NUM_COMMITS

* Echo release notes

* Make sure to output to

* Account for multiline output

* checkout depth 500

* Multi-line input for release action

* Use softprops release action

* Use file to store changelog

* Upload docs to github pages

* Fix repository name match

* Fix upload always running (oops)

* Add confidence bit for palm rejection (#547)

* Add confidence bit for palm rejection

* Set Confidence bit by default

* Remove logging

* Use constant for palm type

* Update Cldoc repo git link (#562)

* Sync satellites and dependencies

* Update GitHub actions from v3 to v4

* Remove unused extra GitHub pipeline

* Only run push builds when commits are pushed to master

---------

Co-authored-by: Kishor Prins <kprinssu@kishor-tessen.local>
Co-authored-by: newperson1746 <danielcrodriguez2012@gmail.com>
Co-authored-by: Avery Black <avery.c.black@gmail.com>
  • Loading branch information
4 people authored Nov 5, 2024
1 parent f9f703b commit 4f3206b
Show file tree
Hide file tree
Showing 14 changed files with 267 additions and 111 deletions.
78 changes: 0 additions & 78 deletions .circleci/config.yml

This file was deleted.

143 changes: 143 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: CI

on:
push:
branches:
- master
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
5 changes: 5 additions & 0 deletions Multitouch Support/Native/VoodooI2CNativeEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ MultitouchReturn VoodooI2CNativeEngine::handleInterruptReport(VoodooI2CMultitouc
if (inputTransducer->isValid) {
valid_touch_count++;
}

if (!transducer->confidence.value()) {
inputTransducer->fingerType = kMT2FingerTypePalm;
}

inputTransducer->isTransducerActive = transducer->tip_switch.value();
inputTransducer->isPhysicalButtonDown = !transducer->has_secondary_button && transducer->physical_button.value(); // if it has secondary button, then it will be passed as buttons on the "trackpoint" device

Expand Down
3 changes: 3 additions & 0 deletions Multitouch Support/VoodooI2CDigitiserTransducer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ VoodooI2CDigitiserTransducer* VoodooI2CDigitiserTransducer::transducer(Digitiser
transducer->collection = digitizer_collection;
transducer->in_range = false;

// Set Confidence bit for satellites which do not implement contact rejection yet
transducer->confidence.update(1, 0);

exit:
return transducer;
}
1 change: 1 addition & 0 deletions Multitouch Support/VoodooI2CDigitiserTransducer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class EXPORT VoodooI2CDigitiserTransducer : public OSObject {
DigitiserTransducerAziAltiOrentation azi_alti_orientation;
DigitiserTransducerTiltOrientation tilt_orientation;

DigitiserTransducerButtonState confidence;
DigitiserTransducerButtonState tip_switch;
TimeTrackedValue tip_pressure;

Expand Down
35 changes: 8 additions & 27 deletions VoodooI2C/VoodooI2C.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,7 @@
AC2603AD1F2F294000CF238F /* Headers */,
AC2603AE1F2F294000CF238F /* Resources */,
AC0955921F4EE9B00052E343 /* Add GPIO and Services Plugin */,
ACA4A00D21E25F0E00A91B61 /* Linting */,
ACA4A00F21E25F3500A91B61 /* Generate Documentation */,
EE5AF8832CD44DB1001EE729 /* Archive */,
);
buildRules = (
);
Expand Down Expand Up @@ -641,7 +640,7 @@
shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/VoodooI2C.kext/Contents/PlugIns\"\nrm -rf \"${BUILT_PRODUCTS_DIR}/VoodooI2C.kext/Contents/PlugIns/VoodooGPIO.kext\"\nmv \"${BUILT_PRODUCTS_DIR}/VoodooGPIO.kext\" \"${BUILT_PRODUCTS_DIR}/VoodooI2C.kext/Contents/PlugIns\"\n\nrm -rf \"${BUILT_PRODUCTS_DIR}/VoodooI2C.kext/Contents/PlugIns/VoodooI2CServices.kext\"\nmv \"${BUILT_PRODUCTS_DIR}/VoodooI2CServices.kext\" \"${BUILT_PRODUCTS_DIR}/VoodooI2C.kext/Contents/PlugIns\"\n\nrm -rf \"${BUILT_PRODUCTS_DIR}/VoodooI2C.kext/Contents/PlugIns/VoodooInput.kext\"\ncp -r \"${SRCROOT}/../Dependencies/VoodooInput/${CONFIGURATION}\"/VoodooInput.kext \"${BUILT_PRODUCTS_DIR}/VoodooI2C.kext/Contents/PlugIns\"\n\nrm -rf \"${BUILT_PRODUCTS_DIR}/VoodooInput.kext.dSYM\"\ncp -r \"${SRCROOT}/../Dependencies/VoodooInput/${CONFIGURATION}\"/*.dSYM ${BUILT_PRODUCTS_DIR} 2>/dev/null || true\n";
showEnvVarsInLog = 0;
};
ACA4A00D21E25F0E00A91B61 /* Linting */ = {
EE5AF8832CD44DB1001EE729 /* Archive */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -650,32 +649,14 @@
);
inputPaths = (
);
name = Linting;
name = Archive;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cpplint --recursive --filter=-build/include_subdir,-build/header_guard,-whitespace/line_length,-runtime/int ./\n";
};
ACA4A00F21E25F3500A91B61 /* Generate Documentation */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Generate Documentation";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "pwd; find ./VoodooI2C ../Dependencies ../Multitouch\\ Support ../VoodooI2C\\ Satellites -name \"*.hpp\" -print0 | xargs -0 cldoc generate -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -nostdinc -std=gnu++11 -stdlib=libc++ -fmodules -gmodules -fmodules-cache-path=${MODULE_CACHE_DIR} -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=${MODULE_CACHE_DIR}/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -fno-builtin -Wno-trigraphs -fno-exceptions -fno-rtti -msoft-float -O0 -fno-common -mkernel -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wno-inconsistent-missing-override -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -DKERNEL -DKERNEL_PRIVATE -DDRIVER_PRIVATE -DAPPLE -DNeXT -fapple-kext -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.10 -g -Wno-sign-conversion -Winfinite-recursion -Wno-move -I${PROJECT_DIR}/../MacKernelSDK/Headers -I${SDKROOT}/System/Library/Frameworks/Kernel.framework/PrivateHeaders -I${SDKROOT}/System/Library/Frameworks/Kernel.framework/Headers -I${DERIVED_SOURCES_DIR}/x86_64 -I${DERIVED_SOURCES_DIR} -I../Dependencies/VoodooInput/Debug/VoodooInput.kext/Contents/Resources -Wno-inconsistent-missing-override -Wno-unused-variable -- --output ../docs --report --merge \"../Documentation\" --basedir .\n";
shellScript = "cd \"${TARGET_BUILD_DIR}\"\n\n# Find kexts\ndist=()\nfor i in *.kext; do\n dist+=($i)\ndone\n\n# Move debug symbols to dSYM folder\nif [ -d \"$DWARF_DSYM_FILE_NAME\" ]; then\n rm -rf dSYM\n mkdir dSYM\n find . -name \"*.dSYM\" -exec mv \"{}\" dSYM/ \\;\n dist+=(dSYM);\nfi\n\n#zip\narchive=\"VoodooI2C-${CURRENT_PROJECT_VERSION}-$(echo $CONFIGURATION | tr /a-z/ /A-Z/).zip\"\nrm -rf *.zip\nzip -qry -FS \"${archive}\" \"${dist[@]}\"\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -773,7 +754,7 @@
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -832,7 +813,7 @@
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
Expand All @@ -859,7 +840,7 @@
ALWAYS_SEARCH_USER_PATHS = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.8;
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../Dependencies/VoodooInput/Debug/VoodooInput.kext/Contents/Resources";
Expand All @@ -884,7 +865,7 @@
ALWAYS_SEARCH_USER_PATHS = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.8;
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../Dependencies/VoodooInput/Debug/VoodooInput.kext/Contents/Resources";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
#include "VoodooI2CControllerNub.hpp"

// Log only if current thread is interruptible, otherwise we will get a panic.
#define TryLog(args...) do { if (ml_get_interrupts_enabled()) IOLog(args); } while (0)
#define TryLog(args...) \
do { \
if (ml_get_interrupts_enabled()) \
IOLog(args); \
} while (0)

#define super IOService
OSDefineMetaClassAndStructors(VoodooI2CController, IOService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ constexpr uint64_t MICRO = 1000000;
({ \
uint32_t __base = (base); \
uint32_t __rem; \
__rem = ((uint64_t)(n)) % __base; \
(n) = ((uint64_t)(n)) / __base; \
__rem = (static_cast<uint64_t>(n)) % __base; \
(n) = (static_cast<uint64_t>(n)) / __base; \
__rem; \
})

Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cpplint
cldoc @ git+https://github.com/VoodooI2C/cldoc.git
Loading

0 comments on commit 4f3206b

Please sign in to comment.