From e760d054524acd239bacd126c91a0f4eb9388730 Mon Sep 17 00:00:00 2001 From: Krzysztof Mazur Date: Mon, 9 Oct 2023 19:23:26 +0200 Subject: [PATCH] Fix Windows CI by using ninja --- .github/workflows/build.yml | 15 +++++++++------ build.sh | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5cbcaaf..cc9a61c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,10 +14,13 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - - uses: actions/checkout@v2 - - uses: carlosperate/arm-none-eabi-gcc-action@v1 + - uses: actions/checkout@v2 + - uses: carlosperate/arm-none-eabi-gcc-action@v1 + - if: runner.os == 'Windows' + run: | + choco install ninja - - name: Build - shell: bash - run: | - ./build.sh + - name: Build + shell: bash + run: | + ./build.sh diff --git a/build.sh b/build.sh index 6ee98f4..7cb61d5 100755 --- a/build.sh +++ b/build.sh @@ -1,10 +1,10 @@ #!/bin/sh if which ninja >/dev/null; then - cmake -B build -G Ninja $1 && \ + cmake -B build -G Ninja && \ ninja -C build $1 else - cmake -B build $1 && \ + cmake -B build && \ make -j $(getconf _NPROCESSORS_ONLN) -C build $1 && \ echo "done. P.S.: Consider installing ninja - it's faster" fi