Skip to content

Commit

Permalink
Use Clang for all.
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe2933 committed May 20, 2024
1 parent 521a854 commit c52b74b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 32 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,23 @@ on:

jobs:
build:
strategy:
matrix:
compiler:
- { c_compiler: gcc-14, cxx_compiler: g++-14 }
- { c_compiler: clang-18, cxx_compiler: clang++-18 }

runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Setup compiler and vcpkg
run: |
echo "CC=${{ matrix.compiler.c_compiler }}" >> "$GITHUB_ENV"
echo "CXX=${{ matrix.compiler.cxx_compiler }}" >> "$GITHUB_ENV"
cd $VCPKG_INSTALLATION_ROOT
git reset --hard
git pull
vcpkg update
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.1.1

- name: Install Ninja
run: sudo apt-get install ninja-build

- name: Configure
run: |
mkdir build
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake \
CC=/usr/bin/clang-18 CXX=/usr/bin/clang++-18 \
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DVKU_BUILD_EXAMPLES=ON
- name: Build
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup LLVM and vcpkg
run: |
brew update # Ensure to use a latest version of Homebrew
brew install llvm
echo "CC=$(brew --prefix llvm)/bin/clang" >> "$GITHUB_ENV"
echo "CXX=$(brew --prefix llvm)/bin/clang++" >> "$GITHUB_ENV"
git clone https://github.com/microsoft/vcpkg "$HOME/vcpkg"
echo "VCPKG_ROOT=$HOME/vcpkg" >> "$GITHUB_ENV"
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.1.1

- name: Install LLVM, Ninja and vcpkg
run: |
brew install llvm ninja
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
- name: Configure
run: |
mkdir build
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++ \
cmake -S . -B build -G Ninja \
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} -L/opt/homebrew/opt/llvm/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm/lib/c++" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake \
-DVKU_BUILD_EXAMPLES=ON
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
- name: Configure
run: |
mkdir build
cmake -S . -B build -G "Visual Studio 17 2022" -T v143 `
-DCMAKE_BUILD_TYPE=Release `
cmake -S . -B build -G "Visual Studio 17 2022" -T ClangCL `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
-DVKU_BUILD_EXAMPLES=ON
Expand Down

0 comments on commit c52b74b

Please sign in to comment.