Skip to content

Commit

Permalink
Rework cmake build to a better super-project structure. (#17)
Browse files Browse the repository at this point in the history
* Removes some obsolete CI packaging steps that need to be reworked in a
followon.
* Reworks patches directory to be based on `git format-patch` and `git
am` for a more sustainable dev flow.
* Takes a fine tooth comb to version propagation in the sub-projects and
burns out a lot of implicit dependencies on the host environment.
* Layers the sub-project builds for isolation and separation of concerns
so that there is less chance of implicitly depending on a byproduct out
of order.
* Implements automatic toolchain management so that sub-projects can be
configured to build with an in-project built LLVM and/or HIP compiler.
* Includes upstream patches for working around various CMake issues.
* Removes most stringly propagated CMake variables in favor for explicit
declaration in sub-projects.
* Adds the beginning of a build manual.
* Adds background build job pools that sub-projects can opt into if they
have low concurrency/high latency.
  • Loading branch information
stellaraccident authored Jan 23, 2025
1 parent 58b96ed commit 3068e6f
Show file tree
Hide file tree
Showing 41 changed files with 1,781 additions and 490 deletions.
40 changes: 21 additions & 19 deletions .github/workflows/build_linux_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:
- name: Fetch sources
run: |
git config --global user.email "[email protected]"
git config --global user.name "Nobody"
./build_tools/fetch_sources.py --depth 1
# The full checkout is very large: ~16GB, 9 of which is GIT stuff.
Expand All @@ -75,33 +77,33 @@ jobs:
-DTHEROCK_PACKAGE_VERSION="${package_version}"
cmake --build build
- name: Build Tarballs
run: |
(cd build && cpack -G TXZ)
# - name: Build Tarballs
# run: |
# (cd build && cpack -G TXZ)

- name: Report
if: ${{ !cancelled() }}
run: |
ls -lh build
ccache -s
- name: Upload runtime artifacts
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: TheRock-runtime-linux-x86_64-tarball
path: |
build/TheRock-amdgpu-runtime-*.tar.xz
if-no-files-found: warn
# - name: Upload runtime artifacts
# uses: actions/upload-artifact@v4
# if: ${{ !cancelled() }}
# with:
# name: TheRock-runtime-linux-x86_64-tarball
# path: |
# build/TheRock-amdgpu-runtime-*.tar.xz
# if-no-files-found: warn

- name: Upload compiler artifacts
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: TheRock-compiler-linux-x86_64-tarball
path: |
build/TheRock-amdgpu-compiler*.tar.xz
if-no-files-found: warn
# - name: Upload compiler artifacts
# uses: actions/upload-artifact@v4
# if: ${{ !cancelled() }}
# with:
# name: TheRock-compiler-linux-x86_64-tarball
# path: |
# build/TheRock-amdgpu-compiler*.tar.xz
# if-no-files-found: warn

- name: Save cache
uses: actions/cache/save@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
name: Build Linux Packages
uses: ./.github/workflows/build_linux_packages.yml

build_python_packages:
name: Build Python Packages
uses: ./.github/workflows/build_python_packages.yml
# build_python_packages:
# name: Build Python Packages
# uses: ./.github/workflows/build_python_packages.yml
3 changes: 0 additions & 3 deletions .github/workflows/nightly_staging_release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Nightly Staging Release

on:
schedule:
- cron: "0 10 * * *"

workflow_dispatch:
inputs:

Expand Down
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ repos:
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: ^patches/
- id: end-of-file-fixer
exclude: ^patches/
- id: check-yaml
exclude: ^patches/
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 22.10.0
Expand Down
Loading

0 comments on commit 3068e6f

Please sign in to comment.