mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-30 07:25:50 +00:00
Same ordering bug as Conan profile (Session 8) - ccache config was being created in workflow BEFORE cache restore, causing cached ccache.conf to overwrite fresh configuration. Changes: - Build action: Add ccache config inputs (max_size, hash_dir, compiler_check) - Build action: Configure ccache AFTER cache restore (overwrites cached config) - Build action: Add "Show ccache config before build" step (debugging aid) - Build action: Remove debug steps (past debugging phase) - Build action: Remove ninja -v flag (past debugging phase) - Nix workflow: Remove "Configure ccache" step (now handled in build action) - macOS workflow: Remove "Configure ccache" step (now handled in build action) - macOS workflow: Add missing stdlib and AWS credentials to build step - Delete unused xahau-configure-ccache action (logic moved to build action) Flow now matches Conan pattern: 1. Restore cache (includes potentially stale config) 2. Configure ccache (overwrites with fresh config: 2G max, hash_dir=true, compiler_check=content) 3. Show config (verification) 4. Build This ensures fresh ccache configuration for each job, preventing issues from cached config files with different settings.
132 lines
4.3 KiB
Plaintext
132 lines
4.3 KiB
Plaintext
name: MacOS - GA Runner
|
|
|
|
on:
|
|
push:
|
|
branches: ["dev", "candidate", "release"]
|
|
pull_request:
|
|
branches: ["dev", "candidate", "release"]
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
generator:
|
|
- Ninja
|
|
configuration:
|
|
- Debug
|
|
runs-on: macos-15
|
|
env:
|
|
build_dir: .build
|
|
# Bump this number to invalidate all caches globally.
|
|
CACHE_VERSION: 1
|
|
MAIN_BRANCH_NAME: dev
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Conan
|
|
run: |
|
|
brew install conan
|
|
# Verify Conan 2 is installed
|
|
conan --version
|
|
|
|
- name: Install Coreutils
|
|
run: |
|
|
brew install coreutils
|
|
echo "Num proc: $(nproc)"
|
|
|
|
- name: Install Ninja
|
|
if: matrix.generator == 'Ninja'
|
|
run: brew install ninja
|
|
|
|
- name: Install Python
|
|
run: |
|
|
if which python3 > /dev/null 2>&1; then
|
|
echo "Python 3 executable exists"
|
|
python3 --version
|
|
else
|
|
brew install python@3.12
|
|
fi
|
|
# Create 'python' symlink if it doesn't exist (for tools expecting 'python')
|
|
if ! which python > /dev/null 2>&1; then
|
|
sudo ln -sf $(which python3) /usr/local/bin/python
|
|
fi
|
|
|
|
- name: Install CMake
|
|
run: |
|
|
# Install CMake 3.x to match local dev environments
|
|
# With Conan 2 and the policy args passed to CMake, newer versions
|
|
# can have issues with dependencies that require cmake_minimum_required < 3.5
|
|
brew uninstall cmake --ignore-dependencies 2>/dev/null || true
|
|
|
|
# Download and install CMake 3.31.7 directly
|
|
curl -L https://github.com/Kitware/CMake/releases/download/v3.31.7/cmake-3.31.7-macos-universal.tar.gz -o cmake.tar.gz
|
|
tar -xzf cmake.tar.gz
|
|
|
|
# Move the entire CMake.app to /Applications
|
|
sudo mv cmake-3.31.7-macos-universal/CMake.app /Applications/
|
|
|
|
echo "/Applications/CMake.app/Contents/bin" >> $GITHUB_PATH
|
|
/Applications/CMake.app/Contents/bin/cmake --version
|
|
|
|
- name: Install ccache
|
|
run: brew install ccache
|
|
|
|
- name: Check environment
|
|
run: |
|
|
echo "PATH:"
|
|
echo "${PATH}" | tr ':' '\n'
|
|
which python && python --version || echo "Python not found"
|
|
which conan && conan --version || echo "Conan not found"
|
|
which cmake && cmake --version || echo "CMake not found"
|
|
clang --version
|
|
ccache --version
|
|
echo "---- Full Environment ----"
|
|
env
|
|
|
|
- name: Detect compiler version
|
|
id: detect-compiler
|
|
run: |
|
|
COMPILER_VERSION=$(clang --version | grep -oE 'version [0-9]+' | grep -oE '[0-9]+')
|
|
echo "compiler_version=${COMPILER_VERSION}" >> $GITHUB_OUTPUT
|
|
echo "Detected Apple Clang version: ${COMPILER_VERSION}"
|
|
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/xahau-ga-dependencies
|
|
with:
|
|
configuration: ${{ matrix.configuration }}
|
|
build_dir: ${{ env.build_dir }}
|
|
compiler-id: clang
|
|
cache_version: ${{ env.CACHE_VERSION }}
|
|
main_branch: ${{ env.MAIN_BRANCH_NAME }}
|
|
os: Macos
|
|
arch: armv8
|
|
compiler: apple-clang
|
|
compiler_version: ${{ steps.detect-compiler.outputs.compiler_version }}
|
|
stdlib: libcxx
|
|
aws-access-key-id: ${{ secrets.XAHAUD_GITHUB_ACTIONS_CACHE_NIQ_AWS_KEY_ID }}
|
|
aws-secret-access-key: ${{ secrets.XAHAUD_GITHUB_ACTIONS_CACHE_NIQ_AWS_ACCESS_KEY }}
|
|
|
|
- name: Build
|
|
uses: ./.github/actions/xahau-ga-build
|
|
with:
|
|
generator: ${{ matrix.generator }}
|
|
configuration: ${{ matrix.configuration }}
|
|
build_dir: ${{ env.build_dir }}
|
|
compiler-id: clang
|
|
cache_version: ${{ env.CACHE_VERSION }}
|
|
main_branch: ${{ env.MAIN_BRANCH_NAME }}
|
|
stdlib: libcxx
|
|
aws-access-key-id: ${{ secrets.XAHAUD_GITHUB_ACTIONS_CACHE_NIQ_AWS_KEY_ID }}
|
|
aws-secret-access-key: ${{ secrets.XAHAUD_GITHUB_ACTIONS_CACHE_NIQ_AWS_ACCESS_KEY }}
|
|
|
|
- name: Test
|
|
run: |
|
|
${{ env.build_dir }}/rippled --unittest --unittest-jobs $(nproc)
|