-
Notifications
You must be signed in to change notification settings - Fork 188
feat: enhance CI pipeline with improved caching and multi-arch support #360
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
+3,849
−70
Merged
Changes from 6 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e47255f
feat: enhance CI pipeline with improved caching and multi-arch support
Aias00 8a3c551
Merge branch 'main' into feat/ci_time
Aias00 0dd98df
feat: refactor Dockerfile to use Makefile for Rust library build
Aias00 c3ceee1
Merge branch 'main' into feat/ci_time
Aias00 f1a7601
feat: simplify Dockerfile by removing unnecessary directory creation
Aias00 06e5784
Merge branch 'feat/ci_time' of https://github.com/Aias00/semantic-rou…
Aias00 5aa2708
Merge branch 'main' into feat/ci_time
Aias00 d8ef7d5
feat: enhance Dockerfiles for cross-compilation and optimize CI pipeline
Aias00 2bd7a67
feat: enhance cross-compilation support in Dockerfile for ARM64 and A…
Aias00 5e03de2
feat: improve ARM64 cross-compilation process in Dockerfile
Aias00 a5c53d7
feat: enhance Dockerfile to include detailed build output for Rust li…
Aias00 76e71d9
feat: enhance Dockerfile to include detailed build output for Rust li…
Aias00 e0acd87
feat: optimize CI pipeline with disk cleanup steps and improved build…
Aias00 790bd2d
feat: update CI configuration for ARM64 builds and improve Dockerfile…
Aias00 ebdc8a3
feat: simplify CI configuration by standardizing runner for ARM64 builds
Aias00 621b07c
feat: enhance Dockerfile for ARM64 cross-compilation with OpenSSL con…
Aias00 75e158c
feat: enhance Dockerfile for ARM64 cross-compilation with OpenSSL con…
Aias00 a1b17cf
feat: enhance Dockerfile for ARM64 cross-compilation with OpenSSL con…
Aias00 2fc08e4
feat: enhance Dockerfile for ARM64 cross-compilation with OpenSSL con…
Aias00 3c0ee66
feat: update CI configuration for multi-architecture Docker image builds
Aias00 a7cb96c
feat: update CI manifest tagging for pull requests with architecture …
Aias00 5bdbb16
feat: remove architecture suffix from pull request tags in CI manifest
Aias00 291fbae
feat: update CI manifest tagging for pull requests with architecture …
Aias00 0a509b7
feat: update CI manifest tagging for pull requests with architecture …
Aias00 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -21,6 +21,13 @@ on: | |||||
default: false | ||||||
push: | ||||||
branches: [ "main" ] | ||||||
pull_request: | ||||||
paths: | ||||||
- ".github/workflows/docker-publish.yml" | ||||||
- "Dockerfile*" | ||||||
- "candle-binding/**" | ||||||
- "src/**" | ||||||
- "e2e-tests/llm-katan/**" | ||||||
|
||||||
jobs: | ||||||
# Parallel job for building both images | ||||||
|
@@ -42,7 +49,7 @@ jobs: | |||||
uses: docker/setup-buildx-action@v3 | ||||||
|
||||||
- name: Set up QEMU (only for multi-arch builds) | ||||||
if: inputs.skip_multiarch != true | ||||||
if: inputs.skip_multiarch != true && github.event_name != 'pull_request' | ||||||
uses: docker/setup-qemu-action@v3 | ||||||
with: | ||||||
platforms: arm64 | ||||||
|
@@ -62,33 +69,24 @@ jobs: | |||||
- name: Set lowercase repository owner | ||||||
run: echo "REPOSITORY_OWNER_LOWER=$(echo $GITHUB_REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | ||||||
|
||||||
# Rust build cache for extproc - only use GitHub Actions cache for non-PR builds | ||||||
- name: Cache Rust dependencies (extproc only) | ||||||
if: matrix.image == 'extproc' && github.event_name != 'pull_request' | ||||||
uses: actions/cache@v4 | ||||||
with: | ||||||
path: | | ||||||
~/.cargo/bin/ | ||||||
~/.cargo/registry/index/ | ||||||
~/.cargo/registry/cache/ | ||||||
~/.cargo/git/db/ | ||||||
candle-binding/target/ | ||||||
key: ${{ runner.os }}-cargo-extproc-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} | ||||||
restore-keys: | | ||||||
${{ runner.os }}-cargo-extproc- | ||||||
|
||||||
# Set build context and dockerfile based on matrix | ||||||
- name: Set build parameters | ||||||
id: build-params | ||||||
run: | | ||||||
# Skip multi-arch for PRs to speed up CI, unless explicitly disabled | ||||||
PLATFORMS="linux/amd64" | ||||||
if [ "${{ inputs.skip_multiarch }}" != "true" ] && [ "${{ github.event_name }}" != "pull_request" ]; then | ||||||
PLATFORMS="linux/amd64,linux/arm64" | ||||||
fi | ||||||
|
||||||
if [ "${{ matrix.image }}" = "extproc" ]; then | ||||||
echo "context=." >> $GITHUB_OUTPUT | ||||||
echo "dockerfile=./Dockerfile.extproc" >> $GITHUB_OUTPUT | ||||||
echo "platforms=${{ inputs.skip_multiarch == true && 'linux/amd64' || 'linux/amd64,linux/arm64' }}" >> $GITHUB_OUTPUT | ||||||
echo "platforms=${PLATFORMS}" >> $GITHUB_OUTPUT | ||||||
elif [ "${{ matrix.image }}" = "llm-katan" ]; then | ||||||
echo "context=./e2e-tests/llm-katan" >> $GITHUB_OUTPUT | ||||||
echo "dockerfile=./e2e-tests/llm-katan/Dockerfile" >> $GITHUB_OUTPUT | ||||||
echo "platforms=${{ inputs.skip_multiarch == true && 'linux/amd64' || 'linux/amd64,linux/arm64' }}" >> $GITHUB_OUTPUT | ||||||
echo "platforms=${PLATFORMS}" >> $GITHUB_OUTPUT | ||||||
fi | ||||||
|
||||||
# Extract version for llm-katan | ||||||
|
@@ -132,6 +130,7 @@ jobs: | |||||
fi | ||||||
|
||||||
- name: Build and push ${{ matrix.image }} Docker image | ||||||
id: build | ||||||
uses: docker/build-push-action@v5 | ||||||
with: | ||||||
context: ${{ steps.build-params.outputs.context }} | ||||||
|
@@ -140,5 +139,19 @@ jobs: | |||||
push: ${{ github.event_name != 'pull_request' }} | ||||||
load: ${{ github.event_name == 'pull_request' }} | ||||||
tags: ${{ matrix.image == 'extproc' && steps.extproc-tags.outputs.tags || steps.llm-katan-tags.outputs.tags }} | ||||||
cache-from: type=gha | ||||||
cache-to: type=gha,mode=max | ||||||
build-args: | | ||||||
BUILDKIT_INLINE_CACHE=1 | ||||||
CARGO_BUILD_JOBS=4 | ||||||
|
CARGO_BUILD_JOBS=4 | |
CARGO_BUILD_JOBS=${{ github.event_name == 'pull_request' && '2' || '4' }} |
Copilot uses AI. Check for mistakes.
Positive FeedbackNegative Feedback
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is misleading. The logic actually skips multi-arch for PRs unless explicitly enabled (when skip_multiarch is false), not 'unless explicitly disabled'.
Copilot uses AI. Check for mistakes.