update docs job to generate compile_commands.json for clang-assisted … #12
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: CMake | |
on: | |
push: | |
branches: ["*"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: seanmiddleditch/gha-setup-ninja@v4 | |
- name: Install LLVM and Clang | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 16 | |
sudo apt-get -y install clang-tidy-16 | |
- name: Replace clang-tidy | |
run: sudo cp /usr/bin/clang-tidy-16 /usr/bin/clang-tidy -f | |
- name: Install GCC 12 | |
run: sudo apt-get -y install gcc-12 | |
- name: Configure GCC | |
env: | |
CC: gcc-12 | |
CXX: gcc-12 | |
working-directory: ${{github.workspace}} | |
run: cmake --preset env-cc-release | |
- name: Build GCC | |
env: | |
CC: gcc-12 | |
CXX: gcc-12 | |
ACTIONS_STEP_DEBUG: true | |
working-directory: ${{github.workspace}} | |
run: cmake --build --preset env-cc-release | |
- name: Configure Clang | |
env: | |
CC: clang-16 | |
CXX: clang-16 | |
working-directory: ${{github.workspace}} | |
run: | | |
rm -rf build | |
cmake --preset env-cc-release | |
- name: Build Clang | |
env: | |
CC: clang-16 | |
CXX: clang-16 | |
ACTIONS_STEP_DEBUG: true | |
working-directory: ${{github.workspace}} | |
run: cmake --build --preset env-cc-release | |
build-windows: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: seanmiddleditch/gha-setup-ninja@v4 | |
- name: Setup scoop | |
uses: MinoruSekine/setup-scoop@v2 | |
with: | |
buckets: extras | |
scoop_checkup: true | |
scoop_update: true | |
update_path: true | |
- name: Setup MSVC | |
uses: TheMrMilchmann/setup-msvc-dev@v3 | |
with: | |
arch: x64 | |
- name: Configure | |
working-directory: ${{github.workspace}} | |
run: cmake --preset msvc-release | |
- name: Build | |
env: | |
ACTIONS_STEP_DEBUG: true | |
working-directory: ${{github.workspace}} | |
run: cmake --build --preset msvc-release | |
build-macos: | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: seanmiddleditch/gha-setup-ninja@v4 | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: "15.0" | |
- name: Configure | |
env: | |
CC: clang-15 | |
CXX: clang-15 | |
working-directory: ${{github.workspace}} | |
run: cmake --preset env-cc-release | |
- name: Build | |
env: | |
CC: clang-15 | |
CXX: clang-15 | |
ACTIONS_STEP_DEBUG: true | |
working-directory: ${{github.workspace}} | |
run: cmake --build --preset env-cc-release | |