Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
8fb1421e
Commit
8fb1421e
authored
Mar 04, 2025
by
Harrison Saturley-Hall
Committed by
GitHub
Mar 04, 2025
Browse files
CI: setup caching for any merge to main (#8)
parent
fe83f8aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
1 deletion
+58
-1
.github/workflows/cache_image.yaml
.github/workflows/cache_image.yaml
+57
-0
.github/workflows/pr_github_validation.yaml
.github/workflows/pr_github_validation.yaml
+1
-1
No files found.
.github/workflows/cache_image.yaml
0 → 100644
View file @
8fb1421e
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name
:
Cache base image
on
:
push
:
branches
:
-
main
jobs
:
build-test
:
runs-on
:
${{ fromJSON(vars.PR_FASTCHECK_RUNNERS) }}
strategy
:
matrix
:
framework
:
-
standard
-
vllm
name
:
Build and Test - ${{ matrix.framework }}
env
:
IMAGE_TAG
:
ghcr.io/dynemo-ai/dynemo:latest-${{ matrix.framework }}
steps
:
-
name
:
Checkout repository
uses
:
actions/checkout@v4
with
:
ref
:
main
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v3
-
name
:
Login to GitHub Container Registry
uses
:
docker/login-action@v3
with
:
registry
:
ghcr.io
username
:
${{ github.actor }}
password
:
${{ secrets.GITHUB_TOKEN }}
-
name
:
Set Default cache location
id
:
which_cache
run
:
|
echo "cache_from_location=${{ env.IMAGE_TAG }}" >> $GITHUB_OUTPUT
echo "cache_to_location=${{ env.IMAGE_TAG }}" >> $GITHUB_OUTPUT
-
name
:
Build image
env
:
CACHE_FROM
:
"
type=registry,ref=${{
steps.which_cache.outputs.cache_from_location
}}"
CACHE_TO
:
"
type=registry,ref=${{
steps.which_cache.outputs.cache_to_location
}},image-manifest=true,mode=max"
run
:
|
./container/build.sh --tag ${{ env.IMAGE_TAG }} --framework ${{ matrix.framework }} --cache-from "${{ env.CACHE_FROM }}" --cache-to "${{ env.CACHE_TO }}"
.github/workflows/pr_github_validation.yaml
View file @
8fb1421e
...
...
@@ -65,7 +65,7 @@ jobs:
CACHE_FROM
:
"
type=registry,ref=${{
steps.which_cache.outputs.cache_from_location
}}"
CACHE_TO
:
"
type=registry,ref=${{
steps.which_cache.outputs.cache_to_location
}},image-manifest=true,mode=max"
run
:
|
./container/build.sh --tag $IMAGE_TAG --framework ${{ matrix.framework }} --cache-from "${{ env.CACHE_FROM }}" --cache-to "${{ env.CACHE_TO }}"
./container/build.sh --tag $
{{ env.
IMAGE_TAG
}}
--framework ${{ matrix.framework }} --cache-from "${{ env.CACHE_FROM }}" --cache-to "${{ env.CACHE_TO }}"
-
name
:
Run pytest
env
:
PYTEST_MARKS
:
"
pre_merge
or
mypy"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment