Skip to content

Commit

Permalink
Fix rocky workflow due to changes in the profiling triggering (#305)
Browse files Browse the repository at this point in the history
Due to changes in the profiling (made now by a manual trigger), the
workflow in the master for rocky linux presents problems.

Fixes:

- Changed part of the workflow with profiling to a separate file
- Adapted the workflow template
  • Loading branch information
m-mirz authored Jun 12, 2024
2 parents 290aaca + 58313fe commit a317d15
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 50 deletions.
50 changes: 1 addition & 49 deletions .github/workflows/build_test_linux_rocky.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,52 +62,4 @@ jobs:
- name: Build every target
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake --build . --parallel $(nproc)


profiling:
name: Build with Profiling options
runs-on: ubuntu-latest
container: sogno/dpsim:dev-rocky
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Create Build Environment
run: mkdir build

- name: Cache build directory
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/build
key: build-cache-rocky-profiling-${{ github.ref }}

- name: Configure CMake
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DWITH_PROFILING=ON -DWITH_ASAN=ON -DWITH_CUDA=OFF -DFETCH_SPDLOG=ON

- name: Build every target
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake --build . --parallel $(nproc)


## Tests ##
test-examples-1:
name: Test Examples 1/2
needs: [profiling]
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@master
with:
path: ./build/dpsim/examples/cxx/WSCC_9bus_mult_decoupled
name: WSCC_9bus_mult_decoupled

test-examples-2:
name: Test Examples 2/2
needs: [profiling]
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@master
with:
path: ./build/dpsim/examples/cxx/WSCC_9bus_mult_coupled
name: WSCC_9bus_mult_coupled
run: cmake --build . --parallel $(nproc)
54 changes: 54 additions & 0 deletions .github/workflows/build_test_linux_rocky_profiling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build & Profile RockyLinux

on:
workflow_dispatch:

## Build ##

jobs:
profiling:
name: Build with Profiling options
runs-on: ubuntu-latest
container: sogno/dpsim:dev-rocky
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Create Build Environment
run: mkdir build

- name: Cache build directory
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/build
key: build-cache-rocky-profiling-${{ github.ref }}

- name: Configure CMake
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DWITH_PROFILING=ON -DWITH_ASAN=ON -DWITH_CUDA=OFF -DFETCH_SPDLOG=ON

- name: Build every target
shell: bash
working-directory: ${{ github.workspace }}/build
run: cmake --build . --parallel $(nproc)


## Tests ##
test-examples-1:
name: Test Examples 1/2
needs: [profiling]
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@${{github.ref}}
with:
path: ./build/dpsim/examples/cxx/WSCC_9bus_mult_decoupled
name: WSCC_9bus_mult_decoupled

test-examples-2:
name: Test Examples 2/2
needs: [profiling]
uses: sogno-platform/dpsim/.github/workflows/run_and_profile_example.yaml@${{github.ref}}
with:
path: ./build/dpsim/examples/cxx/WSCC_9bus_mult_coupled
name: WSCC_9bus_mult_coupled
2 changes: 1 addition & 1 deletion .github/workflows/run_and_profile_example.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Run the profiler for an example

on:
workflow_dispatch:
workflow_call:
inputs:
path:
description: 'Path to the example to be run'
Expand Down

0 comments on commit a317d15

Please sign in to comment.