Skip to content

Commit

Permalink
Merge b737e8b into 134496c
Browse files Browse the repository at this point in the history
  • Loading branch information
mvandervoord authored May 10, 2024
2 parents 134496c + b737e8b commit 3b7481e
Show file tree
Hide file tree
Showing 566 changed files with 63,084 additions and 11,481 deletions.
116 changes: 102 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# =========================================================================
# Ceedling - Test-Centered Build System for C
# ThrowTheSwitch.org
# Copyright (c) 2010-24 Mike Karlesky, Mark VanderVoord, & Greg Williams
# SPDX-License-Identifier: MIT
# =========================================================================

---
# Continuous Integration Workflow: Test case suite run + validation build check
name: CI
Expand All @@ -19,15 +26,23 @@ jobs:
name: "Unit Tests"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['2.7', '3.0', '3.1']
ruby: ['3.0', '3.1', '3.2']
steps:
# Use a cache for our tools to speed up testing
- uses: actions/cache@v3
with:
path: vendor/bundle
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby-version }}-
# Install Binutils, Multilib, etc
- name: Install C dev Tools
- name: Install C Dev & Plugin 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
sudo apt-get install --assume-yes --quiet gcc-multilib gdb
# Install GCovr
- name: Install GCovr
Expand All @@ -45,6 +60,7 @@ jobs:
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: |
Expand All @@ -57,25 +73,97 @@ jobs:
# Run Tests
- name: Run All Self Tests
run: |
bundle exec rake ci
rake ci
# Build & Install Gem
- name: Build and 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 ../..
# Run FFF Plugin Tests
- name: Run Tests On FFF Plugin
run: |
cd plugins/fff
rake
cd ../..
# Run Module Generator Plugin Tests
- name: Run Tests On Module Generator Plugin
run: |
cd plugins/module_generator
rake
cd ../..
# Run Dependencies Plugin Tests
- name: Run Tests On Dependency Plugin
run: |
cd plugins/dependencies
rake
cd ../..
# Job: Automatic Minor Releases
auto-release:
name: "Automatic Minor Releases"
needs: [unit-tests]
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [3.2]

steps:
# 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 }}

# Generate the Version + Hash Name
- name: version
id: versions
shell: bash
run: |
echo "short_ver=$(ruby ./lib/ceedling/version.rb)" >> $GITHUB_ENV
echo "full_ver=$(ruby ./lib/ceedling/version.rb)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# Build Gem
- name: build gem
run: |
gem build ceedling.gemspec
# Create Unofficial Release
- name: create release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: true
release_name: ${{ env.full_ver }}
tag_name: ${{ env.full_ver }}
body: "automatic generated pre-release for ${{ env.full_ver }}"
env:
GITHUB_TOKEN: ${{ github.token }}

# Post Gem to Unofficial Release
- name: release gem
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ceedling-${{ env.short_ver }}.gem
asset_name: ceedling-${{ env.full_ver }}.gem
asset_content_type: test/x-gemfile
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ out.fail
tags
*.taghl

examples/blinky/build/
examples/blinky/vendor/
examples/temp_sensor/vendor/
examples/temp_sensor/build/
plugins/fff/examples/fff_example/build/
plugins/module_generator/example/build/
plugins/dependencies/example/boss/build/
plugins/dependencies/example/boss/third_party/
plugins/dependencies/example/supervisor/build/

ceedling.sublime-project
ceedling.sublime-workspace
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@
path = vendor/cmock
url = https://github.com/ThrowTheSwitch/CMock.git
branch = master
[submodule "plugins/fake_function_framework"]
path = plugins/fake_function_framework
url = https://github.com/ElectronVector/fake_function_framework.git
7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# =========================================================================
# Ceedling - Test-Centered Build System for C
# ThrowTheSwitch.org
# Copyright (c) 2010-24 Mike Karlesky, Mark VanderVoord, & Greg Williams
# SPDX-License-Identifier: MIT
# =========================================================================

# This is the configuration used to check the rubocop source code.

#inherit_from: .rubocop_todo.yml
Expand Down
10 changes: 9 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# =========================================================================
# Ceedling - Test-Centered Build System for C
# ThrowTheSwitch.org
# Copyright (c) 2010-24 Mike Karlesky, Mark VanderVoord, & Greg Williams
# SPDX-License-Identifier: MIT
# =========================================================================

source "http://rubygems.org/"

gem "bundler"
gem "bundler", "~> 2.5"
gem "rake"
gem "rspec", "~> 3.8"
gem "require_all"
Expand All @@ -9,6 +16,7 @@ gem "diy"
gem "rr"
gem "thor"
gem "deep_merge"
gem "unicode-display_width"

#these will be used if present, but ignored otherwise
#gem "curses"
Expand Down
40 changes: 22 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,36 @@ GEM
specs:
constructor (2.0.0)
deep_merge (1.2.2)
diff-lcs (1.3)
diff-lcs (1.5.1)
diy (1.1.2)
constructor (>= 1.0.0)
rake (13.0.6)
require_all (1.3.3)
rr (1.1.2)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.2)
rake (13.2.1)
require_all (3.0.0)
rr (3.1.0)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
thor (0.20.3)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
thor (1.3.1)
unicode-display_width (2.5.0)

PLATFORMS
ruby
x64-mingw32
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
bundler
bundler (~> 2.5)
constructor
deep_merge
diy
Expand All @@ -38,6 +41,7 @@ DEPENDENCIES
rr
rspec (~> 3.8)
thor
unicode-display_width

BUNDLED WITH
2.4.3
2.5.10
Loading

0 comments on commit 3b7481e

Please sign in to comment.