Skip to content

Commit

Permalink
Fix Windows CI by using ninja
Browse files Browse the repository at this point in the history
  • Loading branch information
krzmaz committed Oct 11, 2023
1 parent 3727cb2 commit e760d05
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e760d05

Please sign in to comment.