Skip to content

Commit

Permalink
ci: improve checks for OS
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Nov 5, 2024
1 parent a5547b2 commit 817a558
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
cache: 'pip'

- name: Set up Clang (Linux)
if: matrix.os == 'ubuntu-latest'
if: runner.os == 'Linux'
run: |
sudo apt-get update -y -q
sudo apt-get install -y -q build-essential lsb-release wget software-properties-common
Expand All @@ -45,9 +45,11 @@ jobs:
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 100
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-15 100
sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-15 100
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Set up MSVC (Windows)
if: matrix.os == 'windows-latest'
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86_64
Expand All @@ -56,20 +58,19 @@ jobs:
uses: lukka/get-cmake@latest

- name: Set up Conan

run: |
python -m pip install --upgrade pip
pip install conan
conan profile detect --force
conan export third_party/funchook --version 1.1.3
- name: Build with Conan (Linux)
if: matrix.os == 'ubuntu-latest'
env:
CC: clang
CXX: clang++
if: runner.os == 'Linux'
run: |
conan create . --build=missing -s compiler.cppstd=17 -s build_type=${{ matrix.build_type }} -c tools.cmake.cmaketoolchain:generator=Ninja -s compiler.libcxx=libc++
- name: Build with Conan (Windows)
if: runner.os == 'Windows'
run: |
conan create . --build=missing -s compiler.cppstd=17 -s build_type=${{ matrix.build_type }} -c tools.cmake.cmaketoolchain:generator=Ninja

0 comments on commit 817a558

Please sign in to comment.