-
Notifications
You must be signed in to change notification settings - Fork 247
78 lines (69 loc) · 2.24 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
# Continuous Integration Workflow: Test case suite run + validation build check
name: CI
# Controls when the action will run.
# Triggers the workflow on push or pull request events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
# Job: Unit test suite
unit-tests:
name: "Unit Tests"
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['2.7', '3.0', '3.1']
steps:
# Install Binutils, Multilib, etc
- name: Install C dev Tools
run: |
sudo apt-get update -qq
sudo apt-get install --assume-yes --quiet gcc-multilib
sudo apt-get install -qq gcc-avr binutils-avr avr-libc gdb
# Install GCovr
- name: Install GCovr
run: |
sudo pip install gcovr
# Checks out repository under $GITHUB_WORKSPACE
- name: Checkout Latest Repo
uses: actions/checkout@v2
with:
submodules: recursive
# Setup Ruby Testing Tools to do tests on multiple ruby version
- name: Setup Ruby Testing Tools
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
# Install Ruby Testing Tools (Bundler version should match the one in Gemfile.lock)
- name: Install Ruby Testing Tools
run: |
gem install rspec
gem install rubocop -v 0.57.2
gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
bundle update
bundle install
# Run Tests
- name: Run All Self Tests
run: |
bundle exec rake ci
# Build & Install Gem
- name: Build and Install Gem
run: |
gem build ceedling.gemspec
gem install --local ceedling-*.gem
# Run Blinky
# Disabled because it's set up for avr-gcc
#- name: Run Tests On Blinky Project
# run: |
# cd examples/blinky
# ceedling module:create[someNewModule] module:destroy[someNewModule] test:all
# cd ../..
# Run Temp Sensor
- name: Run Tests On Temp Sensor Project
run: |
cd examples/temp_sensor
ceedling module:create[someNewModule] module:destroy[someNewModule] test:all
cd ../..