summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2020-05-18 18:30:42 +0200
committerJan Niklas Hasse <jhasse@bixense.com>2020-05-18 18:30:42 +0200
commit2127dab42c92b39d87d99f5b24e880fb61c1278f (patch)
tree1c8b18a847d26ee8f8cde879c0fce7cd8b7fd97a
parent281618a81b8b00cff7c7b71e9fc7c5077b70de95 (diff)
downloadninja-2127dab42c92b39d87d99f5b24e880fb61c1278f.tar.gz
GitHub Actions: Build and test both Debug and Release configs
-rw-r--r--.github/workflows/linux.yml55
1 files changed, 37 insertions, 18 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index 20878ba..5bfd3af 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -67,26 +67,45 @@ jobs:
sudo apt update
sudo apt install -y python3-pytest ninja-build clang-tidy-9
pip install cmake==3.17.*
+
- name: Configure (GCC)
- run: cmake -Bbuild-gcc -DCMAKE_BUILD_TYPE=Debug -GNinja
- - name: Build (GCC)
- run: ninja
- working-directory: build-gcc
- - name: Unit tests (GCC)
- run: ./build-gcc/ninja_test
- - name: Python tests (GCC)
- run: pytest-3 --color=yes ..
- working-directory: build-gcc
+ run: cmake -Bbuild-gcc -DCMAKE_BUILD_TYPE=Debug -G'Ninja Multi-Config'
+
+ - name: Build (GCC, Debug)
+ run: cmake --build build-gcc --config Debug
+ - name: Unit tests (GCC, Debug)
+ run: ./build-gcc/Debug/ninja_test
+ - name: Python tests (GCC, Debug)
+ run: pytest-3 --color=yes ../..
+ working-directory: build-gcc/Debug
+
+ - name: Build (GCC, Release)
+ run: cmake --build build-gcc --config Release
+ - name: Unit tests (GCC, Release)
+ run: ./build-gcc/Release/ninja_test
+ - name: Python tests (GCC, Release)
+ run: pytest-3 --color=yes ../..
+ working-directory: build-gcc/Release
+
- name: Configure (Clang)
- run: CC=clang-9 CXX=clang++-9 cmake -Bbuild-clang -DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=1
- - name: Build (Clang)
- run: ninja
- working-directory: build-clang
- - name: Unit tests (Clang)
- run: ./build-clang/ninja_test
- - name: Python tests (Clang)
- run: pytest-3 --color=yes ..
- working-directory: build-clang
+ run: CC=clang-9 CXX=clang++-9 cmake -Bbuild-clang -DCMAKE_BUILD_TYPE=Debug -G'Ninja Multi-Config' -DCMAKE_EXPORT_COMPILE_COMMANDS=1
+
+ - name: Build (Clang, Debug)
+ run: cmake --build build-clang --config Debug
+ - name: Unit tests (Clang, Debug)
+ run: ./build-clang/Debug/ninja_test
+ - name: Python tests (Clang, Debug)
+ run: pytest-3 --color=yes ../..
+ working-directory: build-clang/Debug
+
+ - name: Build (Clang, Release)
+ run: cmake --build build-clang --config Release
+ - name: Unit tests (Clang, Release)
+ run: ./build-clang/Release/ninja_test
+ - name: Python tests (Clang, Release)
+ run: pytest-3 --color=yes ../..
+ working-directory: build-clang/Release
+
- name: clang-tidy
run: /usr/lib/llvm-9/share/clang/run-clang-tidy.py -header-filter=src
working-directory: build-clang