mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Generated v2 prefixes
This commit is contained in:
		
							
								
								
									
										64
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										64
									
								
								.travis.yml
									
									
									
									
									
								
							| @@ -18,17 +18,17 @@ script: | ||||
|   - make test QUIET=1 | ||||
|  | ||||
|   # run tests with a few different configurations | ||||
|   - make test QUIET=1 CFLAGS+="-DLFS_READ_SIZE=1      -DLFS_CACHE_SIZE=4" | ||||
|   - make test QUIET=1 CFLAGS+="-DLFS_READ_SIZE=512    -DLFS_CACHE_SIZE=512 -DLFS_BLOCK_CYCLES=16" | ||||
|   - make test QUIET=1 CFLAGS+="-DLFS_BLOCK_COUNT=1023 -DLFS_LOOKAHEAD_SIZE=256" | ||||
|   - make test QUIET=1 CFLAGS+="-DLFS2_READ_SIZE=1      -DLFS2_CACHE_SIZE=4" | ||||
|   - make test QUIET=1 CFLAGS+="-DLFS2_READ_SIZE=512    -DLFS2_CACHE_SIZE=512 -DLFS2_BLOCK_CYCLES=16" | ||||
|   - make test QUIET=1 CFLAGS+="-DLFS2_BLOCK_COUNT=1023 -DLFS2_LOOKAHEAD_SIZE=256" | ||||
|  | ||||
|   - make clean test QUIET=1 CFLAGS+="-DLFS_INLINE_MAX=0" | ||||
|   - make clean test QUIET=1 CFLAGS+="-DLFS_NO_INTRINSICS" | ||||
|   - make clean test QUIET=1 CFLAGS+="-DLFS2_INLINE_MAX=0" | ||||
|   - make clean test QUIET=1 CFLAGS+="-DLFS2_NO_INTRINSICS" | ||||
|  | ||||
|   # compile and find the code size with the smallest configuration | ||||
|   - make clean size | ||||
|         OBJ="$(ls lfs*.o | tr '\n' ' ')" | ||||
|         CFLAGS+="-DLFS_NO_ASSERT -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR" | ||||
|         OBJ="$(ls lfs2*.o | tr '\n' ' ')" | ||||
|         CFLAGS+="-DLFS2_NO_ASSERT -DLFS2_NO_DEBUG -DLFS2_NO_WARN -DLFS2_NO_ERROR" | ||||
|         | tee sizes | ||||
|  | ||||
|   # update status if we succeeded, compare with master if possible | ||||
| @@ -120,8 +120,8 @@ jobs: | ||||
|         # self-host test | ||||
|         - make -C littlefs-fuse | ||||
|  | ||||
|         - littlefs-fuse/lfs --format /dev/loop0 | ||||
|         - littlefs-fuse/lfs /dev/loop0 mount | ||||
|         - littlefs-fuse/lfs2 --format /dev/loop0 | ||||
|         - littlefs-fuse/lfs2 /dev/loop0 mount | ||||
|  | ||||
|         - ls mount | ||||
|         - mkdir mount/littlefs | ||||
| @@ -157,8 +157,8 @@ jobs: | ||||
|         - make -C v2 | ||||
|  | ||||
|         # run self-host test with v1 | ||||
|         - v1/lfs --format /dev/loop0 | ||||
|         - v1/lfs /dev/loop0 mount | ||||
|         - v1/lfs2 --format /dev/loop0 | ||||
|         - v1/lfs2 /dev/loop0 mount | ||||
|  | ||||
|         - ls mount | ||||
|         - mkdir mount/littlefs | ||||
| @@ -172,8 +172,8 @@ jobs: | ||||
|         - cd ../.. | ||||
|         - fusermount -u mount | ||||
|  | ||||
|         - v2/lfs --migrate /dev/loop0 | ||||
|         - v2/lfs /dev/loop0 mount | ||||
|         - v2/lfs2 --migrate /dev/loop0 | ||||
|         - v2/lfs2 /dev/loop0 mount | ||||
|  | ||||
|         # run self-host test with v2 right where we left off | ||||
|         - ls mount | ||||
| @@ -191,55 +191,55 @@ jobs: | ||||
|         - | | ||||
|           bash << 'SCRIPT' | ||||
|           set -ev | ||||
|           # Find version defined in lfs.h | ||||
|           LFS_VERSION=$(grep -ox '#define LFS_VERSION .*' lfs.h | cut -d ' ' -f3) | ||||
|           LFS_VERSION_MAJOR=$((0xffff & ($LFS_VERSION >> 16))) | ||||
|           LFS_VERSION_MINOR=$((0xffff & ($LFS_VERSION >>  0))) | ||||
|           # Find version defined in lfs2.h | ||||
|           LFS2_VERSION=$(grep -ox '#define LFS2_VERSION .*' lfs2.h | cut -d ' ' -f3) | ||||
|           LFS2_VERSION_MAJOR=$((0xffff & ($LFS2_VERSION >> 16))) | ||||
|           LFS2_VERSION_MINOR=$((0xffff & ($LFS2_VERSION >>  0))) | ||||
|           # Grab latests patch from repo tags, default to 0, needs finagling | ||||
|           # to get past github's pagination api | ||||
|           PREV_URL=https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs/tags/v$LFS_VERSION_MAJOR.$LFS_VERSION_MINOR. | ||||
|           PREV_URL=https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs/tags/v$LFS2_VERSION_MAJOR.$LFS2_VERSION_MINOR. | ||||
|           PREV_URL=$(curl -u "$GEKY_BOT_RELEASES" "$PREV_URL" -I \ | ||||
|               | sed -n '/^Link/{s/.*<\(.*\)>; rel="last"/\1/;p;q0};$q1' \ | ||||
|               || echo $PREV_URL) | ||||
|           LFS_VERSION_PATCH=$(curl -u "$GEKY_BOT_RELEASES" "$PREV_URL" \ | ||||
|           LFS2_VERSION_PATCH=$(curl -u "$GEKY_BOT_RELEASES" "$PREV_URL" \ | ||||
|               | jq 'map(.ref | match("\\bv.*\\..*\\.(.*)$";"g") | ||||
|                   .captures[].string | tonumber) | max + 1' \ | ||||
|               || echo 0) | ||||
|           # We have our new version | ||||
|           LFS_VERSION="v$LFS_VERSION_MAJOR.$LFS_VERSION_MINOR.$LFS_VERSION_PATCH" | ||||
|           echo "VERSION $LFS_VERSION" | ||||
|           LFS2_VERSION="v$LFS2_VERSION_MAJOR.$LFS2_VERSION_MINOR.$LFS2_VERSION_PATCH" | ||||
|           echo "VERSION $LFS2_VERSION" | ||||
|           # Check that we're the most recent commit | ||||
|           CURRENT_COMMIT=$(curl -f -u "$GEKY_BOT_RELEASES" \ | ||||
|               https://api.github.com/repos/$TRAVIS_REPO_SLUG/commits/master \ | ||||
|               | jq -re '.sha') | ||||
|           [ "$TRAVIS_COMMIT" == "$CURRENT_COMMIT" ] || exit 0 | ||||
|           # Create major branch | ||||
|           git branch v$LFS_VERSION_MAJOR HEAD | ||||
|           git branch v$LFS2_VERSION_MAJOR HEAD | ||||
|           # Create major prefix branch | ||||
|           git config user.name "geky bot" | ||||
|           git config user.email "bot@geky.net" | ||||
|           git fetch https://github.com/$TRAVIS_REPO_SLUG.git \ | ||||
|               --depth=50 v$LFS_VERSION_MAJOR-prefix || true | ||||
|           ./scripts/prefix.py lfs$LFS_VERSION_MAJOR | ||||
|           git branch v$LFS_VERSION_MAJOR-prefix $( \ | ||||
|               --depth=50 v$LFS2_VERSION_MAJOR-prefix || true | ||||
|           ./scripts/prefix.py lfs2$LFS2_VERSION_MAJOR | ||||
|           git branch v$LFS2_VERSION_MAJOR-prefix $( \ | ||||
|               git commit-tree $(git write-tree) \ | ||||
|                   $(git rev-parse --verify -q FETCH_HEAD | sed -e 's/^/-p /') \ | ||||
|                   -p HEAD \ | ||||
|                   -m "Generated v$LFS_VERSION_MAJOR prefixes") | ||||
|                   -m "Generated v$LFS2_VERSION_MAJOR prefixes") | ||||
|           git reset --hard | ||||
|           # Update major version branches (vN and vN-prefix) | ||||
|           git push https://$GEKY_BOT_RELEASES@github.com/$TRAVIS_REPO_SLUG.git \ | ||||
|               v$LFS_VERSION_MAJOR \ | ||||
|               v$LFS_VERSION_MAJOR-prefix | ||||
|               v$LFS2_VERSION_MAJOR \ | ||||
|               v$LFS2_VERSION_MAJOR-prefix | ||||
|           # Create patch version tag (vN.N.N) | ||||
|           curl -f -u "$GEKY_BOT_RELEASES" -X POST \ | ||||
|               https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs \ | ||||
|               -d "{ | ||||
|                   \"ref\": \"refs/tags/$LFS_VERSION\", | ||||
|                   \"ref\": \"refs/tags/$LFS2_VERSION\", | ||||
|                   \"sha\": \"$TRAVIS_COMMIT\" | ||||
|               }" | ||||
|           # Create minor release? | ||||
|           [[ "$LFS_VERSION" == *.0 ]] || exit 0 | ||||
|           [[ "$LFS2_VERSION" == *.0 ]] || exit 0 | ||||
|           # Build release notes | ||||
|           PREV=$(git tag --sort=-v:refname -l "v*.0" | head -1) | ||||
|           if [ ! -z "$PREV" ] | ||||
| @@ -253,8 +253,8 @@ jobs: | ||||
|           curl -f -u "$GEKY_BOT_RELEASES" -X POST \ | ||||
|               https://api.github.com/repos/$TRAVIS_REPO_SLUG/releases \ | ||||
|               -d "{ | ||||
|                   \"tag_name\": \"$LFS_VERSION\", | ||||
|                   \"name\": \"${LFS_VERSION%.0}\", | ||||
|                   \"tag_name\": \"$LFS2_VERSION\", | ||||
|                   \"name\": \"${LFS2_VERSION%.0}\", | ||||
|                   \"draft\": true, | ||||
|                   \"body\": $(jq -sR '.' <<< "$CHANGES") | ||||
|               }" #" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user