Skip to content

fix: enforce max item tier in market operations (#3731) #227

fix: enforce max item tier in market operations (#3731)

fix: enforce max item tier in market operations (#3731) #227

Workflow file for this run

---
name: Build - macOS
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "src/**"
- "tests/**/*.cpp"
merge_group:
push:
paths:
- "src/**"
- "tests/**/*.cpp"
branches:
- main
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
MAKEFLAGS: "-j 4"
jobs:
cancel-runs:
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
job:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
name: macos-${{ matrix.buildtype }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
buildtype: [macos-release, macos-debug]
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Setup Latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Install macOS Dependencies
run: |
brew install autoconf automake libtool ccache pkg-config ninja
- name: Validate Build Environment
run: |
echo "Validating build tools..."
which cmake || (echo "cmake not found" && exit 1)
which autoconf || (echo "autoconf not found" && exit 1)
which automake || (echo "automake not found" && exit 1)
which libtool || (echo "libtool not found" && exit 1)
which ninja || (echo "ninja not found" && exit 1)
echo "Xcode version: $(xcodebuild -version)"
echo "Architecture: $(uname -m)"
- name: CCache
uses: hendrikmuhs/ccache-action@main
with:
max-size: "1G"
key: ccache-macos-${{ matrix.buildtype }}
restore-keys: |
ccache-macos
- name: Setup Build Environment
run: |
# Required for ARM64 builds - must be set before vcpkg
echo "VCPKG_FORCE_SYSTEM_BINARIES=1" >> "$GITHUB_ENV"
# Extract vcpkg commit ID
vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ')
echo "vcpkg commit ID: $vcpkgCommitId"
echo "VCPKG_GIT_COMMIT_ID=$vcpkgCommitId" >> "$GITHUB_ENV"
- name: Get vcpkg commit id from vcpkg.json
uses: lukka/run-vcpkg@main
with:
vcpkgGitURL: "https://github.com/microsoft/vcpkg.git"
vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }}
- name: Get latest CMake and ninja
uses: lukka/get-cmake@main
- name: Run CMake
uses: lukka/run-cmake@main
with:
configurePresetAdditionalArgs: "['-DTOGGLE_BIN_FOLDER=ON']"
configurePreset: ${{ matrix.buildtype }}
buildPreset: ${{ matrix.buildtype }}
- name: Create and Upload Artifact
uses: actions/upload-artifact@main
with:
name: canary-macos-${{ matrix.buildtype }}-${{ github.sha }}
path: |
${{ github.workspace }}/build/${{ matrix.buildtype }}/bin/
- name: Run Unit Tests
run: |
ctest -V -R unit
- name: Run Integration Tests
run: |
ctest -V -R integration