Skip to content

Commit

Permalink
Merge pull request #1 from nemocazin/ci
Browse files Browse the repository at this point in the history
Ci
  • Loading branch information
nemocazin authored Aug 1, 2024
2 parents 7e761ed + c731082 commit aad9baf
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build

on:
push:
branches:
- main
- ci
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install -qq build-essential expect sudo ccache
sudo apt-get -y install clang-format make check lcov gcovr
sudo apt install -y glibc-source gcc-arm-none-eabi
sudo apt-get -y update
sudo apt-get -y upgrade
- name: Build main and tests
run: |
mkdir -p Code/build
make main -C Code/
make tests -C Code/
37 changes: 37 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Coverage

on:
push:
branches:
- main
- ci
pull_request:

jobs:
coverage:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install -qq build-essential expect sudo ccache
sudo apt-get -y install clang-format make check lcov gcovr
sudo apt install -y glibc-source gcc-arm-none-eabi
sudo apt-get -y update
sudo apt-get -y upgrade
- name: Build code and generate coverage
run: |
make -C Code/
make coverage -C Code/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage/*.info
flags: unittests
name: codecov-umbrella
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint

on:
push:
branches:
- main
- ci
pull_request:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install clang-format
- name: Lint source code
run: |
clang-format -i Code/src/*.c
clang-format -i Code/tests/*.c
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test

on:
push:
branches:
- main
- ci
pull_request:

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install -qq build-essential expect sudo ccache
sudo apt-get -y install clang-format make check lcov gcovr
sudo apt install -y glibc-source gcc-arm-none-eabi
sudo apt-get -y update
sudo apt-get -y upgrade
- name: Build tests
run: make tests -C Code/

- name: Run tests
run: |
chmod 777 Code/build/tri_tests
./Code/build/tri_tests

0 comments on commit aad9baf

Please sign in to comment.