DEBUG: Xcodebuild configure self #177
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
env: | |
BUILD_DEPS: cmake libconfig++-dev libxxhash-dev libjemalloc-dev libtsl-hopscotch-map-dev pkg-config python3-jinja2 | |
TEST_DEPS: bc bats clang node-d3 graphviz moreutils fakeroot | |
jobs: | |
build-on-macos: | |
runs-on: macos-12 | |
timeout-minutes: 30 | |
steps: | |
- name: check if SIP is enabled on this runner | |
run: | | |
csrutil status | grep "System Integrity Protection status: disabled" | |
- uses: actions/checkout@v3 | |
- uses: hendrikmuhs/ccache-action@v1 | |
with: | |
key: build-on-macos-12 | |
- name: install-deps | |
run: | | |
brew update | |
BREW_BUILD_DEPS="bats-core coreutils docbook-xsl hopscotch-map jemalloc jinja2-cli libconfig xxhash" | |
export HOMEBREW_NO_AUTO_UPDATE=1 | |
# brew often fails due to existing files, hence the --overwrite parameter and the retry | |
brew install --overwrite $BREW_BUILD_DEPS || (for v in 3.11 3.12; do brew link --overwrite python@${v} ; done; brew install --overwrite $BREW_BUILD_DEPS) | |
- name: configure vm | |
run: | | |
# library validation would prevent loading libfirebuild to some binaries | |
sudo defaults write /Library/Preferences/com.apple.security.libraryvalidation.plist DisableLibraryValidation -bool true | |
- name: build-out-of-tree | |
run: | | |
export PATH=$(ls -d /usr/local/Cellar/jinja2-cli/*/libexec/bin):$PATH | |
cmake -DCMAKE_CXX_FLAGS="-I/usr/local/include" -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/lib" -DCMAKE_BUILD_TYPE=Debug -B build-make | |
export XML_CATALOG_FILES=/usr/local/etc/xml/catalog | |
make -C build-make -j2 | |
- name: test | |
run: | | |
make -C build-make -j2 check | |
- name: rebuild-self-with-xcode | |
run: | | |
export PATH=$(ls -d /usr/local/Cellar/jinja2-cli/*/libexec/bin):$PATH | |
export PYTHONPATH=$(ls -d /usr/local/Cellar/jinja2-cli/*/libexec/lib/python*/site-packages | tail -n1) | |
cd build-make/test | |
set -x | |
./run-firebuild cmake -G Xcode -DCMAKE_CXX_FLAGS="-I/usr/local/include" -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/lib" -S ../.. -B ../../build-xcode || true | |
ls -R ../../build-xcode | |
wget -O dtruss https://gitlab.com/pmdj/macos-dtrace-scripts/-/raw/main/dtruss?ref_type=heads | |
sed -i '' 's/.usr.bin.sudo //' dtruss | |
chmod +x dtruss | |
sudo timeout 20 ./run-firebuild ./dtruss -s -f bash -c "(cd ../../build-xcode/CMakeFiles/*/CompilerIdC && xcodebuild) 1>&2" || true | |
cat stderr | |
# TODO(rbalint) build with xcodebuild, wrapped with firebuild | |