Engine docs update #1814
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-CI | |
on: [push, pull_request] | |
jobs: | |
# https://docs.github.com/en/actions/reference/software-installed-on-github-hosted-runners | |
# we install stuff not already there | |
macos-build: | |
runs-on: macOS-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
# caching dependencies and ccache | |
# https://docs.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows | |
- name: Get timestamp | |
id: timestamp | |
shell: cmake -P {0} | |
run: | | |
string(TIMESTAMP current_date "%Y-%m-%d-%H:%M:%S" UTC) | |
message("::set-output name=timestamp::${current_date}") | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
id: cache-deps | |
with: | |
path: | | |
~/Library/Caches/pip | |
~/Library/Caches/Homebrew | |
key: '${{ runner.os }}-deps-${{ steps.timestamp.outputs.timestamp }}' | |
restore-keys: | | |
${{ runner.os }}-deps- | |
- name: Cache ccache dir | |
uses: actions/cache@v2 | |
id: cache-ccache | |
with: | |
path: ~/Library/Caches/ccache | |
key: '${{ runner.os }}-ccache-${{ steps.timestamp.outputs.timestamp }}' | |
restore-keys: | | |
${{ runner.os }}-ccache- | |
- name: Brew update-reset | |
run: brew update-reset | |
- name: Brew update | |
run: brew update | |
- name: Install clang / LLVM 15.0.0 | |
run: | | |
set -x | |
brew install wget | |
mkdir -p /tmp/clang | |
cd /tmp/clang | |
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.0/clang+llvm-15.0.0-x86_64-apple-darwin.tar.xz -O clang-15.0.0.tar.xz | |
ls | |
tar -xvf clang-15.0.0.tar.xz -C ~ | |
cd ~ | |
mv clang+llvm-15.0.0-x86_64-apple-darwin clang-15.0.0 | |
~/clang-15.0.0/bin/clang++ --version | |
- name: Brew install DeJaVu fonts | |
run: brew tap homebrew/cask-fonts && brew install font-dejavu | |
- name: Remove python's 2to3 link so that 'brew link' does not fail | |
run: rm '/usr/local/bin/2to3' | |
- name: Install environment helpers with homebrew | |
run: brew install ccache | |
- name: Install dependencies with homebrew | |
run: brew install libepoxy freetype fontconfig harfbuzz sdl2 sdl2_image opus opusfile qt6 libogg libpng eigen | |
- name: Install nyan dependencies with homebrew | |
run: brew install flex make | |
- name: Install python3 packages | |
# cython, numpy and pygments are in homebrew, | |
# but "cython is keg-only, which means it was not symlinked into /usr/local" | |
# numpy pulls gcc as dep? and pygments doesn't work. | |
run: pip3 install --upgrade cython numpy jinja2 lz4 pillow pygments toml | |
- name: Configure | |
run: | | |
CLANG_PATH="$HOME/clang-15.0.0/bin/clang++" | |
./configure --compiler="$CLANG_PATH" --mode=debug --ccache --download-nyan | |
- name: Build | |
run: make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 | |
- name: Test | |
run: make test |