Skip to content

Commit a1ec169

Browse files
azhirnovTheMostDiligent
authored andcommitted
CI: added create_cmake script, added -j2
1 parent cc3f67a commit a1ec169

6 files changed

Lines changed: 33 additions & 40 deletions

File tree

.github/workflows/ios.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ jobs:
4545
if: success()
4646
shell: bash
4747
run: |
48-
echo "cmake_minimum_required(VERSION 3.6)" > CMakeLists.txt
49-
echo "Project(DiligentTools_Test)" >> CMakeLists.txt
50-
echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt
51-
echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt
48+
cd $GITHUB_WORKSPACE/DiligentTools/BuildTools/Scripts/github_actions
49+
chmod +x create_cmake.sh
50+
./create_cmake.sh "$GITHUB_WORKSPACE"
5251
cd $GITHUB_WORKSPACE/DiligentCore/BuildTools/Scripts/github_actions
5352
chmod +x configure_cmake.sh
5453
./configure_cmake.sh "ios" "${{runner.workspace}}" ${{ matrix.config }}
@@ -57,4 +56,4 @@ jobs:
5756
if: success()
5857
working-directory: ${{runner.workspace}}/build
5958
shell: bash
60-
run: cmake --build . --config ${{ matrix.config }} --target install
59+
run: cmake --build . --config ${{ matrix.config }} --target install -j2

.github/workflows/linux.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ jobs:
4545
CXX: g++-9
4646
shell: bash
4747
run: |
48-
echo "cmake_minimum_required(VERSION 3.6)" > CMakeLists.txt
49-
echo "Project(DiligentTools_Test)" >> CMakeLists.txt
50-
echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt
51-
echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt
48+
cd $GITHUB_WORKSPACE/DiligentTools/BuildTools/Scripts/github_actions
49+
chmod +x create_cmake.sh
50+
./create_cmake.sh "$GITHUB_WORKSPACE"
5251
cd $GITHUB_WORKSPACE/DiligentCore/BuildTools/Scripts/github_actions
5352
chmod +x configure_cmake.sh
5453
./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }}
@@ -57,7 +56,7 @@ jobs:
5756
if: success()
5857
working-directory: ${{runner.workspace}}/build
5958
shell: bash
60-
run: cmake --build . --config ${{ matrix.config }} --target install
59+
run: cmake --build . --config ${{ matrix.config }} --target install -j2
6160

6261
- name: DiligentToolsTest
6362
if: success()
@@ -107,10 +106,9 @@ jobs:
107106
CXX: clang++-9
108107
shell: bash
109108
run: |
110-
echo "cmake_minimum_required(VERSION 3.6)" > CMakeLists.txt
111-
echo "Project(DiligentTools_Test)" >> CMakeLists.txt
112-
echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt
113-
echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt
109+
cd $GITHUB_WORKSPACE/DiligentTools/BuildTools/Scripts/github_actions
110+
chmod +x create_cmake.sh
111+
./create_cmake.sh "$GITHUB_WORKSPACE"
114112
cd $GITHUB_WORKSPACE/DiligentCore/BuildTools/Scripts/github_actions
115113
chmod +x configure_cmake.sh
116114
./configure_cmake.sh "linux" "${{runner.workspace}}" ${{ matrix.config }}
@@ -119,7 +117,7 @@ jobs:
119117
if: success()
120118
working-directory: ${{runner.workspace}}/build
121119
shell: bash
122-
run: cmake --build . --config ${{ matrix.config }} --target install
120+
run: cmake --build . --config ${{ matrix.config }} --target install -j2
123121

124122
- name: DiligentToolsTest
125123
if: success()

.github/workflows/macos.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ jobs:
4545
if: success()
4646
shell: bash
4747
run: |
48-
echo "cmake_minimum_required(VERSION 3.6)" > CMakeLists.txt
49-
echo "Project(DiligentTools_Test)" >> CMakeLists.txt
50-
echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt
51-
echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt
48+
cd $GITHUB_WORKSPACE/DiligentTools/BuildTools/Scripts/github_actions
49+
chmod +x create_cmake.sh
50+
./create_cmake.sh "$GITHUB_WORKSPACE"
5251
cd $GITHUB_WORKSPACE/DiligentCore/BuildTools/Scripts/github_actions
5352
chmod +x configure_cmake.sh
5453
./configure_cmake.sh "macos" "${{runner.workspace}}" ${{ matrix.config }}
@@ -57,7 +56,7 @@ jobs:
5756
if: success()
5857
working-directory: ${{runner.workspace}}/build
5958
shell: bash
60-
run: cmake --build . --config ${{ matrix.config }} --target install
59+
run: cmake --build . --config ${{ matrix.config }} --target install -j2
6160

