This repository has been archived by the owner on Apr 30, 2024. It is now read-only.
Turning profile #147
Workflow file for this run
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: Make CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: autoconf-archive automake bison build-essential curl flex gawk libtool pkg-config python3 rsync texinfo | |
version: 1.0 | |
- name: gcc cache | |
id: gcc-cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: build/gcc | |
key: gcc | |
- name: get library submodules | |
run: git submodule init lib/libgpiod lib/i2c-tools | |
- name: get compiler submodules | |
if: steps.gcc-cache.outputs.cache-hit != 'true' | |
run: git submodule init compiler/binutils-gdb compiler/gcc compiler/glibc compiler/linux | |
- name: fetch submodules | |
run: git submodule update | |
- name: build gcc | |
if: steps.gcc-cache.outputs.cache-hit != 'true' | |
run: ./compiler.sh -j$(nproc) | |
- name: save gcc | |
uses: actions/cache/save@v4 | |
if: steps.gcc-cache.outputs.cache-hit != 'true' | |
with: | |
path: build/gcc | |
key: gcc | |
- name: make | |
run: make -j$(nproc) || make -j$(nproc) | |
lint: | |
name: "Static Analyzer" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: get clang tidy 17 | |
run: wget https://apt.llvm.org/llvm.sh && chmod +x ./llvm.sh && sudo ./llvm.sh 17 && sudo apt install clang-tidy-17 | |
- name: get library submodules | |
run: git submodule init lib/libgpiod lib/i2c-tools && git submodule update | |
- name: run linter | |
run: clang-tidy-17 --version; make runlint LINT=clang-tidy-17 | |
format: | |
name: "Formatting" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: get clang format 17 | |
run: wget https://apt.llvm.org/llvm.sh && chmod +x ./llvm.sh && sudo ./llvm.sh 17 && sudo apt install clang-format-17 | |
- name: check format | |
run: clang-format-17 --version; make checkformat FORMAT=clang-format-17 |