Skip to content

Commit

Permalink
[CI] Try to build Boost + LLVM + RG3 at once and upload artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
DronCode committed Jan 21, 2024
1 parent e2443df commit 2963629
Showing 1 changed file with 52 additions and 7 deletions.
59 changes: 52 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,58 @@ jobs:
toolset: msvc
link: static

# Build LLVM 16.0.4
- name: Download LLVM
uses: llvm/actions/get-llvm-project-src@main
# Try to locate llvm binaries
- name: Cache LLVM binaries
id: cache-llvm-binaries
uses: actions/cache@v3
with:
key: "${{ runner.os }}-build-llvmorg-16.0.4"
path: |
llvm_repo/build/MinSizeRel
llvm_repo/llvm/include
llvm_repo/clang/include
llvm_repo/clang-tools-extra/include
llvm_repo/cmake
# Checkout & Build LLVM 16.0.4 (Need check cache here. On cache miss - build from scratch!)
- name: Checkout LLVM
if: steps.cache-llvm-binaries.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
submodules: "recursive"
repository: "llvm/llvm-project"
ref: "llvmorg-16.0.4"
path: "llvm_repo"

# Build project via cmake
# Build python whl packages
# Compress things
# Send artifacts to GitHub
- name: Build LLVM
if: steps.cache-llvm-binaries.outputs.cache-hit != 'true'
working-directory: llvm_repo
run: |
mkdir build
cmake -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE="MinSizeRel" -S llvm -B build -G Ninja
cd build
cmake --build . --config MinSizeRel
# Build our project
- name: Build RG3
env:
LLVM_DIR: ${{ github.workspace }}/llvm_repo/build/lib/cmake/llvm
CLANG_DIR: ${{ github.workspace }}/llvm_repo/build/lib/cmake/clang
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
run: |
mkdir build
cmake -DCMAKE_BUILD_TYPE="MinSizeRel" -B build -G Ninja
cd build
cmake -- build . --config MinSizeRel
- name: Create distribution package
run: |
mkdir dist
mv PyBind/rg3py.pyi dist
mv build/PyBind/rg3py.pyd dist
- name: Upload RG3 artifacts
uses: actions/upload-artifact@v2
with:
name: "RG3"
path: dist

0 comments on commit 2963629

Please sign in to comment.