Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 95 additions & 53 deletions .github/workflows/clp-artifact-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,8 @@ concurrency:
jobs:
filter-relevant-changes:
name: "filter-relevant-changes"
runs-on: &runner >-
${{
github.repository_owner == 'y-scope'
&& fromJSON('["self-hosted", "x64", "ubuntu-noble"]')
|| 'ubuntu-24.04'
}}
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
outputs:
centos_stream_9_image_changed: "${{steps.filter.outputs.centos_stream_9_image}}"
manylinux_2_28_image_changed: "${{steps.filter.outputs.manylinux_2_28_image}}"
Expand Down Expand Up @@ -118,7 +114,8 @@ jobs:
name: "centos-stream-9-deps-image"
if: "needs.filter-relevant-changes.outputs.centos_stream_9_image_changed == 'true'"
needs: "filter-relevant-changes"
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand Down Expand Up @@ -149,9 +146,11 @@ jobs:
matrix:
include:
- arch: "amd64"
runner: *runner
runner: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
- arch: "arm64"
runner: "ubuntu-24.04-arm"
runner: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_LIGHT_ARM64 || '["ubuntu-24.04-arm"]') }}
runs-on: "${{matrix.runner}}"
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
Expand Down Expand Up @@ -187,7 +186,8 @@ jobs:
&& needs.manylinux_2_28-deps-image.result == 'success'
needs:
- "manylinux_2_28-deps-image"
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- name: "Login to Image Registry"
uses: "docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121" # v4.1.0
Expand Down Expand Up @@ -224,7 +224,8 @@ jobs:
&& needs.musllinux_1_2-deps-image.result == 'success'
needs:
- "musllinux_1_2-deps-image"
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- name: "Login to Image Registry"
uses: "docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121" # v4.1.0
Expand Down Expand Up @@ -258,9 +259,11 @@ jobs:
matrix:
include:
- arch: "amd64"
runner: *runner
runner: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
- arch: "arm64"
runner: "ubuntu-24.04-arm"
runner: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_LIGHT_ARM64 || '["ubuntu-24.04-arm"]') }}
runs-on: "${{matrix.runner}}"
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
Expand Down Expand Up @@ -288,7 +291,8 @@ jobs:
name: "ubuntu-jammy-x86_64-deps-image"
if: "needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'true'"
needs: "filter-relevant-changes"
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand Down Expand Up @@ -317,7 +321,8 @@ jobs:
&& github.event_name != 'pull_request'
&& github.ref == 'refs/heads/main'
needs: "filter-relevant-changes"
runs-on: "ubuntu-24.04-arm"
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_LIGHT_ARM64 || '["ubuntu-24.04-arm"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand Down Expand Up @@ -352,7 +357,8 @@ jobs:
use_shared_libs: [true, false]
name: "centos-stream-9-${{matrix.use_shared_libs == true && 'dynamic' || 'static'}}-linked-bins"
continue-on-error: true
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand Down Expand Up @@ -396,7 +402,8 @@ jobs:
name: >-
manylinux_2_28-x86_64-${{matrix.use_shared_libs == true && 'dynamic' || 'static'}}-linked-bins
continue-on-error: true
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand Down Expand Up @@ -439,7 +446,8 @@ jobs:
OS_NAME: "manylinux_2_28"
name: "manylinux_2_28-x86_64-python-wheels"
continue-on-error: true
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand Down Expand Up @@ -497,7 +505,8 @@ jobs:
name: >-
musllinux_1_2-x86_64-${{matrix.use_shared_libs == true && 'dynamic' || 'static'}}-linked-bins
continue-on-error: true
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand Down Expand Up @@ -543,7 +552,8 @@ jobs:
OS_NAME: "ubuntu-jammy"
name: "ubuntu-jammy-${{matrix.use_shared_libs == true && 'dynamic' || 'static'}}-linked-bins"
continue-on-error: true
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand Down Expand Up @@ -590,7 +600,8 @@ jobs:
# Run if the ancestor jobs were successful/skipped and building clp was successful.
if: "!cancelled() && !failure() && needs.ubuntu-jammy-binaries.result == 'success'"
needs: "ubuntu-jammy-binaries"
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
env:
OS_NAME: "ubuntu-jammy"
TMP_OUTPUT_DIR: "/tmp"
Expand Down Expand Up @@ -657,7 +668,8 @@ jobs:
needs:
- "filter-relevant-changes"
- "ubuntu-jammy-x86_64-deps-image"
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand Down Expand Up @@ -724,36 +736,64 @@ jobs:
'build/lint-clang-tidy/**/*'
)}}

package-image:
name: "package-image-${{matrix.arch}}"
# NOTE: The aarch64 job is skipped on PRs, so we accept both 'success' and 'skipped'.
package-image-amd64:
name: "package-image-amd64"
if: >-
!cancelled() && !failure() && (
needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'false' ||
(needs.ubuntu-jammy-x86_64-deps-image.result == 'success'
&& (needs.ubuntu-jammy-aarch64-deps-image.result == 'success'
|| needs.ubuntu-jammy-aarch64-deps-image.result == 'skipped'))
needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'false'
|| needs.ubuntu-jammy-x86_64-deps-image.result == 'success'
)
needs:
- "filter-relevant-changes"
- "ubuntu-jammy-x86_64-deps-image"
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
submodules: "recursive"

- name: "Workaround actions/runner-images/issues/6775"
shell: "bash"
run: "chown $(id -u):$(id -g) -R ."

