-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from nemocazin/ci
Ci
- Loading branch information
Showing
4 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
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
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/ |
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
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 |
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
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 |
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
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 |