From 51d2888b52cb5d8563426954ac4b06679314cee5 Mon Sep 17 00:00:00 2001 From: Jackson Date: Mon, 29 Nov 2021 12:54:30 -0500 Subject: Switch CI/CD to build using ninja vs. make By switching the CI/CD workflow to use CMake's `ninja` backend, the build time goes down considerably (~4.5 minutes to ~2) compared to GNU Make --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3b753a37..ac0611cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -113,7 +113,7 @@ jobs: run: | mkdir -p build cd build - cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 -DBUILD_DFU=1 ../ + cmake -G Ninja -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 -DBUILD_DFU=1 ../ ######################################################################################### # Make and Upload DFU Package @@ -126,7 +126,7 @@ jobs: - name: Make pinetime-mcuboot-app run: | cd build - make pinetime-mcuboot-app + ninja pinetime-mcuboot-app - name: Unzip DFU package run: | @@ -145,7 +145,7 @@ jobs: - name: Make pinetime-app run: | cd build - make pinetime-app + ninja pinetime-app - name: Upload standalone firmware uses: actions/upload-artifact@v2 @@ -159,7 +159,7 @@ jobs: - name: Make pinetime-recovery run: | cd build - make pinetime-recovery + ninja pinetime-recovery ######################################################################################### # Finish -- cgit v1.2.3-70-g09d2 From baa5954724a91b81e35812ffd1939438689f3446 Mon Sep 17 00:00:00 2001 From: Jackson Date: Tue, 7 Dec 2021 15:38:53 -0500 Subject: Use CMake universal build command Rather than using generator-specific build commands (ex. `make` or `ninja`), the CI build now uses `cmake --build` for a more modern, best practices approach. --- .github/workflows/main.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ac0611cb..58a63931 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -125,8 +125,7 @@ jobs: - name: Make pinetime-mcuboot-app run: | - cd build - ninja pinetime-mcuboot-app + cmake --build build --target pinetime-mcuboot-app - name: Unzip DFU package run: | @@ -144,8 +143,7 @@ jobs: - name: Make pinetime-app run: | - cd build - ninja pinetime-app + cmake --build build --target pinetime-app - name: Upload standalone firmware uses: actions/upload-artifact@v2 @@ -158,8 +156,7 @@ jobs: - name: Make pinetime-recovery run: | - cd build - ninja pinetime-recovery + cmake --build build --target pinetime-recovery ######################################################################################### # Finish -- cgit v1.2.3-70-g09d2