Skip to content

Update build.yml

Update build.yml #47

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- name: Install Ninja
uses: llvm/actions/install-ninja@main
- name: Configure llvm cmake
run: cmake -Bbuild -Sllvm -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS="lld;clang" -DLLVM_ENABLE_RUNTIMES=libc -DLLVM_NATIVE_ARCH=x86 -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
- name: Build clang
run: cmake --build build --target clang
- name: Build llvm-rc
run: cmake --build build --target llvm-rc
- name: Build llvm-objcopy
run: cmake --build build --target llvm-objcopy
- name: Build llvm-strip
run: cmake --build build --target llvm-strip
- name: Build lld
run: cmake --build build --target lld
- name: Build libc
run: cmake --build build --target libc
- name: Install everything
run: |
cmake --install build --prefix install --component clang
cmake --install build --prefix install --component lld
cmake --install build --prefix install --component llvm-rc
cmake --install build --prefix install --component llvm-strip
cmake --install build --prefix install --component clang-resource-headers
cmake --install build --prefix install --component libc
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: llvm-${{ matrix.os }}
path: install/