[build] ci iteration 6 (hey look github actions runners use an incomp… #1
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: "Clang Code Build" | ||
on: | ||
workflow_call: | ||
inputs: | ||
render_api: | ||
required: true | ||
type: string | ||
build_config: | ||
required: true | ||
type: string | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install necessary linux dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libxrandr-dev libxinerama-dev x11-xkb-utils libxcursor-dev libxi-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev clang-13 | ||
# https://github.com/actions/runner-images/issues/8659 | ||
# todo: remove this step once github actions stops being bad | ||
# workaround is to use this magic script to install clang-17. | ||
# it is bound to start failing soon. | ||
- name: Install newer Clang | ||
run: | | ||
wget https://apt.llvm.org/llvm.sh | ||
chmod +x ./llvm.sh | ||
sudo ./llvm.sh 17 | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: 'Install Vulkan SDK' | ||
uses: humbletim/[email protected] | ||
if: ${{inputs.render_api == 'vulkan'}} | ||
- name: 'Configure Topaz ${{inputs.render_api}}_clang_${{inputs.build_config}}' | ||
run: cmake --preset host_${{inputs.render_api}}_${{inputs.build_config}} -DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_C_COMPILER=clang-17 | ||
- name: 'Build Topaz ${{inputs.render_api}}_clang_${{inputs.build_config}}' | ||
run: cmake --build ./build/Linux_${{inputs.render_api}}_${{inputs.build_config}} --target topaz | ||