forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: workflow for building seaurchin-llvm and assert
- Loading branch information
1 parent
c420daf
commit ec502f1
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
|
||
name: Build seaurchin-llvm binaries w assert | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
workflow_dispatch: | ||
branches: | ||
- dev-18 | ||
inputs: | ||
release-version: | ||
description: 'Release Version' | ||
required: true | ||
type: string | ||
upload: | ||
description: 'Upload binaries to the release page' | ||
required: true | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
prepare: | ||
name: Prepare to build binaries | ||
runs-on: ubuntu-22.04 | ||
if: github.repository == 'seahorn/seaurchin-llvm' | ||
outputs: | ||
release-version: ${{ steps.vars.outputs.release-version }} | ||
ref: ${{ steps.vars.outputs.ref }} | ||
upload: ${{ steps.vars.outputs.upload }} | ||
|
||
steps: | ||
- name: Checkout LLVM | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
pip install -r ./llvm/utils/git/requirements.txt | ||
build-seaurchin-llvm-linux: | ||
name: "Build seaurchin-llvm Linux" | ||
needs: prepare | ||
runs-on: ubuntu-22.04 | ||
if: github.repository == 'seahorn/seaurchin-llvm' | ||
steps: | ||
- name: Checkout LLVM | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
ref: ${{ needs.prepare.outputs.ref }} | ||
|
||
- name: Install Ninja | ||
uses: llvm/actions/install-ninja@22e9f909d35b50bd1181709564bfe816eaeaae81 # main | ||
|
||
- name: Setup sccache | ||
uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9 | ||
with: | ||
max-size: 250M | ||
key: sccache-${{ runner.os }}-release | ||
variant: sccache | ||
|
||
- name: Build seaurchin-llvm Clang | ||
run: | | ||
sudo chown $USER:$USER /mnt/ | ||
cmake -G Ninja -C clang/cmake/caches/Release.cmake -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_FORCE_ENABLE_STATS=ON -S llvm -B /mnt/build | ||
ninja -v -C /mnt/build check-llvm | ||
# We need to create an archive of the build directory, because it has too | ||
# many files to upload. | ||
- name: Package Build and Source Directories | ||
run: | | ||
tar -c . | zstd -T0 -c > seaurchin-llvm-project.tar.zst | ||
tar -C /mnt/ -c build/ | zstd -T0 -c > seaurchin-llvm-assert-build.tar.zst | ||
- name: Upload seaurchin-llvm Source | ||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0 | ||
with: | ||
name: seaurchin-llvm-source | ||
path: seaurchin-llvm-project.tar.zst | ||
retention-days: 2 | ||
|
||
- name: Upload seaurchin-llvm Dir | ||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0 | ||
with: | ||
name: seaurchin-llvm-assert-build | ||
path: seaurchin-llvm-assert-build.tar.zst | ||
retention-days: 2 |
File renamed without changes.