Skip to content

Commit

Permalink
Merge 4821930 into 134496c
Browse files Browse the repository at this point in the history
  • Loading branch information
mvandervoord authored Apr 17, 2024
2 parents 134496c + 4821930 commit c129b59
Show file tree
Hide file tree
Showing 558 changed files with 61,806 additions and 8,710 deletions.
111 changes: 104 additions & 7 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,9 +26,18 @@ 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
run: |
Expand All @@ -45,6 +61,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 @@ -59,12 +76,6 @@ jobs:
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
Expand All @@ -73,9 +84,95 @@ jobs:
# ceedling module:create[someNewModule] module:destroy[someNewModule] test:all
# cd ../..

# Build & Install Gem
- name: build and install Gem
run: |
gem build ceedling.gemspec
gem install --local ceedling-*.gem
# 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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ 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
7 changes: 7 additions & 0 deletions Gemfile
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
# =========================================================================

source "http://rubygems.org/"

gem "bundler"
Expand Down
32 changes: 16 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ GEM
specs:
constructor (2.0.0)
deep_merge (1.2.2)
diff-lcs (1.3)
diff-lcs (1.5.0)
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)
require_all (3.0.0)
rr (3.1.0)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.0)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
thor (0.20.3)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
thor (1.2.1)

PLATFORMS
ruby
Expand All @@ -40,4 +40,4 @@ DEPENDENCIES
thor

BUNDLED WITH
2.4.3
2.3.26
Loading

0 comments on commit c129b59

Please sign in to comment.