Skip to content

Commit

Permalink
ci: add clang CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
nemequ committed Sep 17, 2024
1 parent 780ab47 commit 408985b
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 2 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,77 @@ jobs:
cd test
make
clang:
runs-on: ubuntu-${{ matrix.distro }}
strategy:
matrix:
include:
# Previous versions will no longer run on GitHub, but can be
# tested in Docker. Here are the versions which are available:
#
# - Ubuntu 14.04: 3.3 - 3.9
# - Ubuntu 16.04: 3.5 - 6.0
# - Ubuntu 18.04: 3.9 - 10

- version: "6.0"
distro: "20.04"
# - version: "7.0"
# distro: "20.04"
# - version: "8.0"
# distro: "20.04"
# - version: "9.0"
# distro: "20.04"
- version: "10"
distro: "20.04"
# - version: "6.0"
# distro: "20.04"
# - version: "7"
# distro: "20.04"
# - version: "8"
# distro: "20.04"
# - version: "9"
# distro: "20.04"
- version: "10"
distro: "20.04"
# - version: "11"
# distro: "20.04"
# - version: "12"
# distro: "20.04"

# - version: "11"
# distro: "22.04"
# - version: "12"
# distro: "22.04"
# - version: "13"
# distro: "22.04"
- version: "14"
distro: "22.04"
# - version: "15"
# distro: "22.04"

# - version: "14"
# distro: "24.04"
# - version: "15"
# distro: "24.04"
# - version: "16"
# distro: "24.04"
# - version: "17"
# distro: "24.04"
- version: "18"
distro: "24.04"
steps:
- uses: actions/checkout@v4
- name: Install Clang ${{ matrix.version }}
run: |
sudo apt-get update
sudo apt-get -y install clang-${{ matrix.version }}
- name: Compile
env:
CC: clang-${{ matrix.version }}
CXX: clang++-${{ matrix.version }}
run: make
working-directory: test

dmc:
runs-on: windows-latest
strategy:
Expand Down
4 changes: 2 additions & 2 deletions test/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CLANG_C_FLAGS = -Weverything -Wno-vla -Wno-covered-switch-default -Werror
GCC_C_FLAGS = -Wall -Wextra -Werror

ifeq ($(notdir $(CC)), clang)
ifeq ($(notdir $(firstword $(subst -, ,$(notdir $(CC))))),$(filter $(firstword $(subst -, ,$(notdir $(CC)))),clang))
CFLAGS ?= $(CLANG_C_FLAGS)
else ifeq ($(notdir $(CC)), suncc)
CFLAGS ?= -errwarn -errtags
Expand Down Expand Up @@ -40,7 +40,7 @@ endif
CLANG_CXX_FLAGS = -Weverything -Werror
GCC_CXX_FLAGS = -Wall -Wextra -Werror

ifeq ($(notdir $(CXX)), clang++)
ifeq ($(notdir $(firstword $(subst -, ,$(notdir $(CC))))),$(filter $(firstword $(subst -, ,$(notdir $(CC)))),clang++))
CXXFLAGS ?= $(CLANG_CXX_FLAGS)
else ifeq ($(notdir $(CXX)), sunCC)
CXXFLAGS ?= -errwarn=%all -errtags=yes
Expand Down

0 comments on commit 408985b

Please sign in to comment.