Skip to content

Commit

Permalink
Run (c)make commands in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Roberts committed Jan 18, 2025
1 parent f963373 commit d360a30
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/actions/test-driver/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ runs:
./test_driver.sh \
--testtype CUSTOM \
--env env/docker.sh \
--buildjobs $(nproc) \
--tpls ${{ inputs.tpls }} \
--sunrealtype ${{ inputs.precision }} \
--indexsize ${{ inputs.indexsize }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docs-pdfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
pip install -r doc/requirements.txt
- name: Build docs
run: cd doc/install_guide && make latexpdf
run: cd doc/install_guide && make -j$(nproc) latexpdf

- name: Archive files from failed build
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
pip install -r doc/requirements.txt
- name: Build docs
run: cd doc/${{matrix.package}}/guide && make latexpdf
run: cd doc/${{matrix.package}}/guide && make -j$(nproc) latexpdf
# run: cd doc/${{matrix.package}}/${{matrix.type}} && make latexpdf

- name: Archive files from failed build
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
pip install -r doc/requirements.txt
- name: Build docs
run: cd doc/${{matrix.package}}/examples && make latexpdf
run: cd doc/${{matrix.package}}/examples && make -j$(nproc) latexpdf

- name: Archive files from failed build
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
submodules: true

- name: Build docs
run: cd doc/${{matrix.package}} && make ex
run: cd doc/${{matrix.package}} && make -j$(nproc) ex

- name: Archive files from failed build
uses: actions/upload-artifact@v4
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/macos-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: cmake \
--build ${{github.workspace}}/build \
--parallel $(sysctl -n hw.ncpu) \
--config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ubuntu-clang-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: cmake \
--build ${{github.workspace}}/build \
--parallel $(nproc) \
--config ${{env.BUILD_TYPE}}

- name: Test
# Run logging tests
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ubuntu-latest-oneapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ jobs:
-D ENABLE_SYCL=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: cmake \
--build ${{github.workspace}}/build \
--parallel $(nproc) \
--config ${{env.BUILD_TYPE}}
4 changes: 2 additions & 2 deletions .github/workflows/windows-latest-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: cmake -G "Ninja" -B ${{github.workspace}}/build_static -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_ENABLE_UNIT_TESTS=OFF -DEXAMPLES_ENABLE_CXX=ON

- name: Build (Static)
run: cmake --build ${{github.workspace}}/build_static --verbose
run: cmake --build ${{github.workspace}}/build_static --parallel $NUMBER_OF_PROCESSORS --verbose

- name: Test (Static)
working-directory: ${{github.workspace}}/build_static
Expand All @@ -43,7 +43,7 @@ jobs:
run: cmake -G "Ninja" -B ${{github.workspace}}/build_shared -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_COMPILER=icx-cl -DCMAKE_CXX_COMPILER=icx-cl -DCMAKE_Fortran_COMPILER=ifx -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_FORTRAN_MODULE_INTERFACE=ON -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_ENABLE_UNIT_TESTS=OFF -DEXAMPLES_ENABLE_CXX=ON

- name: Build (Shared)
run: cmake --build ${{github.workspace}}/build_shared --verbose
run: q ${{github.workspace}}/build_shared --parallel $NUMBER_OF_PROCESSORS --verbose

- name: Test (Shared)
working-directory: ${{github.workspace}}/build_shared
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows-latest-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Build (Static)
# Build program
run: cmake --build ${GITHUB_WORKSPACE}/build_static --verbose
run: cmake --build ${GITHUB_WORKSPACE}/build_static --parallel $NUMBER_OF_PROCESSORS --verbose

- name: Test (Static)
working-directory: ${{github.workspace}}/build_static
Expand All @@ -91,7 +91,7 @@ jobs:
- name: Build (Shared)
# Build program
run: cmake --build ${GITHUB_WORKSPACE}/build_shared --verbose
run: cmake --build ${GITHUB_WORKSPACE}/build_shared --parallel $NUMBER_OF_PROCESSORS --verbose

- name: Test (Shared)
working-directory: ${{github.workspace}}/build_shared
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: cmake -G "Visual Studio 17 2022" -B ${{github.workspace}}/build -DSUNDIALS_BUILD_WITH_PROFILING=ON -DSUNDIALS_TEST_ENABLE_UNIT_TESTS=ON -DEXAMPLES_ENABLE_CXX=ON

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $NUMBER_OF_PROCESSORS --verbose

- name: Test
working-directory: ${{github.workspace}}/build
Expand Down

0 comments on commit d360a30

Please sign in to comment.