Build LLVM #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build LLVM" | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Git tag for the release.' | |
required: true | |
type: string | |
jobs: | |
build_llvm_mac: | |
name: Build LLVM | |
runs-on: macos-14 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- run: "brew install ninja" | |
# Build and package LLVM. | |
- run: "./build-llvm-libs.sh llvm-static-libs-macos-14.tar.gz" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: llvm-static-libs-macos-14 | |
path: llvm-static-libs-macos-14.tar.gz | |
build_llvm_linux: | |
name: Build LLVM | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, ubuntu-24.04-arm] | |
runs-on: ${{ matrix.os }} | |
container: ubuntu:20.04 | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- run: "apt update && apt install -y ninja-build gcc g++ git wget python3" | |
# Install recent CMake. | |
- run: | | |
export ARCH=${{ runner.arch == 'x64' && 'x86_64' || 'aarch64' }} | |
wget https://github.com/Kitware/CMake/releases/download/v3.31.5/cmake-3.31.5-linux-$ARCH.sh -O cmake-install.sh | |
chmod +x cmake-install.sh | |
./cmake-install.sh --skip-license --prefix=/usr/local | |
rm cmake-install.sh | |
# Build and package LLVM. | |
- run: "./build-llvm-libs.sh llvm-static-libs-ubuntu-20.04-${{ runner.arch }}.tar.gz" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: llvm-static-libs-ubuntu-20.04-${{ runner.arch }} | |
path: llvm-static-libs-ubuntu-20.04-${{ runner.arch }}.tar.gz | |
create_release: | |
name: Create release | |
runs-on: ubuntu-latest | |
needs: [build_llvm_mac, build_llvm_linux] | |
permissions: | |
contents: write # for creating releases | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: llvm-static-libs-* | |
merge-multiple: true | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: LLVM tooling libraries ${{ inputs.tag }} | |
tag_name: ${{ inputs.tag }} | |
files: llvm-static-libs-* | |
fail_on_unmatched_files: true |