Compare commits

...

3 Commits

Author SHA1 Message Date
DevTekVE
8cb85c6d7d Add Python exclusion to .gitattributes in CI
This change updates the GitLab CI configuration to exclude Python files from LFS handling in the build directory. It helps ensure that Python scripts are not filtered or merged by LFS, thus maintaining their integrity.
2024-08-03 20:57:36 +02:00
DevTekVE
84c3668c3a Add git-lfs to CI pipeline
Added `git-lfs` installation to the CI/CD pipeline in `.gitlab-ci.yml` and initialized `git lfs` in `release/ci/publish.sh`. This ensures that large files are properly handled and improves the efficiency of our build and release process.
2024-08-03 20:52:55 +02:00
DevTekVE
89005e08c4 Add support for Git LFS in the CI pipeline
This commit updates the .gitlab-ci.yml to copy the necessary .lfsconfig and .gitattributes files to the build directory. Additionally, it appends LFS filter settings to .gitattributes to manage large file storage effectively during the build.
2024-08-03 19:21:55 +02:00
3 changed files with 10 additions and 1 deletions

View File

@@ -90,6 +90,10 @@ build:
- ls -la ${BUILD_DIR}
- "echo Building Rest..."
- ./release/release_files.py | sort | uniq | rsync -vrRl --files-from=- . $BUILD_DIR/
- cp .lfsconfig-prebuilts $BUILD_DIR/.lfsconfig
- cp .gitattributes $BUILD_DIR/.gitattributes
- echo "selfdrive/**/* filter=lfs diff=lfs merge=lfs -text" >> $BUILD_DIR/.gitattributes
- echo "selfdrive/**/*.py -filter -diff -merge" >> $BUILD_DIR/.gitattributes
# - cp -pR --parents $(cat release/files_common release/files_tici | sort | uniq) $BUILD_DIR/ 2> >(grep -v 'warning:' >&2)
- cd $BUILD_DIR
- sed -i '/from .board.jungle import PandaJungle, PandaJungleDFU/s/^/#/' panda/__init__.py # comment panda jungle when prebuilt
@@ -159,7 +163,7 @@ build:
artifacts: true
before_script:
- 'apk update && apk upgrade'
- 'apk add git bash openssh'
- 'apk add git bash openssh git-lfs'
- 'eval $(ssh-agent -s)'
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- 'mkdir -p ~/.ssh/'

4
.lfsconfig-prebuilts Normal file
View File

@@ -0,0 +1,4 @@
[lfs]
url = https://gitlab.com/sunnypilot/public/sunnypilot-prebuilt-lfs.git/info/lfs
pushurl = ssh://git@gitlab.com/sunnypilot/public/sunnypilot-prebuilt-lfs.git
locksverify = false

View File

@@ -48,6 +48,7 @@ git remote remove origin || true # ensure cleanup
git remote add origin $GIT_ORIGIN
#git push origin -d $DEV_BRANCH || true # Ensuring we delete the remote branch if it exists as we are wiping it out
git fetch origin $DEV_BRANCH || (git checkout -b $DEV_BRANCH && git commit --allow-empty -m "sunnypilot v$VERSION release" && git push -u origin $DEV_BRANCH)
git lfs install
echo "[-] committing version $VERSION T=$SECONDS"
git add -f .