Build Linux Packages #4
Workflow file for this run
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 Linux Packages | |
on: | |
workflow_dispatch: | |
inputs: | |
jobs: | |
build_linux_packages: | |
name: Build Linux Packages | |
runs-on: nod-ai-shared-cpubuilder-manylinux-x86_64 | |
strategy: | |
fail-fast: true | |
env: | |
CACHE_DIR: ${{ github.workspace }}/.container-cache | |
steps: | |
- name: "Checking out repository" | |
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 | |
- name: Enable cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: ${{ env.CACHE_DIR }} | |
key: linux-build-packages-manylinux-v1-${{ github.sha }} | |
restore-keys: | | |
linux-build-packages-manylinux-v1- | |
- name: Install Deps | |
run: | | |
curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo | |
chmod a+x /usr/local/bin/repo | |
yum install -y numactl-devel elfutils-libelf-devel vim-common git-lfs | |
pip install CppHeaderParser | |
- name: Fetch sources | |
run: | | |
./fetch_sources.sh | |
- name: Apply patches | |
run: | | |
./apply_patches.sh | |
- name: Build packages | |
id: build_packages | |
run: | | |
export CCACHE_DIR="${{ env.CACHE_DIR }}/ccache" | |
export CCACHE_MAXSIZE="700M" | |
mkdir -p $CCACHE_DIR | |
# Generate a new build id. | |
package_version="$(printf '%(%Y%m%d)T.${{ github.run_number }}')" | |
echo "Building package ${package_version}" | |
echo "package_version=${package_version}" >> $GITHUB_OUTPUT | |
cmake -B build -GNinja . \ | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DPACKAGE_VERSION="${package_version}" | |
cmake --build build | |
(cd build && cpack -G TBZ2) | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: linux_x86_64_release_packages | |
path: | | |
build/TheRock-*-amdgpu-*.tar.bz2 | |
if-no-files-found: warn | |
- name: Save cache | |
uses: actions/cache/save@v3 | |
if: always() | |
with: | |
path: ${{ env.CACHE_DIR }} | |
key: linux-build-packages-manylinux-v1-${{ github.sha }} | |