From d09ceebbb642c2725555f8ac39aad201f018fe82 Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Tue, 11 Feb 2025 20:07:46 -0700 Subject: [PATCH 1/5] ci: run tests on all operating systems --- .github/workflows/ci.yml | 53 +++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4c6a1c..832ce97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,30 +3,43 @@ name: CI on: # Manually triggered testing workflow_dispatch: + + # Called from another work flow + workflow_call: push: - # Check every PR to main - pull_request: - branches: - - main jobs: - docker-test: - runs-on: ubuntu-latest + build: + name: Run Tests + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + include: + - os: ubuntu-latest + release_suffix: out + - os: windows-latest + release_suffix: exe + - os: macos-latest + release_suffix: out + runs-on: ${{ matrix.os }} + steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Run all Tests using Docker - run: | - docker run \ - --interactive \ - --rm \ - -u $(id -u):$(id -g) \ - --volume .:/home/dev/project \ - throwtheswitch/madsciencelab-plugins:1.0.0 \ - ceedling gcov:all - + - uses: actions/checkout@v2 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0' + + - name: Install Ceedling + run: gem install ceedling + + - name: Run Tests + run: ceedling test:all + - name: Upload Coverage Report to Codecov uses: codecov/codecov-action@v5 + if: matrix.os == 'ubuntu-latest' with: - token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file + token: ${{ secrets.CODECOV_TOKEN }} From f9a1f60144f7722fc69c5a3e5ddb1a9f03dc11b0 Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Tue, 11 Feb 2025 20:11:20 -0700 Subject: [PATCH 2/5] ci: fix tests to run gcov --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 832ce97..7ae9e2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: run: gem install ceedling - name: Run Tests - run: ceedling test:all + run: ceedling gcov:all - name: Upload Coverage Report to Codecov uses: codecov/codecov-action@v5 From 1fcb899fa995eccb22e4dcaac8c5c3d64ee4e243 Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Tue, 11 Feb 2025 20:39:51 -0700 Subject: [PATCH 3/5] ci: fix yaml linting issues, run unit tests from cd --- .github/workflows/build.yml | 52 ++++++++++++++++++------------------- .github/workflows/cd.yml | 7 ++++- .github/workflows/ci.yml | 7 +++++ .github/workflows/docs.yml | 2 +- 4 files changed, 40 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d290853..ed9efdf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Build Release - + strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] @@ -21,29 +21,29 @@ jobs: - os: macos-latest release_suffix: out runs-on: ${{ matrix.os }} - + steps: - - uses: actions/checkout@v2 - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.0' - - - name: Install Ceedling - run: gem install ceedling - - - name: Build Release - run: ceedling release - - - - name: Rename build binary - shell: pwsh - run: Move-Item -Path build/release/flowVC.out -Destination build/release/flowVC_${{ runner.os }}.${{ matrix.release_suffix}} - - - name: Upload Build Artifact - uses: actions/upload-artifact@v4 - with: - name: flowVC_${{ runner.os }} - path: build/release/flowVC_${{ runner.os }}.${{ matrix.release_suffix}} - overwrite: true + - uses: actions/checkout@v2 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0' + + - name: Install Ceedling + run: gem install ceedling + + - name: Build Release + run: ceedling release + + + - name: Rename build binary + shell: pwsh + run: Move-Item -Path build/release/flowVC.out -Destination build/release/flowVC_${{ runner.os }}.${{ matrix.release_suffix}} + + - name: Upload Build Artifact + uses: actions/upload-artifact@v4 + with: + name: flowVC_${{ runner.os }} + path: build/release/flowVC_${{ runner.os }}.${{ matrix.release_suffix}} + overwrite: true diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d928bf7..1d1ed4f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -8,11 +8,16 @@ on: jobs: + + run-tests: + uses: ./.github/workflows/ci.yml + build-release: uses: ./.github/workflows/build.yml semantic-release: - needs: build-release + needs: [run-tests, build-release] + if: "!contains(github.event.head_commit.message, '[skip ci]')" name: Semantic Release diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ae9e2e..fdbd49b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +--- name: CI on: @@ -6,7 +7,13 @@ on: # Called from another work flow workflow_call: + # + pull_request: + - main push: + # Called from CD, prevents duplicate running + branches-ignore: + - main jobs: build: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 556cb98..6f856ae 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,4 +26,4 @@ jobs: uses: JamesIves/github-pages-deploy-action@4.1.4 with: branch: docs - folder: docs/public/ \ No newline at end of file + folder: docs/public/ From 0314a0a3b454553c6866ff8e1ea5454368e876a0 Mon Sep 17 00:00:00 2001 From: Bray Moll Date: Tue, 11 Feb 2025 20:42:25 -0700 Subject: [PATCH 4/5] ci: fix ci syntax --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdbd49b..2b02c12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,10 @@ on: # Called from another work flow workflow_call: - # + pull_request: - - main + branches: + - main push: # Called from CD, prevents duplicate running branches-ignore: From 9678d52a09824fc49a685d78082173b2c95f8058 Mon Sep 17 00:00:00 2001 From: bkm82 <130317980+bkm82@users.noreply.github.com> Date: Tue, 11 Feb 2025 21:20:01 -0700 Subject: [PATCH 5/5] fix: Update README.org and tagging with fix to force a deployment --- README.org | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.org b/README.org index 75689e7..8f43224 100644 --- a/README.org +++ b/README.org @@ -1,11 +1,9 @@ * flowVC - - -[[https://github.com/bkm82/flowVC/actions][https://github.com/bkm82/flowVC/workflows/CI/badge.svg]] -[[https://github.com/bkm82/flowVC/actions][https://github.com/bkm82/flowVC/workflows/CD/badge.svg]] -[[https://github.com/bkm82/flowVC/actions][https://github.com/bkm82/flowVC/workflows/Docs/badge.svg]] +[[../../actions][../../workflows/CI/badge.svg]] +[[../../actions][../../workflows/CD/badge.svg]] +[[../../actions][../../workflows/Docs/badge.svg]] [[https://codecov.io/gh/bkm82/flowVC][https://codecov.io/gh/bkm82/flowVC/graph/badge.svg?token=1U1152BG8T]] Flow Visualization Code forked from FlowPhysics/flowVC @@ -44,7 +42,7 @@ You cannot compute FTLE and particle trajectories at the same time. The feature #+begin_quote [!Note] - Grab a pre-compiled binary for Windows Linux or macOS [[https://github.com/bkm82/flowVC/releases/latest][here]] + Grab a pre-compiled binary for Windows Linux or macOS [[../../releases/latest][here]] Alternatly build it from source as shown below #+end_quote @@ -72,7 +70,7 @@ You cannot compute FTLE and particle trajectories at the same time. The feature #+end_src **** Report any Issues -[[https://github.com/bkm82/flowVC/issues][Issues]] +[[../../issues][Issues]] ** Installation @@ -101,7 +99,7 @@ If you want to edit / modify the code, there are various ways to compile the cod ****** Clone the repository #+begin_src shell - https://github.com/bkm82/flowVC.git + git clone cd flowVC #+end_src ****** To compile and run all of the tests, run @@ -126,7 +124,7 @@ Alternatly, there is a docker image has the tooling installed. ***** Install [[https://docs.docker.com/engine/install/][Docker]] ***** Clone the repository #+begin_src shell - https://github.com/bkm82/flowVC.git + git clone cd flowVC #+end_src