Skip to content

Commit

Permalink
ci: consolidate workflows into a single CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Nov 5, 2024
1 parent 774620e commit a5547b2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 66 deletions.
47 changes: 30 additions & 17 deletions .github/workflows/linux.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux
name: CI

on:
push:
Expand All @@ -14,8 +14,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
build_type: [ Debug, Release, RelWithDebInfo ]
os: [ windows-latest, ubuntu-latest ]

name: Build on ${{ matrix.os }} (${{ matrix.build_type }})
runs-on: ${{ matrix.os }}
Expand All @@ -29,34 +29,47 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: 'pip'

- name: Set up Clang 15
env:
LLVM_VERSION: 15
- name: Set up Clang (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -y -q
sudo apt-get install -y -q build-essential lsb-release wget software-properties-common
sudo wget https://apt.llvm.org/llvm.sh
sudo chmod +x llvm.sh
sudo ./llvm.sh ${LLVM_VERSION}
sudo apt-get install -y -q libc++-${LLVM_VERSION}-dev libc++abi-${LLVM_VERSION}-dev
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} 100
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${LLVM_VERSION} 100
sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-${LLVM_VERSION} 100
sudo ./llvm.sh 15
sudo apt-get install -y -q libc++-15-dev libc++abi-15-dev
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100
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
- name: Set up MSVC (Windows)
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86_64

- name: Set up CMake and Ninja
uses: lukka/get-cmake@latest

- name: Build with Conan
env:
CC: clang
CXX: clang++
- 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
conan create . --build=missing -s compiler.cppstd=17 -s compiler.libcxx=libc++ -s build_type=${{ matrix.build_type }} -c tools.cmake.cmaketoolchain:generator=Ninja
- name: Build with Conan (Linux)
if: matrix.os == 'ubuntu-latest'
env:
CC: clang
CXX: clang++
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)
run: |
conan create . --build=missing -s compiler.cppstd=17 -s build_type=${{ matrix.build_type }} -c tools.cmake.cmaketoolchain:generator=Ninja
49 changes: 0 additions & 49 deletions .github/workflows/windows.yml

This file was deleted.

0 comments on commit a5547b2

Please sign in to comment.