Skip to content

Commit

Permalink
master: workflows: Parallel make check.
Browse files Browse the repository at this point in the history
conda-ubuntu-macos.yml: more simplification.
  • Loading branch information
bradbell committed Jan 24, 2025
1 parent dc3bd19 commit af86194
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 17 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/conda-ubuntu-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Checkout submodules
run: |
git submodule update --init
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: cppad
python-version: 3.12
channels: conda-forge
auto-update-conda: true

Expand All @@ -47,20 +42,20 @@ jobs:
if [ "$RUNNER_OS" == "macOS" ]
then
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
n_job=$(sysctl -n hw.ncpu)
else
n_job=$(nproc)
fi
conda activate cppad
echo $CONDA_PREFIX
mkdir build
cd build
cmake .. \
-D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-D PYTHON_EXECUTABLE=$(which python3)
make
export CTEST_OUTPUT_ON_FAILURE=1
make check
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
echo "make -j $n_job check"
make -j $n_job check
make install
- name: Uninstall CppAD
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conda-windows-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ jobs:
..
:: Build
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target check install
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target check install --parallel 4
3 changes: 1 addition & 2 deletions .github/workflows/conda-windows-eigen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,4 @@ jobs:
-D cppad_cxx_flags="/MP /EHs /EHc /std:c++17 /Zc:__cplusplus" ^
..
REM Build and run tests.
echo cmake --build . --target check
cmake --build . --target check
cmake --build . --target check --parallel 4
2 changes: 1 addition & 1 deletion .github/workflows/conda-windows-v142.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
..
:: Build, check and Install
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target check install --parallel 1
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target check install --parallel 4
2 changes: 1 addition & 1 deletion .github/workflows/uraimo_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ jobs:
n_job=$(sysctl -n hw.ncpu)
fi
echo "make -j $n_job check"
make -j $(nproc) check
make -j $n_job check
- run: echo "job.status = ${{ job.status }}"
2 changes: 1 addition & 1 deletion .github/workflows/windows-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
cmake -G "MSYS Makefiles" -D cppad_static_lib=TRUE ..
#
# check
cmake --build . --target check --parallel 1
cmake --build . --target check --parallel 4

0 comments on commit af86194

Please sign in to comment.