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 d4c6a1c..2b02c12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,32 +1,53 @@ +--- name: CI on: # Manually triggered testing workflow_dispatch: - push: - # Check every PR to main + + # Called from another work flow + workflow_call: + pull_request: branches: - main + push: + # Called from CD, prevents duplicate running + branches-ignore: + - 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 gcov: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 }} 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/ 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