-
Notifications
You must be signed in to change notification settings - Fork 0
ci: add Linux CI workflow with self-hosted Docker runner #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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,119 @@ | ||
| name: Linux CI (Docker Self-Hosted) | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Linux x64 (FASTBuild) | ||
| runs-on: [self-hosted, linux, arcforges] | ||
| if: >- | ||
| github.event_name != 'pull_request' || | ||
| github.event.pull_request.head.repo.full_name == github.repository | ||
| timeout-minutes: 120 | ||
| env: | ||
| VCPKG_DEFAULT_BINARY_CACHE: /cache/vcpkg | ||
| VCPKG_DEFAULT_HOST_TRIPLET: x64-linux-dynamic | ||
| FASTBUILD_CACHE_PATH: /cache/fastbuild | ||
| GLOBAL_VCPKG_PATH: /tmp/vcpkg | ||
| VCPKG_MAX_CONCURRENCY: 6 | ||
| CMAKE_BUILD_PARALLEL_LEVEL: 6 | ||
|
|
||
| steps: | ||
| # ── Checkout ────────────────────────────────────────────── | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| # ── Toolchain ───────────────────────────────────────────── | ||
| - name: Install system dependencies | ||
| run: | | ||
| set -euo pipefail | ||
| apt-get update -qq | ||
| apt-get install -y --no-install-recommends \ | ||
| wget unzip git curl pkg-config \ | ||
| autoconf autoconf-archive automake libtool \ | ||
| libltdl-dev \ | ||
| lsb-release software-properties-common gnupg ca-certificates \ | ||
| libgl-dev libx11-dev libxkbcommon-dev libxcb-cursor-dev \ | ||
| libfontconfig1-dev libfreetype-dev libegl-dev \ | ||
| g++ nasm bison flex \ | ||
| '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev \ | ||
| libxrender-dev libxi-dev libxkbcommon-x11-dev libegl1-mesa-dev \ | ||
| libsm-dev libice-dev | ||
| wget -qO- https://apt.llvm.org/llvm.sh | bash -s -- 20 | ||
| update-alternatives --install /usr/bin/clang clang /usr/bin/clang-20 100 | ||
| update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-20 100 | ||
| update-alternatives --install /usr/bin/lld lld /usr/bin/lld-20 100 | ||
|
|
||
| - name: Install CMake 4.2.3 | ||
| run: | | ||
| wget -qO- https://github.com/Kitware/CMake/releases/download/v4.2.3/cmake-4.2.3-linux-x86_64.tar.gz \ | ||
| | tar -xz -C /tmp | ||
| echo "/tmp/cmake-4.2.3-linux-x86_64/bin" >> "$GITHUB_PATH" | ||
|
|
||
|
deku2026 marked this conversation as resolved.
|
||
| - name: Install FASTBuild v1.19 | ||
| run: | | ||
| mkdir -p /tmp/fastbuild | ||
| wget -O /tmp/fastbuild.zip \ | ||
| https://www.fastbuild.org/downloads/v1.19/FASTBuild-Linux-x64-v1.19.zip | ||
| unzip -o /tmp/fastbuild.zip -d /tmp/fastbuild | ||
| chmod +x /tmp/fastbuild/fbuild /tmp/fastbuild/fbuildworker | ||
| ln -sf /tmp/fastbuild/fbuild /tmp/fastbuild/FBuild | ||
| echo "/tmp/fastbuild" >> "$GITHUB_PATH" | ||
|
|
||
|
deku2026 marked this conversation as resolved.
|
||
| - name: Setup vcpkg | ||
| run: | | ||
| if [ ! -f /tmp/vcpkg/vcpkg ]; then | ||
| rm -rf /tmp/vcpkg | ||
| git clone --depth 1 https://github.com/microsoft/vcpkg.git /tmp/vcpkg | ||
|
deku2026 marked this conversation as resolved.
|
||
| /tmp/vcpkg/bootstrap-vcpkg.sh -disableMetrics | ||
| fi | ||
| echo "VCPKG_ROOT=/tmp/vcpkg" >> "$GITHUB_ENV" | ||
| echo "/tmp/vcpkg" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Verify tool versions | ||
| run: | | ||
| echo "CMake: $(cmake --version | head -1)" | ||
| echo "Clang: $(clang++ --version | head -1)" | ||
| echo "FBuild: $(fbuild -version 2>&1 | head -1)" | ||
| echo "vcpkg: $(vcpkg version 2>&1 | head -2 | tail -1)" | ||
|
|
||
| # ── vcpkg ───────────────────────────────────────────────── | ||
| - name: Ensure vcpkg binary cache dir | ||
| run: mkdir -p "$VCPKG_DEFAULT_BINARY_CACHE" | ||
|
|
||
| - name: Install base vcpkg packages | ||
| run: | | ||
| vcpkg install \ | ||
| --triplet x64-linux-dynamic \ | ||
| --host-triplet x64-linux-dynamic \ | ||
| opencolorio openimageio openexr imath ffmpeg \ | ||
| portaudio crashpad qtbase rapidjson pybind11 kddockwidgets | ||
|
|
||
| # ── Build ───────────────────────────────────────────────── | ||
| - name: Configure (CMake) | ||
| run: cmake --preset linux-ci -DUSE_WERROR=ON | ||
|
|
||
| - name: Build (FASTBuild) | ||
| run: cmake --build --preset linux-ci | ||
|
|
||
| - name: Trim FASTBuild cache | ||
| if: always() | ||
| run: fbuild -cachetrim 10240 | ||
| working-directory: ${{ github.workspace }}/build/linux-ci | ||
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.