Skip to content

Commit

Permalink
Enable parallelism in the CI jobs
Browse files Browse the repository at this point in the history
Hopefully this will speed things up, especially on Windows where builds
are currently taking forever.
  • Loading branch information
stephenswat committed Nov 7, 2024
1 parent 4720e3d commit 1ca0da3
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
wget https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz
tar -xzvf v1.14.0.tar.gz
cmake -S googletest-1.14.0 -B gtest_build -DBUILD_GMOCK=Off -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/.prefixes/gtest/
cmake --build gtest_build
cmake --build gtest_build -- -j $(nproc)
cmake --install gtest_build
- name: Configure
run: cmake
Expand All @@ -69,7 +69,7 @@ jobs:
-S $GITHUB_WORKSPACE
-B build
- name: Build
run: cmake --build build
run: cmake --build build -- -j $(nproc)
- name: Core tests
run: build/tests/core/test_core
- name: CPU tests
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
wget https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz
tar -xzvf v1.14.0.tar.gz
cmake -S googletest-1.14.0 -B gtest_build -DBUILD_GMOCK=Off -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/.prefixes/gtest/
cmake --build gtest_build
cmake --build gtest_build -- -j $(nproc)
cmake --install gtest_build
- name: Configure
run: cmake
Expand All @@ -133,9 +133,11 @@ jobs:
-S $GITHUB_WORKSPACE
-B build
- name: Build
run: cmake --build build
run: cmake --build build -- -j $(nproc)
- name: Core tests
run: build/tests/core/test_core
- name: CPU tests
run: build/tests/cpu/test_cpu

windows-core:
strategy:
Expand All @@ -157,22 +159,22 @@ jobs:
Invoke-WebRequest -Uri "https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz" -OutFile "gtest.tar.gz"
tar -xf gtest.tar.gz
cmake -S .\googletest-1.14.0 -B .\gtest_build -Dgtest_force_shared_crt=On -DBUILD_GMOCK=Off
cmake --build .\gtest_build --config ${{ matrix.BUILD }}
cmake --build .\gtest_build -j $NUMBER_OF_PROCESSORS --config ${{ matrix.BUILD }}
cmake --install .\gtest_build --config ${{ matrix.BUILD }} --prefix ${{ github.workspace }}\.prefix
- name: Install Google Benchmark
run: |
Invoke-WebRequest -Uri "https://github.com/google/benchmark/archive/refs/tags/v1.8.3.tar.gz" -OutFile "gbench.tar.gz"
tar -xf gbench.tar.gz
cmake -S .\benchmark-1.8.3 -B .\gbench_build -DCMAKE_PREFIX_PATH=${{ github.workspace }}\.prefix -DBENCHMARK_ENABLE_TESTING=Off
cmake --build .\gbench_build --config ${{ matrix.BUILD }}
cmake --build .\gbench_build -j $NUMBER_OF_PROCESSORS --config ${{ matrix.BUILD }}
cmake --install .\gbench_build --config ${{ matrix.BUILD }} --prefix ${{ github.workspace }}\.prefix
- name: Install Boost
run: |
Invoke-WebRequest -Uri "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.gz" -OutFile "boost.tar.gz"
tar -xf boost.tar.gz
cd boost_1_83_0
.\bootstrap.bat
.\b2 install --with-log --with-program_options --prefix="${{ github.workspace }}\.prefix"
.\b2 install --with-log --with-program_options --prefix="${{ github.workspace }}\.prefix" -j %NUMBER_OF_PROCESSORS%
- name: Configure
run: cmake
-DCOVFIE_FAIL_ON_WARNINGS=TRUE
Expand All @@ -187,6 +189,8 @@ jobs:
-S ${{ github.workspace }}
-B build
- name: Build
run: cmake --build build --config ${{ matrix.BUILD }}
run: cmake --build build -j $NUMBER_OF_PROCESSORS --config ${{ matrix.BUILD }}
- name: Core tests
run: .\build\tests\core\${{ matrix.BUILD}}\test_core.exe
- name: CPU tests
run: .\build\tests\cpu\${{ matrix.BUILD}}\test_cpu.exe

0 comments on commit 1ca0da3

Please sign in to comment.