Fix workflow runners on macos #373
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
# Build on Linux | |
name: Build keyvi documentation | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: 'ubuntu-22.04' | |
name: 'github pages' | |
env: | |
BUILD_TYPE: 'Release' | |
PYTHON_VERSION: '3.9' | |
strategy: | |
fail-fast: false | |
steps: | |
- name: install Linux deps | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libsnappy-dev libzzip-dev zlib1g-dev libboost-all-dev doxygen | |
- name: checkout from git | |
uses: actions/checkout@v4 | |
# re-use the cache from the linux build | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1 | |
with: | |
key: ${{ runner.os }}-${{ env.BUILD_TYPE }} | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
architecture: x64 | |
- name: Install python dependencies | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
python -m pip install -r python/requirements.txt | |
python -m pip install sphinx breathe | |
- name: build python extension | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
cd python | |
python setup.py build --mode ${BUILD_TYPE} | |
python setup.py install --user | |
- name: build with cmake | |
uses: lukka/run-cmake@v3 | |
with: | |
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | |
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | |
cmakeAppendedArgs: '-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache' | |
buildWithCMake: true | |
buildDirectory: '${{ github.workspace }}/build' | |
buildWithCMakeArgs: --target sphinx_doc | |
- name: Disable jekyll | |
run: | | |
touch build/sphinx_doc/.nojekyll | |
- name: Publish docs | |
if: success() && github.event_name == 'push' | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
target_branch: gh-pages | |
build_dir: build/sphinx_doc | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |