try different way of setting sdkroot #24
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: C/xcodebuild CI | |
on: | |
push: | |
branches: [ main ] | |
tags: [ '*' ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: Build on ${{ matrix.os }} | |
timeout-minutes: 5 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-14 | |
- macos-13 | |
- macos-12 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: getargv/getargv | |
path: getargv | |
token: ${{ secrets.GH_PAT }} | |
- name: Build libgetargv | |
run: make dylib | |
working-directory: getargv | |
- name: Install libgetargv | |
run: sudo make install_dylib | |
working-directory: getargv | |
- uses: actions/checkout@v4 | |
with: | |
path: adv_cmds | |
- name: make | |
run: | | |
sudo mkdir -p /usr/local/include/System/sys/ | |
sudo curl -o "/usr/local/include/System/sys/persona.h" https://raw.githubusercontent.com/apple-oss-distributions/xnu/main/bsd/sys/persona.h | |
sudo curl -o "/usr/local/include/System/sys/proc.h" https://raw.githubusercontent.com/apple-oss-distributions/xnu/main/bsd/sys/proc.h | |
xcodebuild "SDKROOT=macosx" "VALID_ARCHS=$(uname -m)" "CURRENT_ARCH=$(uname -m)" ONLY_ACTIVE_ARCH=YES OTHER_LDFLAGS="-L/usr/local/lib -lgetargv" OTHER_CFLAGS="-DPS_ENTITLED -DPRIVATE -I/usr/local/include" -scheme ps | |
working-directory: adv_cmds | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }} | |
path: ~/Library/Developer/Xcode/DerivedData/adv_cmds-*/Build/Products/Release/ps* |