Skip to content

fix(xmake) missing dependencies for core / main #507

fix(xmake) missing dependencies for core / main

fix(xmake) missing dependencies for core / main #507

Workflow file for this run

---
name: macOS
on:
pull_request:
branches: [develop]
paths-ignore:
- .github/workflows/Linux.yml
- .github/workflows/Windows.yml
- .github/workflows/iOS.yml
- .github/workflows/Android.yml
- .github/workflows/AutoMerger.yml
- .gitignore
- LICENSE
- README.md
push:
branches: [main, develop]
paths-ignore:
- .github/workflows/Linux.yml
- .github/workflows/Windows.yml
- .github/workflows/iOS.yml
- .github/workflows/Android.yml
- .github/workflows/AutoMerger.yml
- .gitignore
- LICENSE
- README.md
jobs:
build:
name: ${{ matrix.compiler }} ${{ matrix.arch }} (${{ matrix.kind }}/${{ matrix.mode }})
strategy:
fail-fast: false
matrix:
os: [macOS-15]
compiler: [LLVM-libc++]
arch: [arm64]
kind: [static, shared]
mode: [release, debug]
runs-on: ${{ matrix.os }}${{ (matrix.arch == 'x64') && '-large' || '' }}
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.arch }}-${{ matrix.kind
}}-${{ matrix.mode }}
steps:
- name: Install build tools
uses: tecolicom/actions-use-homebrew-tools@v1
with:
tools: llvm ninja meson mold nasm pkgconf
verbose: true
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set XMake env
run: |
echo "XMAKE_ROOTDIR=${{ github.workspace }}/.xmake-cache" >> $GITHUB_ENV
echo "XMAKE_PKG_INSTALLDIR=${{ github.workspace }}/.xmake-packages" >> $GITHUB_ENV
echo "${{ github.workspace }}/.xmake-cache" >> $GITHUB_PATH
- name: Generate XMake cachekey
id: xmake_cachekey
run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT
shell: bash
- name: Restore cached XMake
id: restore-xmakecache
uses: actions/cache/restore@v4
with:
path: ${{ env.XMAKE_ROOTDIR }}
key: ${{ matrix.os }}-${{ matrix.arch }}-W${{ steps.xmake_cachekey.outputs.key }}
- name: Setup XMake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@dev
actions-cache-folder: .xmake-cache
- name: Cache XMake
if: ${{ !steps.restore-xmakecache.outputs.cache-hit }}
uses: actions/cache/save@v4
with:
path: ${{ env.XMAKE_ROOTDIR }}
key: ${{ steps.restore-xmakecache.outputs.cache-primary-key }}
- name: Update XMake repository
run: xmake repo --update
- name: Generate packages cachekey
id: packages_cachekey
run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT
shell: bash
- name: Restore cached packages
id: restore-packagescache
uses: actions/cache/restore@v4
with:
path: ${{ env.XMAKE_PKG_INSTALLDIR }}
key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.packages_cachekey.outputs.hash }}
- name: Configure & Install dependencies
id: configure
run: |
xmake f -vD \
--yes \
-m ${{ (matrix.mode == 'release' || matrix.mode == 'debug') && matrix.mode || 'releasedbg' }} \
-k ${{ matrix.kind }} \
--examples=y \
--tests=y \
--gpu=y \
--engine=n \
--mold=y \
--on_ci=y \
--toolchain=llvm \
--sdk="$(brew --prefix)/opt/llvm/" \
--runtimes="c++_shared"
- name: Cache packages
if: ${{ !steps.restore-packagescache.outputs.cache-hit }}
uses: actions/cache/save@v4
with:
path: ${{ env.XMAKE_PKG_INSTALLDIR }}
key: ${{ steps.restore-packagescache.outputs.cache-primary-key }}
- name: Build
id: build
run: |
xmake b -v
- name: Run unit tests
id: tests
run: xmake test -v
- name: Installation
id: install
run: xmake install -v --installdir="${{ github.workspace }}/output"
- name: Upload artifacts
id: upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.arch }}-${{ matrix.kind }}-${{ matrix.mode }}
path: ${{ github.workspace }}/output