ci/circle: add pocketbookhf job
#2486
This file contains hidden or 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: macos | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: [push, pull_request] | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| macos: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - image: '15' | |
| platform: 'x86-64' | |
| xcode_version: '16.4' | |
| deployment_target: '10.15' | |
| jobs: 5 | |
| - image: '15' | |
| platform: 'ARM64' | |
| xcode_version: '16.4' | |
| deployment_target: '11.0' | |
| jobs: 4 | |
| name: "macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }}" | |
| runs-on: "macos-${{ matrix.image }}${{ matrix.platform == 'x86-64' && '-intel' || '' }}" | |
| env: | |
| # Bump first number to reset all caches. | |
| CACHE_KEY: "1-macOS-${{ matrix.image }}-${{ matrix.platform }}-XC${{ matrix.xcode_version }}-DT${{ matrix.deployment_target }}" | |
| CLICOLOR_FORCE: '1' | |
| KODEBUG: "" | |
| MACOSX_DEPLOYMENT_TARGET: ${{ matrix.deployment_target }} | |
| MAKEFLAGS: OUTPUT_DIR=build PARALLEL_JOBS=${{ matrix.jobs }} | |
| steps: | |
| # Install dependencies. {{{ | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.14' | |
| - name: Setup build environment | |
| run: | | |
| set -x | |
| # python packages | |
| python3 -m pip install --disable-pip-version-check meson ruamel.yaml | |
| # ninjatracing | |
| wget -O ninjatracing.zip https://github.com/nico/ninjatracing/archive/084212eaf68f25c70579958a2ed67fb4ec2a9ca4.zip | |
| unzip -j ninjatracing.zip '*/ninjatracing' | |
| install -m755 ninjatracing /usr/local/bin/ | |
| rm ninjatracing* | |
| # brew packages | |
| packages=( | |
| autoconf | |
| automake | |
| bash | |
| binutils | |
| coreutils | |
| findutils | |
| libtool | |
| make | |
| nasm | |
| ninja | |
| pkg-config | |
| sdl3 | |
| util-linux | |
| ) | |
| # Don't auto-update. | |
| export HOMEBREW_NO_AUTO_UPDATE=1 | |
| # Don't upgrade already installed formulas. | |
| export HOMEBREW_NO_INSTALL_UPGRADE=1 | |
| # Remove some installed packages to prevent brew | |
| # from attempting (and failing) to upgrade them. | |
| brew uninstall gradle maven | |
| brew install --formula --overwrite --quiet "${packages[@]}" | |
| brew_paths=( | |
| "$(brew --prefix)/opt/findutils/libexec/gnubin" | |
| "$(brew --prefix)/opt/make/libexec/gnubin" | |
| "$(brew --prefix)/opt/util-linux/bin" | |
| ) | |
| printf '%s\n' "${brew_paths[@]}" | tee -a "${GITHUB_PATH}" | |
| # xcode | |
| sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version }}.app | |
| xcodebuild -version | |
| xcode-select -p | |
| # }}} | |
| # Checkout / fetch. {{{ | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| clean: false | |
| fetch-depth: 0 | |
| filter: tree:0 | |
| show-progress: false | |
| - name: Fetch | |
| run: make fetchthirdparty | |
| # }}} | |
| - name: Generate cache key | |
| run: make TARGET= cache-key | |
| - name: Restore build directory | |
| id: build-restore | |
| uses: actions/cache/restore@v5 | |
| with: | |
| # NOTE: | |
| # - we need to use `build/*` to work around https://github.com/actions/toolkit#713 | |
| # - the same `path` must be used when restoring and saving (or the mismatch will | |
| # result in failures to restore) | |
| path: &BUILD_PATHS | | |
| build/* | |
| !build/cmake | |
| !build/staging | |
| !build/thirdparty | |
| key: ${{ env.CACHE_KEY }}-build-${{ hashFiles('cache-key') }} | |
| # Restore / setup build cache. {{{ | |
| - name: Lookup or restore build cache | |
| id: ccache-restore | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: &CCACHE_DIR /Users/runner/Library/Caches/ccache | |
| key: ${{ env.CACHE_KEY }}-ccache-${{ hashFiles('cache-key') }} | |
| restore-keys: ${{ env.CACHE_KEY }}-ccache- | |
| # When not building, do a lookup so the cache | |
| # does not get removed after 7 days with no use. | |
| lookup-only: ${{ steps.build-restore.outputs.cache-hit }} | |
| - name: Install ccache | |
| if: steps.build-restore.outputs.cache-hit != 'true' | |
| run: | | |
| wget --progress=dot:mega https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-darwin.tar.gz | |
| tar xf ccache-4.10.2-darwin.tar.gz | |
| printf '%s\n' "$PWD/ccache-4.10.2-darwin" >>"${GITHUB_PATH}" | |
| - name: Setup build cache | |
| if: steps.build-restore.outputs.cache-hit != 'true' | |
| run: | | |
| set -x | |
| which ccache | |
| ccache --version | |
| ccache --zero-stats | |
| ccache --max-size=256M | |
| ccache --show-config | |
| # }}} | |
| # Build. {{{ | |
| - name: Build | |
| id: build | |
| if: steps.build-restore.outputs.cache-hit != 'true' | |
| run: make | |
| - name: Dump build timings | |
| if: contains('failure success', steps.build.conclusion) && !cancelled() | |
| run: make buildstats | |
| # }}} | |
| # Clean & save build cache. {{{ | |
| - name: Clean build cache | |
| if: contains('failure success', steps.build.conclusion) && !cancelled() | |
| run: | | |
| set -x | |
| ccache --cleanup >/dev/null | |
| ccache --show-stats --verbose | |
| - name: Save build cache | |
| uses: actions/cache/save@v5 | |
| if: steps.build-restore.outputs.cache-hit != 'true' && steps.ccache-restore.outputs.cache-hit != 'true' | |
| with: | |
| path: *CCACHE_DIR | |
| key: ${{ steps.ccache-restore.outputs.cache-primary-key }} | |
| # }}} | |
| # Check FFI cdecls are up-to-date. {{{ | |
| - name: Check FFI cdecls are up-to-date | |
| id: ffi | |
| if: steps.build-restore.outputs.cache-hit != 'true' | |
| run: | | |
| set -x | |
| make ffi | |
| git --no-pager diff --color=always --exit-code ffi | |
| # }}} | |
| # Dump & check binaries. {{{ | |
| - name: Dump binaries runtime path & dependencies | |
| run: make bininfo | |
| - name: Checking binaries for missing dependencies | |
| run: make bincheck | |
| # }}} | |
| - name: Save build directory | |
| uses: actions/cache/save@v5 | |
| if: steps.build-restore.outputs.cache-hit != 'true' | |
| with: | |
| path: *BUILD_PATHS | |
| key: ${{ steps.build-restore.outputs.cache-primary-key }} | |
| - name: Test | |
| run: ./utils/fake_tty.py make --assume-old=all test | |
| # vim: foldmethod=marker foldlevel=0 |