@@ -25,19 +25,19 @@ jobs:
2525 submodules : false # We'll handle submodules with smart caching
2626 fetch-depth : 0
2727
28- # Cache git submodules content
29- - name : Cache Git Submodules
28+ # Cache project dependencies (fprime, fprime-zephyr, zephyr)
29+ - name : Cache Project Dependencies
3030 id : cache-submodules
3131 uses : actions/cache@v4
3232 with :
3333 path : |
3434 lib/fprime
3535 lib/fprime-zephyr
3636 lib/zephyr-workspace/zephyr
37- key : git-submodules -${{ hashFiles('.gitmodules') }}-v2
37+ key : project-deps -${{ hashFiles('.gitmodules') }}-v3
3838 restore-keys : |
39- git-submodules -${{ hashFiles('.gitmodules') }}-
40- git-submodules -
39+ project-deps -${{ hashFiles('.gitmodules') }}-
40+ project-deps -
4141
4242 # Cache Zephyr west modules and SDK (the slow parts)
4343 - name : Cache Zephyr workspace and SDK
@@ -53,14 +53,14 @@ jobs:
5353 zephyr-minimal-${{ hashFiles('west.yml') }}-${{ runner.os }}-
5454 zephyr-minimal-
5555
56- # Initialize git submodules with robust cache handling
57- - name : Initialize Git Submodules
56+ # Initialize dependencies with robust cache handling
57+ - name : Setup Dependencies (fprime, fprime-zephyr, zephyr)
5858 run : |
59- echo "Setting up git submodules ..."
59+ echo "Setting up project dependencies ..."
6060
6161 # Check if we have cached content
6262 if [ "${{ steps.cache-submodules.outputs.cache-hit }}" == "true" ]; then
63- echo "✓ Submodules restored from cache"
63+ echo "✓ Dependencies restored from cache"
6464
6565 # Verify cached content is valid by checking for key files
6666 valid_cache=true
@@ -81,23 +81,35 @@ jobs:
8181 fi
8282
8383 if [ "$valid_cache" = "true" ]; then
84- echo "✓ All cached submodules are valid"
85- # Initialize git tracking for the cached content
86- git submodule init || true
87- git submodule sync || true
88- else
89- echo "Cached content invalid, clearing and re-downloading..."
90- rm -rf lib/fprime lib/fprime-zephyr lib/zephyr-workspace/zephyr
91- git submodule update --init --recursive
84+ echo "✓ All cached dependencies are valid, skipping download"
85+ exit 0
9286 fi
93- else
94- echo "Cache miss - downloading submodules..."
95- git submodule update --init --recursive
9687 fi
9788
98- # Verify submodules are working
99- echo "Verifying submodules:"
100- git submodule status || echo "Submodule status check failed, but content should be available"
89+ echo "Downloading dependencies manually..."
90+
91+ # Remove any existing directories
92+ rm -rf lib/fprime lib/fprime-zephyr lib/zephyr-workspace/zephyr
93+
94+ # Create directories
95+ mkdir -p lib/zephyr-workspace
96+
97+ # Clone fprime
98+ echo "Cloning fprime..."
99+ git clone --depth 1 --branch v4.0.0 https://github.com/nasa/fprime.git lib/fprime
100+
101+ # Clone fprime-zephyr
102+ echo "Cloning fprime-zephyr..."
103+ git clone --depth 1 https://github.com/fprime-community/fprime-zephyr.git lib/fprime-zephyr
104+ cd lib/fprime-zephyr
105+ git checkout 931354e26e39cb711f846e1ca8bb1337ede83b7c
106+ cd ../..
107+
108+ # Clone zephyr
109+ echo "Cloning zephyr..."
110+ git clone --depth 1 --branch v4.2.0 https://github.com/zephyrproject-rtos/zephyr.git lib/zephyr-workspace/zephyr
111+
112+ echo "✓ All dependencies downloaded successfully"
101113
102114 - name : Setup minimal Zephyr environment
103115 if : steps.cache-zephyr.outputs.cache-hit != 'true'
0 commit comments