Skip to content

Commit

Permalink
GitHub actions: updated CMake parameter passing
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Sep 23, 2021
1 parent 697d1fa commit 1d90af5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
shell: bash
run: |
cd $GITHUB_WORKSPACE/BuildTools/Scripts/github_actions
./configure_cmake.sh "emscripten" "${{runner.workspace}}" ${{ matrix.config }}
./configure_cmake.sh "emscripten" "${{runner.workspace}}" ${{ matrix.config }} "-DDILIGENT_BUILD_TESTS=ON"
- name: Build
if: success()
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/BuildTools/Scripts/github_actions
chmod +x configure_cmake.sh
./configure_cmake.sh "emscripten" "${{runner.workspace}}" ${{ matrix.config }}
./configure_cmake.sh "emscripten" "${{runner.workspace}}" ${{ matrix.config }} "-DDILIGENT_BUILD_TESTS=ON"
- name: Build
if: success()
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/BuildTools/Scripts/github_actions
chmod +x configure_cmake.sh
./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }}
./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }} "-DDILIGENT_BUILD_TESTS=ON"
- name: Build
if: success()
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/BuildTools/Scripts/github_actions
chmod +x configure_cmake.sh
./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }}
./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }} "-DDILIGENT_BUILD_TESTS=ON"
- name: Build
if: success()
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/BuildTools/Scripts/github_actions
chmod +x configure_cmake.sh
./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }} "-DDILIGENT_NO_OPENGL=ON -DDILIGENT_NO_GLSLANG=ON"
./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }} "-DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_OPENGL=ON -DDILIGENT_NO_GLSLANG=ON"
- name: Build
if: success()
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/BuildTools/Scripts/github_actions
chmod +x configure_cmake.sh
./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }} "-DDILIGENT_NO_GLSLANG=ON -DDILIGENT_NO_HLSL=ON"
./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }} "-DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_GLSLANG=ON -DDILIGENT_NO_HLSL=ON"
- name: Build
if: success()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/BuildTools/Scripts/github_actions
chmod +x configure_cmake.sh
./configure_cmake.sh "macos" "${{runner.workspace}}" ${{ matrix.config }}
./configure_cmake.sh "macos" "${{runner.workspace}}" ${{ matrix.config }} "-DDILIGENT_BUILD_TESTS=ON"
- name: Build
if: success()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/uwp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
shell: bash
run: |
cd $GITHUB_WORKSPACE/BuildTools/Scripts/github_actions
./configure_cmake.sh "uwp" "${{runner.workspace}}" ${{ matrix.config }} ${{ matrix.toolset }}
./configure_cmake.sh "uwp" "${{runner.workspace}}" ${{ matrix.toolset }} ${{ matrix.config }} "-DDILIGENT_LOAD_PIX_EVENT_RUNTIME=ON"
- name: Build
if: success()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
shell: bash
run: |
cd $GITHUB_WORKSPACE/BuildTools/Scripts/github_actions
./configure_cmake.sh "win10" "${{runner.workspace}}" ${{ matrix.config }} ${{ matrix.toolset }}
./configure_cmake.sh "win" "${{runner.workspace}}" ${{ matrix.toolset }} ${{ matrix.config }} "-DDILIGENT_BUILD_TESTS=ON"
- name: Build
if: success()
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
shell: bash
run: |
cd $GITHUB_WORKSPACE/BuildTools/Scripts/github_actions
./configure_cmake.sh "win10-dev" "${{runner.workspace}}" ${{ matrix.config }} ${{ matrix.toolset }}
./configure_cmake.sh "win" "${{runner.workspace}}" ${{ matrix.toolset }} ${{ matrix.config }} "-DDILIGENT_BUILD_TESTS=ON -DDILIGENT_DEVELOPMENT=ON -DDILIGENT_LOAD_PIX_EVENT_RUNTIME=ON"
- name: Build
if: success()
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
shell: bash
run: |
cd $GITHUB_WORKSPACE/BuildTools/Scripts/github_actions
./configure_cmake.sh "win8" "${{runner.workspace}}" ${{ matrix.config }} ${{ matrix.toolset }}
./configure_cmake.sh "win" "${{runner.workspace}}" ${{ matrix.toolset }} ${{ matrix.config }} "-DDILIGENT_BUILD_TESTS=ON -DCMAKE_SYSTEM_VERSION=8.1 -DDILIGENT_LOAD_PIX_EVENT_RUNTIME=ON"
- name: Build
if: success()
Expand Down
20 changes: 6 additions & 14 deletions BuildTools/Scripts/github_actions/configure_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,16 @@ cd "$2"
mkdir build
cd ./build

