try to build with clang too #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '**' | |
pull_request: | |
concurrency: | |
group: ${{ github.ref_name }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ${{ matrix.host }} | |
strategy: | |
fail-fast: false | |
matrix: | |
linux: | |
- v6.1 | |
- master | |
host: | |
- ubuntu-22.04 | |
cc: | |
- gcc | |
include: | |
- linux: v5.10 | |
host: ubuntu-20.04 | |
cc: gcc | |
- linux: master | |
host: ubuntu-22.04 | |
cc: clang | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: tp_smapi | |
- uses: actions/checkout@v4 | |
with: | |
repository: torvalds/linux | |
ref: ${{ matrix.linux }} | |
path: linux | |
- run: sudo apt-get install -y libelf-dev ccache | |
- uses: hendrikmuhs/ccache-action@v1.2 | |
with: | |
key: ${{ matrix.linux }}-${{ matrix.cc }} | |
- name: Configure kernel | |
run: | | |
make -C linux tinyconfig CC=${{ matrix.cc }} | |
echo -e "CONFIG_64BIT=y\nCONFIG_X86_64=y\nCONFIG_MODULES=y\nCONFIG_INPUT=y" > linux/kernel/configs/ci.config | |
make -C linux ci.config CC=${{ matrix.cc }} | |
- name: Run make -C linux CC=${{ matrix.cc }} | |
run: | | |
export PATH="/usr/lib/ccache:$PATH" | |
make -C linux -j $(nproc) CC=${{ matrix.cc }} | |
- run: make -C tp_smapi modules KBUILD=../linux HDAPS=1 CC=${{ matrix.cc }} |