feat: add 12.5 support credit: @fruitybagel #157
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
name: XNU CodeQL | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- "*.md" | |
- Makefile | |
- .cirrus.yml | |
pull_request: | |
branches: [ main ] | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
macos-version: [ '14.4' ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Deps | |
run: | | |
# brew update | |
brew install bash blacktop/tap/ipsw | |
# sudo ipsw dl kdk --host --install | |
sudo xcode-select -s /Applications/Xcode_15.3.app | |
- name: kmutil help # This is to check for what flags are available | |
run: | | |
sysctl -n kern.bootobjectspath || true | |
sw_vers | |
kmutil inspect | |
# - name: Cache JSONDB | |
# id: cache-jsondb | |
# uses: actions/cache@v4 | |
# with: | |
# path: .cache/${{ matrix.macos-version }}/compile_commands.json | |
# key: ${{ matrix.macos-version }}-jsondb | |
# - name: Build XNU JSON compilation database | |
# if: steps.cache-jsondb.outputs.cache-hit != 'true' | |
# run: | | |
# MACOS_VERSION='${{ matrix.macos-version }}' MACHINE_CONFIG=VMAPPLE JSONDB=1 bash -x build.sh | |
- name: Build XNU | |
run: | | |
MACOS_VERSION='${{ matrix.macos-version }}' MACHINE_CONFIG=VMAPPLE KC_FILTER='com.apple.driver.SEPHibernation|com.apple.iokit.IOACPIFamily' bash -x build.sh | |
# ipsw macho info fakeroot/oss-xnu.macOS.${{ matrix.macos-version }}.kc.vmapple | |
ls -lah fakeroot/System/Library/Kernels/ | |
cp fakeroot/System/Library/Kernels/kernel.release.vmapple . | |
echo "$(shasum -a 256 kernel.release.vmapple)" | |
shasum -a 256 kernel.release.vmapple > kernel.release.vmapple.sha256 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: xnu-build-${{ matrix.macos-version }} | |
path: | | |
fakeroot/System/Library/Kernels/ | |
# fakeroot/oss-xnu.macOS.${{ matrix.macos-version }}.kc.vmapple | |
- name: Build XNU CodeQL Database | |
run: | | |
MACOS_VERSION='${{ matrix.macos-version }}' MACHINE_CONFIG=VMAPPLE bash -x codeql.sh | |
echo "$(shasum -a 256 xnu-codeql.zip)" | |
shasum -a 256 xnu-codeql.zip > xnu-codeql.zip.sha256 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: xnu-codeql-${{ matrix.macos-version }} | |
path: xnu-codeql.zip | |
- name: Release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
ls -lah | |
gh release upload v${{ matrix.macos-version }} --clobber kernel.release.vmapple | |
gh release upload v${{ matrix.macos-version }} --clobber kernel.release.vmapple.sha256 | |
gh release upload v${{ matrix.macos-version }} --clobber xnu-codeql.zip | |
gh release upload v${{ matrix.macos-version }} --clobber xnu-codeql.zip.sha256 |