Skip to content

Build Rust Dist Container #46

Build Rust Dist Container

Build Rust Dist Container #46

name: Build Rust Dist Container
permissions:
contents: read
on:
workflow_dispatch:
branches:
- dev-18
paths:
- .github/workflows/build-rust-dist-docker.yml
- 'docker/**'
jobs:
build-rust-dist:
if: github.repository_owner == 'seahorn'
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Checkout seaurchin
uses: actions/checkout@v4
- name: Install python3
uses: actions/setup-python@v5
with:
python-version: '3.13'
- 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: Download seaurchin-llvm latest green source
uses: dawidd6/action-download-artifact@v7
with:
repo: seahorn/seaurchin-llvm
workflow: build-seaurchin-llvm-assert-bin.yml
branch: dev-18
github_token: ${{secrets.GITHUB_TOKEN}}
path: seaurchin-llvm
name: seaurchin-llvm-source
- name: Display structure of downloaded seaurchin-llvm artefact
run: ls -laHR seaurchin-llvm
- name: Unpack seaurchin-llvm source
run: |
tar --zstd -C seaurchin-llvm/ -xf seaurchin-llvm/seaurchin-llvm-project.tar.zst
rm seaurchin-llvm/seaurchin-llvm-project.tar.zst
- name: Build seaurchin-llvm
run: |
sudo chown $USER:$USER /mnt/
cmake -G Ninja -S seaurchin-llvm/llvm -C seaurchin-llvm/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 -B /mnt/build
ninja -v -C /mnt/build
- name: Build/test rust
run: |
#sudo chown $USER:$USER /mnt/
RUSTFLAGS_NOT_BOOTSTRAP="-Cllvm-args=-debug-only=licm -Cllvm-args=-licm-uses-ownsem" python x.py --config=config.ci.toml install
# 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-project.tar.zst
tar -C /mnt/ -c install/ | zstd -T0 -c > seaurchin-dist.tar.zst
- name: Upload seaurchin Source
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
with:
name: seaurchin-source
path: seaurchin-project.tar.zst
retention-days: 2
- name: Upload seaurchin-install Dir
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
with:
name: seaurchin-dist
path: seaurchin-dist.tar.zst
retention-days: 2