if [ "$1" = "win10" ]; then
cmake $GITHUB_WORKSPACE -G "Visual Studio 16 2019" -A $4 -DCMAKE_BUILD_TYPE=$3 -DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_FORMAT_VALIDATION=ON -DCMAKE_INSTALL_PREFIX=install ..
fi

if [ "$1" = "win10-dev" ]; then
cmake $GITHUB_WORKSPACE -G "Visual Studio 16 2019" -A $4 -DCMAKE_BUILD_TYPE=$3 -DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_FORMAT_VALIDATION=ON -DDILIGENT_LOAD_PIX_EVENT_RUNTIME=ON -DCMAKE_INSTALL_PREFIX=install -DDILIGENT_DEVELOPMENT=ON ..
fi

if [ "$1" = "win8" ]; then
cmake $GITHUB_WORKSPACE -G "Visual Studio 16 2019" -A $4 -DCMAKE_BUILD_TYPE=$3 -DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_FORMAT_VALIDATION=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_SYSTEM_VERSION=8.1 ..
if [ "$1" = "win" ]; then
cmake $GITHUB_WORKSPACE -G "Visual Studio 16 2019" -A $3 -DCMAKE_BUILD_TYPE=$4 $5 -DDILIGENT_NO_FORMAT_VALIDATION=ON -DCMAKE_INSTALL_PREFIX=install ..
fi

if [ "$1" = "uwp" ]; then
cmake $GITHUB_WORKSPACE -G "Visual Studio 16 2019" -A $4 -DCMAKE_BUILD_TYPE=$3 -DDILIGENT_NO_FORMAT_VALIDATION=ON -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -DDILIGENT_LOAD_PIX_EVENT_RUNTIME=ON -DCMAKE_INSTALL_PREFIX=install ..
cmake $GITHUB_WORKSPACE -G "Visual Studio 16 2019" -A $3 -DCMAKE_BUILD_TYPE=$4 $5 -DDILIGENT_NO_FORMAT_VALIDATION=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
fi

if [ "$1" = "macos" ]; then
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$3 $4 -DDILIGENT_BUILD_TESTS=ON -DVULKAN_SDK="$VULKAN_SDK" -DDILIGENT_NO_FORMAT_VALIDATION=ON -DCMAKE_INSTALL_PREFIX=install ..
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$3 $4 -DVULKAN_SDK="$VULKAN_SDK" -DDILIGENT_NO_FORMAT_VALIDATION=ON -DCMAKE_INSTALL_PREFIX=install ..
fi

if [ "$1" = "ios" ]; then
Expand All @@ -36,9 +28,9 @@ if [ "$1" = "tvos" ]; then
fi

if [ "$1" = "linux" ]; then
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$3 $4 -DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_FORMAT_VALIDATION=ON -DCMAKE_INSTALL_PREFIX=install ..
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$3 $4 -DDILIGENT_NO_FORMAT_VALIDATION=ON -DCMAKE_INSTALL_PREFIX=install ..
fi

if [ "$1" = "emscripten" ]; then
emcmake cmake $GITHUB_WORKSPACE -G "Ninja" -DCMAKE_BUILD_TYPE=$3 -DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_FORMAT_VALIDATION=ON -DCMAKE_INSTALL_PREFIX=install ..
emcmake cmake $GITHUB_WORKSPACE -G "Ninja" -DCMAKE_BUILD_TYPE=$3 $4 -DDILIGENT_NO_FORMAT_VALIDATION=ON -DCMAKE_INSTALL_PREFIX=install ..
fi

0 comments on commit 1d90af5

Please sign in to comment.