diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a4403967..a1764265 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,51 +25,67 @@ jobs: submodules: false # We'll handle submodules with smart caching fetch-depth: 0 - - name: Cache submodules - id: cache-submodules - uses: actions/cache@v4 - with: - path: | - lib/fprime - lib/fprime-zephyr - lib/zephyr-workspace/zephyr - key: project-deps-${{ hashFiles('.gitmodules') }}-v3 - restore-keys: | - project-deps-${{ hashFiles('.gitmodules') }}- - project-deps- + # - name: Cache bin + # id: cache-bin + # uses: actions/cache@v4 + # with: + # path: | + # bin + # key: bin-${{ hashFiles('Makefile') }}-v3 + # restore-keys: | + # bin-${{ hashFiles('Makefile') }}- + # bin- + + - name: Download bin tools + if: steps.cache-bin.outputs.cache-hit != 'true' + run: | + make download-bin + + # - name: Cache submodules + # id: cache-submodules + # uses: actions/cache@v4 + # with: + # path: | + # lib/fprime + # lib/fprime-zephyr + # lib/zephyr-workspace/zephyr + # key: submodules-${{ hashFiles('.gitmodules') }}-v3 + # restore-keys: | + # submodules-${{ hashFiles('.gitmodules') }}- + # submodules- - name: Setup submodules if: steps.cache-submodules.outputs.cache-hit != 'true' run: | make submodules - - name: Cache python environment - id: cache-python - uses: actions/cache@v4 - with: - path: fprime-venv - key: python-packages-${{ runner.os }}-${{ hashFiles('requirements.txt') }}-v3 - restore-keys: | - python-packages-${{ runner.os }}- - python-packages- + # - name: Cache python venv + # id: cache-python + # uses: actions/cache@v4 + # with: + # path: fprime-venv + # key: python-venv-${{ runner.os }}-${{ hashFiles('requirements.txt') }}-v3 + # restore-keys: | + # python-venv-${{ runner.os }}- + # python-venv- - - name: Setup python environment + - name: Setup python venv if: steps.cache-python.outputs.cache-hit != 'true' run: | make fprime-venv - - name: Cache Zephyr workspace and SDK - id: cache-zephyr - uses: actions/cache@v4 - with: - path: | - lib/zephyr-workspace/modules - lib/zephyr-workspace/bootloader - ~/zephyr-sdk-0.17.2 - key: zephyr-minimal-${{ hashFiles('west.yml') }}-${{ runner.os }}-v3 - restore-keys: | - zephyr-minimal-${{ hashFiles('west.yml') }}-${{ runner.os }}- - zephyr-minimal- + # - name: Cache Zephyr workspace and SDK + # id: cache-zephyr + # uses: actions/cache@v4 + # with: + # path: | + # lib/zephyr-workspace/modules + # lib/zephyr-workspace/bootloader + # ~/zephyr-sdk-0.17.2 + # key: zephyr-${{ hashFiles('west.yml') }}-${{ runner.os }}-v3 + # restore-keys: | + # zephyr-${{ hashFiles('west.yml') }}-${{ runner.os }}- + # zephyr- - name: Setup Zephyr if: steps.cache-zephyr.outputs.cache-hit != 'true' @@ -81,8 +97,7 @@ jobs: - name: Build run: | - # Skip both zephyr-setup and submodules since we cached them separately - make build -o zephyr-setup -o submodules + make generate-ci build-ci - name: Upload build artifacts uses: actions/upload-artifact@v4 diff --git a/Makefile b/Makefile index 1703c2f2..01518a86 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,10 @@ generate: submodules fprime-venv zephyr-setup ## Generate FPrime-Zephyr Proves C @echo "Generating FPrime-Zephyr Proves Core Reference..." @$(UV) run fprime-util generate --force +.PHONY: generate-ci +generate-ci: + @$(UV) run fprime-util generate --force + .PHONY: generate-if-needed BUILD_DIR ?= $(shell pwd)/build-fprime-automatic-zephyr generate-if-needed: @@ -56,6 +60,10 @@ build: submodules zephyr-setup fprime-venv generate-if-needed ## Build FPrime-Ze @echo "Building..." @$(UV) run fprime-util build +.PHONY: build-ci +build-ci: + @$(UV) run fprime-util build + .PHONY: test-integration test-integration: @$(UV) run pytest FprimeZephyrReference/test/int --deployment build-artifacts/zephyr/fprime-zephyr-deployment @@ -83,6 +91,10 @@ gds: ## Run FPrime GDS @$(UV) run fprime-gds -n --dictionary $(ARTIFACT_DIR)/zephyr/fprime-zephyr-deployment/dict/ReferenceDeploymentTopologyDictionary.json --communication-selection uart --uart-baud 115200 --output-unframed-data ##@ Build Tools + +.PHONY: download-bin +download-bin: uv + BIN_DIR ?= $(shell pwd)/bin $(BIN_DIR): mkdir -p $(BIN_DIR)