Skip to content

Commit

Permalink
Added clang build step to CI
Browse files Browse the repository at this point in the history
As found by dpgeorge, clang has slightly different warnings than GCC.
There's really no cost to running clang as an extra build step to test
for these.
  • Loading branch information
geky committed Sep 7, 2022
1 parent 40dba4a commit 2374762
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,27 @@ jobs:
- name: test-valgrind
run: make test TESTFLAGS+="-k --valgrind"

# test that compilation is warning free under clang
clang:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: install
run: |
# need toml, also pip3 isn't installed by default?
sudo apt-get update -qq
sudo apt-get install -qq python3 python3-pip
sudo pip3 install toml
- name: install-clang
run: |
sudo apt-get update -qq
sudo apt-get install -qq clang
echo "CC=clang" >> $GITHUB_ENV
clang --version
# no reason to not test again
- name: test-clang
run: make test TESTFLAGS+="-k"

# self-host with littlefs-fuse for a fuzz-like test
fuse:
runs-on: ubuntu-20.04
Expand Down

0 comments on commit 2374762

Please sign in to comment.