only compile gettext & libiconv on Android & macOS #219
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: macos | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: macos-11 | |
steps: | |
- name: XCode version | |
run: xcode-select -p | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
with: | |
clean: false | |
fetch-depth: 0 | |
filter: tree:0 | |
show-progress: false | |
- uses: actions/setup-python@v5 | |
with: | |
# Note: Python 3.12 removal of `distutils` breaks GLib's build. | |
python-version: '3.11' | |
- name: Install ccache | |
run: | | |
wget --progress=dot:mega https://github.com/ccache/ccache/releases/download/v4.9.1/ccache-4.9.1-darwin.tar.gz | |
tar xf ccache-4.9.1-darwin.tar.gz | |
printf '%s\n' "$PWD/ccache-4.9.1-darwin" >>"${GITHUB_PATH}" | |
- name: Homebrew install dependencies | |
uses: ./.github/actions/brew_cache | |
with: | |
# Compared to the README, removes sh5sum to prevent some conflict with coreutils, and gnu-getopt because we're not using kodev. | |
packages: > | |
autoconf | |
automake | |
binutils | |
bison | |
cmake | |
coreutils | |
gettext | |
gnu-getopt | |
grep | |
libtool | |
[email protected] | |
luarocks | |
makedepend | |
nasm | |
pkg-config | |
ragel | |
wget | |
- name: Update PATH | |
run: | | |
printf '%s\n' \ | |
"$(brew --prefix)/opt/bison/bin" \ | |
"$(brew --prefix)/opt/gettext/bin" \ | |
"$(brew --prefix)/opt/gnu-getopt/bin" \ | |
"$(brew --prefix)/opt/grep/libexec/gnubin" \ | |
>>"${GITHUB_PATH}" | |
- name: Build cache restore | |
id: build-cache-restore | |
uses: actions/cache/restore@v4 | |
with: | |
path: /Users/runner/Library/Caches/ccache | |
key: ${{ runner.os }}-build-cache-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-build-cache-${{ github.sha }}- | |
${{ runner.os }}-build-cache- | |
- name: Build cache post-restore | |
run: | | |
set -x | |
which ccache | |
ccache --version | |
ccache --zero-stats | |
ccache --max-size=256M | |
ccache --show-config | |
- name: Building in progress… | |
id: build | |
run: | | |
export MACOSX_DEPLOYMENT_TARGET=11; | |
make fetchthirdparty && make | |
- name: Build cache pre-save | |
if: always() | |
run: | | |
set -x | |
ccache --cleanup >/dev/null | |
ccache --show-stats --verbose | |
- name: Build cache save | |
uses: actions/cache/save@v4 | |
if: always() && steps.build-cache-restore.outputs.cache-hit != 'true' | |
with: | |
path: /Users/runner/Library/Caches/ccache | |
key: ${{ steps.build-cache-restore.outputs.cache-primary-key }}${{ steps.build.outcome != 'success' && format('-{0}', github.run_attempt) || '' }} |