Skip to content

Commit

Permalink
WIP: LLVM release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mutantcornholio committed Jan 28, 2025
1 parent 888723e commit 8392a66
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 3 deletions.
110 changes: 110 additions & 0 deletions .github/workflows/release-llvm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Release LLVM
on:
workflow_dispatch:
inputs:
version:
description: "version to use in tag name; without the leading 'v', or prefix"
required: false
push:
branches: ["yuri/release-llvm"]


env:
CARGO_TERM_COLOR: always

jobs:
build-macos-gnu:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: install macos deps
run: |
brew install ninja
- name: versions
run: |
rustup show
cargo --version
rustup +nightly show
cargo +nightly --version
cmake --version
echo "bash:" && bash --version
echo "ninja:" && ninja --version
echo "clang:" && clang --version
- name: Build LLVM
run: |
make install-llvm
- uses: actions/upload-artifact@v4
with:
name: llvm-macos
path: target-llvm/gnu/target-final
if-no-files-found: error
compression-level: 9

build-windows-gnu:
# runs-on: windows-latest
runs-on: lorwyn
env:
MSYSTEM: "MINGW"
steps:
- uses: actions/checkout@v4

- name: install win deps
run: |
choco install ninja
- name: Setup msys2
id: msys2
uses: msys2/setup-msys2@v2
with:
path-type: inherit
install: >-
base-devel
mingw-w64-x86_64-clang
mingw-w64-x86_64-lld
mingw-w64-x86_64-rust
mingw-w64-x86_64-cmake
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-libs
mingw-w64-x86_64-python
mingw-w64-clang-x86_64-riscv64-unknown-elf-toolchain
- name: Prepare env
shell: "msys2 {0}"
run: |
echo "/c/Users/runneradmin/.cargo/bin" >> "${GITHUB_PATH}"
#
# - name: versions
# run: |
# rustup show
# cargo --version
# rustup +nightly show
# cargo +nightly --version
# cmake --version

- name: Install llvm-builder
shell: 'msys2 {0}'
env:
VERBOSE: 1
LIBSTDCPP_SOURCE_PATH: "${{ steps.msys2.outputs.msys2-location }}/mingw64/lib/libstdc++.a"
run: |
make install-llvm-builder
- name: Build LLVM
shell: 'msys2 {0}'
env:
VERBOSE: 1
LIBSTDCPP_SOURCE_PATH: "${{ steps.msys2.outputs.msys2-location }}/mingw64/lib/libstdc++.a"
run: |
revive-llvm clone
revive-llvm build --llvm-projects lld --llvm-projects clang
- uses: actions/upload-artifact@v4
with:
name: llvm-windows
path: target-llvm/gnu/target-final
if-no-files-found: error
compression-level: 9
6 changes: 3 additions & 3 deletions crates/llvm-builder/src/builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ fn cmake_dynamic_args(
format!("-DCMAKE_C_FLAGS='{}'", C_FLAGS.join(" ")),
format!("-DCMAKE_ASM_FLAGS='{}'", C_FLAGS.join(" ")),
format!("-DCMAKE_CXX_FLAGS='{}'", C_FLAGS.join(" ")),
format!("-DCMAKE_C_COMPILER='{}'", clang_path.to_string_lossy()),
format!("-DCMAKE_ASM_COMPILER='{}'", clang_path.to_string_lossy()),
format!("-DCMAKE_CXX_COMPILER='{}'", clangxx_path.to_string_lossy()),
format!("-DCMAKE_C_COMPILER='{}.exe'", clang_path.to_string_lossy()),
format!("-DCMAKE_ASM_COMPILER='{}.exe'", clang_path.to_string_lossy()),
format!("-DCMAKE_CXX_COMPILER='{}.exe'", clangxx_path.to_string_lossy()),
format!("-DCMAKE_AR='{}'", ar_path.to_string_lossy()),
format!("-DCMAKE_NM='{}'", nm_path.to_string_lossy()),
format!("-DCMAKE_RANLIB='{}'", ranlib_path.to_string_lossy()),
Expand Down

0 comments on commit 8392a66

Please sign in to comment.