Skip to content

Commit a1d3f9e

Browse files
authored
CI: Use Ninja for building (#4293)
Makes watching build output on Actions on PRs slightly more pleasant.
1 parent d1a5b4d commit a1d3f9e

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/cmake.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
# These packages are already part of the ubuntu-20.04 image:
2828
# clang-format-10 cmake gcc-10 g++-10 shellcheck libgmp-dev
2929
# These aren't:
30-
run: sudo apt-get install libstdc++-10-dev libmpfr-dev libmpc-dev
30+
run: sudo apt-get install libstdc++-10-dev libmpfr-dev libmpc-dev ninja-build
3131
# If we ever do any qemu-emulation on Github Actions, we should re-enable this:
3232
# e2fsprogs qemu-system-i386 qemu-utils
3333
- name: Use GCC 10 instead
3434
run: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 60 --slave /usr/bin/g++ g++ /usr/bin/g++-10
3535
- name: Check versions
36-
run: set +e; g++ --version; g++-10 --version; clang-format --version; clang-format-10 --version; python --version; python3 --version
36+
run: set +e; g++ --version; g++-10 --version; clang-format --version; clang-format-10 --version; python --version; python3 --version; ninja --version
3737

3838
# === PREPARE FOR BUILDING ===
3939

@@ -60,7 +60,7 @@ jobs:
6060
run: |
6161
mkdir -p Build
6262
cd Build
63-
cmake .. -DBUILD_LAGOM=1 -DALL_THE_DEBUG_MACROS=1
63+
cmake .. -GNinja -DBUILD_LAGOM=1 -DALL_THE_DEBUG_MACROS=1
6464
6565
# === ACTUALLY BUILD AND TEST ===
6666

@@ -72,13 +72,13 @@ jobs:
7272

7373
- name: Build Serenity and Tests
7474
working-directory: ${{ github.workspace }}/Build
75-
run: cmake --build . -j2
75+
run: cmake --build .
7676
- name: Lint (Phase 2/2)
7777
working-directory: ${{ github.workspace }}/Meta
7878
run: ./check-symbols.sh
7979
- name: Run CMake tests
8080
working-directory: ${{ github.workspace }}/Build
81-
run: CTEST_OUTPUT_ON_FAILURE=1 make test
81+
run: CTEST_OUTPUT_ON_FAILURE=1 ninja test
8282
- name: Run JS tests
8383
working-directory: ${{ github.workspace }}/Build/Meta/Lagom
8484
run: DISABLE_DBG_OUTPUT=1 ./test-js
@@ -112,9 +112,11 @@ jobs:
112112
- uses: actions/checkout@v2
113113

114114
# === OS SETUP ===
115-
115+
#
116+
- name: Install dependencies
117+
run: sudo apt-get install ninja-build
116118
- name: Check versions
117-
run: set +e; clang --version; clang++ --version
119+
run: set +e; clang --version; clang++ --version; ninja --version
118120

119121
# === PREPARE FOR BUILDING ===
120122

@@ -126,10 +128,10 @@ jobs:
126128
run: |
127129
mkdir -p Build
128130
cd Build
129-
cmake -DBUILD_LAGOM=ON -DENABLE_FUZZER_SANITIZER=ON -DENABLE_ADDRESS_SANITIZER=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
131+
cmake -GNinja -DBUILD_LAGOM=ON -DENABLE_FUZZER_SANITIZER=ON -DENABLE_ADDRESS_SANITIZER=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
130132
131133
# === ACTUALLY BUILD ===
132134

133135
- name: Build Lagom with Fuzzers
134136
working-directory: ${{ github.workspace }}/Meta/Lagom/Build
135-
run: cmake --build . -j2
137+
run: cmake --build .

0 commit comments

Comments
 (0)