6261
- name: DiligentToolsTest
6362
if: success()

.github/workflows/uwp.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@ jobs:
3737
if: success()
3838
shell: bash
3939
run: |
40-
echo "cmake_minimum_required(VERSION 3.6)" > CMakeLists.txt
41-
echo "Project(DiligentTools_Test)" >> CMakeLists.txt
42-
echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt
43-
echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt
40+
cd $GITHUB_WORKSPACE/DiligentTools/BuildTools/Scripts/github_actions
41+
./create_cmake.sh "$GITHUB_WORKSPACE"
4442
cd $GITHUB_WORKSPACE/DiligentCore/BuildTools/Scripts/github_actions
4543
./configure_cmake.sh "uwp" "${{runner.workspace}}" ${{ matrix.config }} ${{ matrix.toolset }}
4644
4745
- name: Build
4846
if: success()
4947
working-directory: ${{runner.workspace}}/build
5048
shell: bash
51-
run: cmake --build . --config ${{ matrix.config }} --target install
49+
run: cmake --build . --config ${{ matrix.config }} --target install -j2

.github/workflows/windows.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,16 @@ jobs:
3737
if: success()
3838
shell: bash
3939
run: |
40-
echo "cmake_minimum_required(VERSION 3.6)" > CMakeLists.txt
41-
echo "Project(DiligentTools_Test)" >> CMakeLists.txt
42-
echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt
43-
echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt
40+
cd $GITHUB_WORKSPACE/DiligentTools/BuildTools/Scripts/github_actions
41+
./create_cmake.sh "$GITHUB_WORKSPACE"
4442
cd $GITHUB_WORKSPACE/DiligentCore/BuildTools/Scripts/github_actions
4543
./configure_cmake.sh "win10" "${{runner.workspace}}" ${{ matrix.config }} ${{ matrix.toolset }}
4644
4745
- name: Build
4846
if: success()
4947
working-directory: ${{runner.workspace}}/build
5048
shell: bash
51-
run: cmake --build . --config ${{ matrix.config }} --target install
49+
run: cmake --build . --config ${{ matrix.config }} --target install -j2
5250

5351
- name: DiligentToolsTest
5452
if: success()
@@ -91,18 +89,16 @@ jobs:
9189
if: success()
9290
shell: bash
9391
run: |
94-
echo "cmake_minimum_required(VERSION 3.6)" > CMakeLists.txt
95-
echo "Project(DiligentTools_Test)" >> CMakeLists.txt
96-
echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt
97-
echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt
92+
cd $GITHUB_WORKSPACE/DiligentTools/BuildTools/Scripts/github_actions
93+
./create_cmake.sh "$GITHUB_WORKSPACE"
9894
cd $GITHUB_WORKSPACE/DiligentCore/BuildTools/Scripts/github_actions
9995
./configure_cmake.sh "win10-dev" "${{runner.workspace}}" ${{ matrix.config }} ${{ matrix.toolset }}
10096
10197
- name: Build
10298
if: success()
10399
working-directory: ${{runner.workspace}}/build
104100
shell: bash
105-
run: cmake --build . --config ${{ matrix.config }} --target install
101+
run: cmake --build . --config ${{ matrix.config }} --target install -j2
106102

107103
- name: DiligentToolsTest
108104
if: success()
@@ -145,18 +141,16 @@ jobs:
145141
if: success()
146142
shell: bash
147143
run: |
148-
echo "cmake_minimum_required(VERSION 3.6)" > CMakeLists.txt
149-
echo "Project(DiligentTools_Test)" >> CMakeLists.txt
150-
echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt
151-
echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt
144+
cd $GITHUB_WORKSPACE/DiligentTools/BuildTools/Scripts/github_actions
145+
./create_cmake.sh "$GITHUB_WORKSPACE"
152146
cd $GITHUB_WORKSPACE/DiligentCore/BuildTools/Scripts/github_actions
153147
./configure_cmake.sh "win8" "${{runner.workspace}}" ${{ matrix.config }} ${{ matrix.toolset }}
154148
155149
- name: Build
156150
if: success()
157151
working-directory: ${{runner.workspace}}/build
158152
shell: bash
159-
run: cmake --build . --config ${{ matrix.config }} --target install
153+
run: cmake --build . --config ${{ matrix.config }} --target install -j2
160154

161155
- name: DiligentToolsTest
162156
if: success()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cd $1
2+
echo "cmake_minimum_required(VERSION 3.6)" > CMakeLists.txt
3+
echo "Project(DiligentTools_Test)" >> CMakeLists.txt
4+
echo "add_subdirectory(DiligentCore)" >> CMakeLists.txt
5+
echo "add_subdirectory(DiligentTools)" >> CMakeLists.txt

0 commit comments

Comments
 (0)