C/C++ CI #845
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: C/C++ CI | |
on: | |
push: | |
branches: [ master github_actions_fix ] | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: '30 4 * * 1' | |
workflow_dispatch: | |
# note that I need to manually set the path for the arm-none-eabi-gcc exe | |
# after it comes out of the cache. I don't understand why I need to do that. | |
jobs: | |
build-gcc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v4 | |
- name: Install Embedded Arm Toolchain arm-none-eabi-gcc | |
uses: carlosperate/[email protected] | |
with: | |
release: '13.2.Rel1' # The arm-none-eabi-gcc release to use. | |
- name: make with GCC, debug build, Rev1 | |
run: | | |
make -k DEBUG=1 REV1=1 | |
- name: make with GCC, debug build, Rev2 | |
run: | | |
make REV1=1 clean | |
make -k DEBUG=1 REV2=1 | |
- name: make with GCC, Rev1 | |
run: | | |
make REV1=1 clean | |
make -k REV1=1 | |
- name: make with GCC, Rev 2 | |
run: | | |
make REV1=1 clean | |
make -k REV2=1 | |
build-clang: | |
# this build also needs arm-none-eabi-gcc as some of the clang sysroot stuff depends on it. | |
runs-on: ubuntu-latest | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v4 | |
- name: Install LLVM and Clang | |
uses: KyleMayes/[email protected] | |
with: | |
version: "17.0" | |
directory: ${{ runner.temp }}/llvm | |
- name: Install Embedded Arm Toolchain arm-none-eabi-gcc | |
uses: carlosperate/[email protected] | |
with: | |
release: '13.2.Rel1' # The arm-none-eabi-gcc release to use. | |
# Directory to unpack GCC to. Defaults to a temporary directory. | |
- name: make with CLANG, Rev 1 | |
run: | | |
export PATH=${PATH}:$HOME/work/_temp/arm-none-eabi/bin: | |
make -k COMPILER=clang REV1=1 | |
- name: make with CLANG, Rev 2 | |
run: | | |
export PATH=${PATH}:$HOME/work/_temp/arm-none-eabi/bin: | |
make -k COMPILER=clang REV1=1 clean | |
make -k COMPILER=clang REV2=1 | |
clang-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v4 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/[email protected] | |
with: | |
files_ignore: | | |
**/*.yml | |
**/*.py | |
**/*.xml | |
**/*.ipynb | |
.clang* | |
.git* | |
**/*.sh | |
**/*.def | |
**/Makefile | |
makedefs | |
**/*.md | |
**/*.txt | |
**/.pylintrc | |
**/.gitignore | |
**/.git* | |
**/LICENSE | |
- name: Format changed files | |
if: steps.changed-files.outputs.any_changed == 'true' | |
uses: DoozyX/[email protected] | |
with: | |
source: ${{ steps.changed-files.outputs.all_changed_files }} | |
extensions: 'h,c' | |
clangFormatVersion: 17 | |
inplace: false | |
style: file |