- name: "Build the package without the package image"
uses: "./.github/actions/run-on-image"
env:
OS_NAME: "ubuntu-jammy"
with:
image_name: "${{format('{0}ubuntu-jammy', env.DEPS_IMAGE_NAME_PREFIX_X86)}}"
use_published_image: >-
${{needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'false'
|| (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')}}
run_command: >-
CLP_CPP_MAX_PARALLELISM_PER_BUILD_TASK=$(getconf _NPROCESSORS_ONLN)
HOME=/tmp
task package-build-deps

- uses: "./.github/actions/clp-build-runtime-image"
with:
image_registry: "ghcr.io"
image_registry_username: "${{github.actor}}"
image_registry_password: "${{secrets.GITHUB_TOKEN}}"
arch: "amd64"
platform_version_codename: "jammy"
Comment thread
coderabbitai[bot] marked this conversation as resolved.

package-image-arm64:
name: "package-image-arm64"
# Only build arm64 images on push to main to save CI resources on PRs.
if: >-
!cancelled() && !failure()
&& github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
Comment thread
jackluo923 marked this conversation as resolved.
&& (
needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'false'
|| needs.ubuntu-jammy-aarch64-deps-image.result == 'success'
)
needs:
- "filter-relevant-changes"
- "ubuntu-jammy-aarch64-deps-image"
strategy:
matrix:
# Only build arm64 images on push to main to save CI resources on PRs.
arch: >-
${{github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
&& fromJSON('["amd64", "arm64"]') || fromJSON('["amd64"]')}}
runs-on: >-
${{
matrix.arch == 'amd64'
&& (github.repository_owner == 'y-scope'
&& fromJSON('["self-hosted", "x64", "ubuntu-noble"]')
|| 'ubuntu-24.04')
|| (github.repository_owner == 'y-scope'
&& fromJSON('["self-hosted", "arm64", "ubuntu-noble"]')
|| 'ubuntu-24.04-arm')
}}
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_ARM64 || '["ubuntu-24.04-arm"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand All @@ -768,10 +808,7 @@ jobs:
env:
OS_NAME: "ubuntu-jammy"
with:
image_name: >-
${{format('{0}ubuntu-jammy',
matrix.arch == 'amd64' && env.DEPS_IMAGE_NAME_PREFIX_X86
|| env.DEPS_IMAGE_NAME_PREFIX_AARCH64)}}
image_name: "${{format('{0}ubuntu-jammy', env.DEPS_IMAGE_NAME_PREFIX_AARCH64)}}"
use_published_image: >-
${{needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'false'
|| (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')}}
Expand All @@ -785,17 +822,21 @@ jobs:
image_registry: "ghcr.io"
image_registry_username: "${{github.actor}}"
image_registry_password: "${{secrets.GITHUB_TOKEN}}"
arch: "${{matrix.arch}}"
arch: "arm64"
platform_version_codename: "jammy"

package-image-multiarch-manifest:
name: "package-image-multiarch-manifest"
if: >-
github.event_name != 'pull_request'
&& github.ref == 'refs/heads/main'
&& needs.package-image.result == 'success'
needs: "package-image"
runs-on: *runner
&& needs.package-image-amd64.result == 'success'
&& needs.package-image-arm64.result == 'success'
needs:
- "package-image-amd64"
- "package-image-arm64"
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- name: "Login to Image Registry"
uses: "docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121" # v4.1.0
Expand Down Expand Up @@ -837,7 +878,8 @@ jobs:
needs:
- "filter-relevant-changes"
- "ubuntu-jammy-x86_64-deps-image"
runs-on: *runner
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
permissions:
# To check out the repository.
contents: "read"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/clp-core-build-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ concurrency:
jobs:
build-macos:
name: "build-macos"
if: "vars.GH_DISABLE_MACOS != 'true'"
strategy:
matrix:
os:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/clp-docs-generated-code-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ concurrency:

jobs:
check-generated:
# Runs only on Ubuntu Jammy (22.04) since the Rust components are only built on this platform.
runs-on: "ubuntu-22.04"
# CPU-bound (cargo build --release codegen), so uses GH_RUNNER_LINUX_HEAVY_X64.
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_HEAVY_X64 || '["ubuntu-24.04"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/clp-docs-macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "clp-docs-macos"

on:
pull_request:
push:
schedule:
# Run daily at 00:15 UTC (the 15 is to avoid periods of high load)
- cron: "15 0 * * *"
workflow_dispatch:

permissions: {}

concurrency:
group: "${{github.workflow}}-${{github.ref}}"
# Cancel in-progress jobs for efficiency
cancel-in-progress: true

jobs:
build-macos:
if: "vars.GH_DISABLE_MACOS != 'true'"
name: "build-macos"
runs-on: "macos-15"
permissions:
# To check out the repository.
contents: "read"
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
persist-credentials: false
lfs: "true"
submodules: "recursive"
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- uses: "./tools/yscope-dev-utils/exports/github/actions/install-python"

- uses: "./tools/yscope-dev-utils/exports/github/actions/install-go-task"
with:
version: "3.48.0"

- name: "Build docs"
shell: "bash"
run: "task docs:site"
9 changes: 2 additions & 7 deletions .github/workflows/clp-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ concurrency:
jobs:
build:
name: "build"
strategy:
matrix:
os:
- "macos-15"
- "ubuntu-24.04"
runs-on: "${{matrix.os}}"
runs-on: >-
${{ fromJSON(vars.GH_RUNNER_LINUX_LIGHT_X64 || '["ubuntu-24.04"]') }}
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
Expand All @@ -42,7 +38,6 @@ jobs:
- if: >-
contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name)
&& ('refs/heads/main' == github.ref || startsWith(github.ref, 'refs/tags/v'))
&& 'ubuntu-24.04' == matrix.os
uses: "actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02"
with:
name: "docs-html"
Expand Down
Loading
Loading