From eecb9d8837e2c343c726a63ad3ca8f2a0f69bb74 Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Sat, 8 Feb 2025 01:20:47 -0700 Subject: [PATCH 01/11] docs: update readme --- README.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index aba4c35..91a00db 100644 --- a/README.org +++ b/README.org @@ -18,8 +18,10 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ** Installation + +*** TODO Automated Release *** Binaries -This project has a pre-compiled binary for linux in the releases. +a pre-compiled binary for linux in the releases. *** Development **** Dependencies From 95834df7b51c7a8cb1f2433b4ad1482f49fa5c8a Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Sat, 8 Feb 2025 01:26:23 -0700 Subject: [PATCH 02/11] ci: test config --- .github/workflows/semantic-release.yml | 2 +- .releaserc.yaml | 28 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index f3c6570..2f3387f 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -5,7 +5,7 @@ on: push: branches: - main - - remove_docker + - alpha jobs: semantic-release: diff --git a/.releaserc.yaml b/.releaserc.yaml index 5531b87..edbd074 100644 --- a/.releaserc.yaml +++ b/.releaserc.yaml @@ -1,14 +1,14 @@ -plugins: - - "@semantic-release/commit-analyzer" - - "@semantic-release/release-notes-generator" - - "@semantic-release/changelog" - - "@semantic-release/git" - - "@semantic-release/github" - - assets: - -path: ./build/release/flowVC.out - -label: flowVC.out - -branches: - - "+([0-9])?(.{+([0-9]),x}).x" - - main - - remove_docker \ No newline at end of file +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/changelog", + [ + "@semantic-release/github", + { + "assets": ["build/release/flowVC.out"] + } + ], + "@semantic-release/git" + ] +} From 8710edeb3474561b8f5a9f721f81d8f87ed7d668 Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Sat, 8 Feb 2025 01:29:45 -0700 Subject: [PATCH 03/11] ci: test config --- .releaserc.prerelease.yaml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/.releaserc.prerelease.yaml b/.releaserc.prerelease.yaml index d837b94..3079d5e 100644 --- a/.releaserc.prerelease.yaml +++ b/.releaserc.prerelease.yaml @@ -1,17 +1,14 @@ -plugins: - - "@semantic-release/commit-analyzer" - - "@semantic-release/release-notes-generator" - - "@semantic-release/changelog" - - "@semantic-release/github" - -branches: - - "+([0-9])?(.{+([0-9]),x}).x" - - main - - name: dev/* - prerelease: '${name.replace(/^dev\//g, "dev-")}' - - name: remove_docker/* - prerelease: '${name.replace(/^remove_docker\//g, "remove_docker-")}' - - name: feature/* - prerelease: '${name.replace(/^feature\//g, "feature-")}' - - name: hotfix/* - prerelease: '${name.replace(/^hotfix\//g, "hotfix-")}' \ No newline at end of file +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/changelog", + [ + "@semantic-release/github", + { + "assets": ["build/release/flowVC.out"] + } + ], + "@semantic-release/git" + ] +} \ No newline at end of file From cdb300292fb3c3fdd734169422b39183c5821695 Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Sat, 8 Feb 2025 01:33:30 -0700 Subject: [PATCH 04/11] ci: wip --- .github/workflows/semantic-release.yml | 2 +- .releaserc.yaml => .releaserc.json | 0 .releaserc.prerelease.yaml => .releaserc.prerelease.json | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename .releaserc.yaml => .releaserc.json (100%) rename .releaserc.prerelease.yaml => .releaserc.prerelease.json (100%) diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 2f3387f..0bf78ab 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -39,7 +39,7 @@ jobs: - name: Prepare prerelease semantic if: github.ref != 'refs/heads/main' - run: mv .releaserc.prerelease.yaml .releaserc.yaml + run: mv .releaserc.prerelease.json .releaserc.json - name: Semantic Release uses: cycjimmy/semantic-release-action@v4 diff --git a/.releaserc.yaml b/.releaserc.json similarity index 100% rename from .releaserc.yaml rename to .releaserc.json diff --git a/.releaserc.prerelease.yaml b/.releaserc.prerelease.json similarity index 100% rename from .releaserc.prerelease.yaml rename to .releaserc.prerelease.json From 52415ec6af503a34abf526f69ee03f0716d8aa7f Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Sat, 8 Feb 2025 01:36:54 -0700 Subject: [PATCH 05/11] ci: wip --- .releaserc.prerelease.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.releaserc.prerelease.json b/.releaserc.prerelease.json index 3079d5e..f4c43ac 100644 --- a/.releaserc.prerelease.json +++ b/.releaserc.prerelease.json @@ -10,5 +10,9 @@ } ], "@semantic-release/git" - ] -} \ No newline at end of file + ], + "branches": [ + "main", + "alpha" + ] +} From e52ac7b3928251b71fbcf94a4b077a4761c90a5d Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 8 Feb 2025 08:37:42 +0000 Subject: [PATCH 06/11] chore(release): 0.0.4 [skip ci] ## [0.0.4](https://github.com/bkm82/flowVC/compare/v0.0.3...v0.0.4) (2025-02-08) ### Bug Fixes * remove token and use default ([#18](https://github.com/bkm82/flowVC/issues/18)) ([21b8c7f](https://github.com/bkm82/flowVC/commit/21b8c7fc8386f10d3a87d1f93acc3c16d1d025df)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1031b8..982b522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.0.4](https://github.com/bkm82/flowVC/compare/v0.0.3...v0.0.4) (2025-02-08) + + +### Bug Fixes + +* remove token and use default ([#18](https://github.com/bkm82/flowVC/issues/18)) ([21b8c7f](https://github.com/bkm82/flowVC/commit/21b8c7fc8386f10d3a87d1f93acc3c16d1d025df)) + ## [0.0.3](https://github.com/bkm82/flowVC/compare/v0.0.2...v0.0.3) (2025-02-07) From 8cc255171fc81aac11ff674fc23e674164aa8e54 Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Sat, 8 Feb 2025 01:44:20 -0700 Subject: [PATCH 07/11] ci: update relase config --- .releaserc.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.releaserc.json b/.releaserc.json index edbd074..551f8a9 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -10,5 +10,8 @@ } ], "@semantic-release/git" - ] + ], + "branches": [ + "main" + ] } From 0adbb32e1d3ed9995f5a061356b6f122bac0ea55 Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Sat, 8 Feb 2025 02:23:24 -0700 Subject: [PATCH 08/11] docs: update README --- .github/workflows/semantic-release.yml | 2 +- README.org | 65 ++++++++++++++++++-------- 2 files changed, 47 insertions(+), 20 deletions(-) diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 0bf78ab..0a670c8 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -1,5 +1,5 @@ --- -name: Semantic Release +name: CD on: push: diff --git a/README.org b/README.org index 91a00db..53724e6 100644 --- a/README.org +++ b/README.org @@ -19,29 +19,26 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ** Installation -*** TODO Automated Release -*** Binaries -a pre-compiled binary for linux in the releases. +*** Automated Release +If you are on ubuntu, the code here can be ran directly using the compiled binary in the latest release. Otherwise follow the instructions below for building the source code from the source code . -*** Development -**** Dependencies -[[https://www.ruby-lang.org/en/][Ruby]] > v 3.0: A programing language used for Ceedling +*** Build From Source +To build the code from source the there are two options. The first option involved installing Ceedling and its dependencies. Alternativly, if you have docker, you can download the docker image with the dependencies all bundeled together. -[[https://github.com/ThrowTheSwitch/Ceedling][Ceedling]] : A collection of tools for C project including Unity and CMock for testing +**** Ceedling +***** Dependencies +[[https://www.ruby-lang.org/en/][Ruby]] > v 3.0: A programing language used for Ceedling -gcovr: a code coverage reporter +[[https://github.com/ThrowTheSwitch/Ceedling][Ceedling]] : Ceedling is a Test-Centered Build System for C. It utilizes a collection of tools for testing (Unity) and mocking (CMock) -**** Instalation -1. Install [[https://www.ruby-lang.org/en/][Ruby]] +***** Instalation +1. Install [[https://www.ruby-lang.org/en/][Ruby]] by refering to the ruby documentation for your operating system. 2. Install Ceedling gem from the RubyGems repository #+begin_src shell gem install ceedling #+end_src -3. Install gcovr - #+begin_src shell - sudo apt install gcovr - #+end_src + 4. Clone the repository #+begin_src shell https://github.com/bkm82/flowVC.git @@ -56,14 +53,43 @@ gcovr: a code coverage reporter #+begin_src shell ceedling release #+end_src - this will create the ./build/release/flowVC.out executable - - + this will create the ./build/release/flowVC.out executable that you can run. -**** Guidlines +**** Docker +Alternatly, if you dont want to install the tooling and would prefer to use a docker container you can do that -***** Semantic Versioning: +1. Install docker (outside the scope of this documentation) +2. Clone the repository + #+begin_src shell + https://github.com/bkm82/flowVC.git + cd flowVC + #+end_src + +3. Pull the docker image from docker hub [[https://hub.docker.com/r/throwtheswitch/madsciencelab][madsciencelab]] + #+begin_src shell + docker pull throwtheswitch/madsciencelab:latest + #+end_src +4. Run the tests: if you are in the flowVC directory you can replace the with a "." (without the quotes) + #+begin_src shell + docker run -it --rm -v :/home/dev/project throwtheswitch/madsciencelab:latest + ceedling test:all + #+end_src +5. Build the executable + #+begin_src shell + docker run -it --rm -v :/home/dev/project throwtheswitch/madsciencelab:latest + ceedling release + #+end_src +6. This will create the ./build/release/flowVC.out executable. NOTE: as this was compiled using a linux (Ubuntu) docker container, this might not work if you are on another operating system. In that case you can run the command through the docker container (i.e.) + #+begin_src shell + docker run -it --rm -v .:/home/dev/project throwtheswitch/madsciencelab:latest + .build/release/flowVC.out + #+end_src + +**** Make +The third option is to compile the source code using the provided Make file, however this file is not currently part of the CI/CD pipeline so there may be compilation bugs. Issue reports and/or contributions are welcome +** Development Guidlines +*** Semantic Versioning: This project intends to use a Trunk-Based Release with semantic versioning. Commit messages should follow [[https://www.conventionalcommits.org/en/v1.0.0/][conventional commits]] #+begin_src shell [optional scope]: @@ -73,3 +99,4 @@ Where the type determines the version updates. Valid types are fix, feat, BREAKING CHANGE, build, chore, ci, docs, style, refactor, perf, test + From e809f3c59400ed297fb7f12c82afd0c4f4fd82be Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Sat, 8 Feb 2025 02:45:46 -0700 Subject: [PATCH 09/11] cd: try implement a sematntic-release unsquash --- .github/workflows/cd.backup | 60 ------------------- .../{semantic-release.yml => cd.yml} | 1 + .releaserc.json | 23 ++++++- 3 files changed, 21 insertions(+), 63 deletions(-) delete mode 100644 .github/workflows/cd.backup rename .github/workflows/{semantic-release.yml => cd.yml} (98%) diff --git a/.github/workflows/cd.backup b/.github/workflows/cd.backup deleted file mode 100644 index f2bddfd..0000000 --- a/.github/workflows/cd.backup +++ /dev/null @@ -1,60 +0,0 @@ -name: CD - -on: - # Publish on every approved PR - pull_request: - types: - - closed - branches: - - main - -permissions: - id-token: write - contents: write - packages: write - -jobs: - check: - name: check pr status - runs-on: ubuntu-latest - steps: - - name: check if PR is merged - uses: zmynx/github-actions/.github/actions/git/check-merge@feature/gha - - cd: - name: build - needs: [check] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Generate Release using Docker - run: | - docker run \ - --interactive \ - --rm \ - -u $(id -u):$(id -g) \ - --volume .:/home/dev/project \ - throwtheswitch/madsciencelab-plugins:1.0.0 \ - ceedling release - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: flowVC.out - path: ./build/artifacts/release/flowVC.out - - - name: Determine Release Info - id: release - uses: Fresa/trunk-based-release-versioning@main - - - name: Create Release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ steps.release.outputs.version }} - files: ./build/release/flowVC.out - draft: true - prerelease: true - generate_release_notes: true diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/cd.yml similarity index 98% rename from .github/workflows/semantic-release.yml rename to .github/workflows/cd.yml index 0a670c8..2012ce4 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/cd.yml @@ -50,6 +50,7 @@ jobs: @semantic-release/changelog@5 @semantic-release/exec@5 @semantic-release/git@9 + @semantic-release-unsquash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc.json b/.releaserc.json index 551f8a9..2050417 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -1,7 +1,24 @@ { - "plugins": [ - "@semantic-release/commit-analyzer", - "@semantic-release/release-notes-generator", + "plugins": [ + + ["semantic-release-unsquash", { + "commitAnalyzerConfig": { + "preset": "angular", + "parserOpts": { + "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"] + } + }, + "notesGeneratorConfig": { + "preset": "angular", + "parserOpts": { + "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"] + }, + "writerOpts": { + "commitsSort": ["subject", "scope"] + } + } + }], + "@semantic-release/changelog", [ "@semantic-release/github", From 7cef5125e1c866ab3e327d53830667d63b15271f Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Sat, 8 Feb 2025 02:47:20 -0700 Subject: [PATCH 10/11] cd: yaml fix --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2012ce4..874cab8 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -50,7 +50,7 @@ jobs: @semantic-release/changelog@5 @semantic-release/exec@5 @semantic-release/git@9 - @semantic-release-unsquash + @semantic-release-unsquash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 07b7fbbc3927606e5e5d82451ff6432db15748bf Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Sat, 8 Feb 2025 02:56:32 -0700 Subject: [PATCH 11/11] ci: revert the semantic-release-unsquash --- .github/workflows/cd.yml | 1 - .releaserc.json | 23 +++-------------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 874cab8..0a670c8 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -50,7 +50,6 @@ jobs: @semantic-release/changelog@5 @semantic-release/exec@5 @semantic-release/git@9 - @semantic-release-unsquash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc.json b/.releaserc.json index 2050417..551f8a9 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -1,24 +1,7 @@ { - "plugins": [ - - ["semantic-release-unsquash", { - "commitAnalyzerConfig": { - "preset": "angular", - "parserOpts": { - "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"] - } - }, - "notesGeneratorConfig": { - "preset": "angular", - "parserOpts": { - "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"] - }, - "writerOpts": { - "commitsSort": ["subject", "scope"] - } - } - }], - + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", "@semantic-release/changelog", [ "@semantic-release/github",