mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 02:01:33 +01:00 
			
		
		
		
	Update CPM.cmake and cache dependencies in workflows (#70)
* update CPM.cmake to 0.28.0 * cache CPM.cmake dependencies * create modules directory if it doesn't exist on windows * experiment with env variable * experiment 2 * experiment 3 * use env for all workflows * make cache keys OS dependent * replace env.GITHUB_ with github.workspace * format workflow files * update cache key * use unique key for each workflow
This commit is contained in:
		
							parent
							
								
									8dc50e5294
								
							
						
					
					
						commit
						8ba41ae49c
					
				
					 8 changed files with 123 additions and 80 deletions
				
			
		
							
								
								
									
										11
									
								
								.github/workflows/documentation.yaml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								.github/workflows/documentation.yaml
									
										
									
									
										vendored
									
									
								
							|  | @ -3,7 +3,7 @@ name: Documentation | |||
| on: | ||||
|   push: | ||||
|     tags: | ||||
|       - '*' | ||||
|       - "*" | ||||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
|  | @ -12,14 +12,21 @@ jobs: | |||
|     steps: | ||||
|       - uses: actions/checkout@v1 | ||||
| 
 | ||||
|       - uses: actions/cache@v2 | ||||
|         with: | ||||
|           path: "**/cpm_modules" | ||||
|           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||
| 
 | ||||
|       - name: Install dependencies | ||||
|         run: | | ||||
|           brew install doxygen | ||||
|           pip3 install jinja2 Pygments | ||||
| 
 | ||||
|       - name: Build | ||||
|         env: | ||||
|           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||
|         run: | | ||||
|           cmake -Hdocumentation -Bbuild | ||||
|           cmake -Sdocumentation -Bbuild | ||||
|           cmake --build build --target GenerateDocs | ||||
| 
 | ||||
|       - name: Publish | ||||
|  |  | |||
							
								
								
									
										40
									
								
								.github/workflows/install.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										40
									
								
								.github/workflows/install.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -13,25 +13,31 @@ env: | |||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
| 
 | ||||
|     runs-on: ubuntu-latest | ||||
|      | ||||
| 
 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v1 | ||||
|      | ||||
|     - name: build and install library | ||||
|       run: | | ||||
|         cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release | ||||
|         sudo cmake --build build --target install | ||||
|         rm -rf build | ||||
|       - uses: actions/checkout@v1 | ||||
| 
 | ||||
|     - name: configure | ||||
|       run: cmake -Htest -Bbuild -DTEST_INSTALLED_VERSION=1 | ||||
|       - uses: actions/cache@v2 | ||||
|         with: | ||||
|           path: "**/cpm_modules" | ||||
|           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||
| 
 | ||||
|     - name: build | ||||
|       run: cmake --build build --config Debug -j4 | ||||
|       - name: build and install library | ||||
|         run: | | ||||
|           cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release | ||||
|           sudo cmake --build build --target install | ||||
|           rm -rf build | ||||
| 
 | ||||
|     - name: test | ||||
|       run: | | ||||
|         cd build | ||||
|         ctest --build-config Debug | ||||
|       - name: configure | ||||
|         env: | ||||
|           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||
|         run: cmake -Stest -Bbuild -DTEST_INSTALLED_VERSION=1 | ||||
| 
 | ||||
|       - name: build | ||||
|         run: cmake --build build --config Debug -j4 | ||||
| 
 | ||||
|       - name: test | ||||
|         run: | | ||||
|           cd build | ||||
|           ctest --build-config Debug | ||||
|  |  | |||
							
								
								
									
										30
									
								
								.github/workflows/macos.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/macos.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -13,19 +13,25 @@ env: | |||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
| 
 | ||||
|     runs-on: macos-latest | ||||
|      | ||||
| 
 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v1 | ||||
|      | ||||
|     - name: configure | ||||
|       run: cmake -Htest -Bbuild -DCMAKE_BUILD_TYPE=Debug | ||||
|       - uses: actions/checkout@v1 | ||||
| 
 | ||||
|     - name: build | ||||
|       run: cmake --build build -j4 | ||||
|       - uses: actions/cache@v2 | ||||
|         with: | ||||
|           path: "**/cpm_modules" | ||||
|           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||
| 
 | ||||
|     - name: test | ||||
|       run: | | ||||
|         cd build | ||||
|         ctest --build-config Debug | ||||
|       - name: configure | ||||
|         env: | ||||
|           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||
|         run: cmake -Stest -Bbuild -DCMAKE_BUILD_TYPE=Debug | ||||
| 
 | ||||
|       - name: build | ||||
|         run: cmake --build build -j4 | ||||
| 
 | ||||
|       - name: test | ||||
|         run: | | ||||
|           cd build | ||||
|           ctest --build-config Debug | ||||
|  |  | |||
							
								
								
									
										26
									
								
								.github/workflows/standalone.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								.github/workflows/standalone.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -10,17 +10,23 @@ on: | |||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
| 
 | ||||
|     runs-on: ubuntu-latest | ||||
|      | ||||
| 
 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v1 | ||||
|      | ||||
|     - name: configure | ||||
|       run: cmake -Hstandalone -Bbuild -DCMAKE_BUILD_TYPE=Debug | ||||
|       - uses: actions/checkout@v1 | ||||
| 
 | ||||
|     - name: build | ||||
|       run: cmake --build build -j4 | ||||
|       - uses: actions/cache@v2 | ||||
|         with: | ||||
|           path: "**/cpm_modules" | ||||
|           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||
| 
 | ||||
|     - name: run | ||||
|       run: ./build/Greeter | ||||
|       - name: configure | ||||
|         env: | ||||
|           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||
|         run: cmake -Sstandalone -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=Debug | ||||
| 
 | ||||
|       - name: build | ||||
|         run: cmake --build build -j4 | ||||
| 
 | ||||
|       - name: run | ||||
|         run: ./build/Greeter | ||||
|  |  | |||
							
								
								
									
										30
									
								
								.github/workflows/style.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/style.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -10,19 +10,25 @@ on: | |||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
| 
 | ||||
|     runs-on: macos-latest | ||||
|      | ||||
| 
 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v1 | ||||
|      | ||||
|     - name: Install format dependencies | ||||
|       run: | | ||||
|         brew install clang-format | ||||
|         pip3 install cmake_format==0.6.11 pyyaml | ||||
|       - uses: actions/checkout@v1 | ||||
| 
 | ||||
|     - name: configure | ||||
|       run: cmake -Htest -Bbuild | ||||
|       - uses: actions/cache@v2 | ||||
|         with: | ||||
|           path: "**/cpm_modules" | ||||
|           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||
| 
 | ||||
|     - name: check style | ||||
|       run: cmake --build build --target check-format | ||||
|       - name: Install format dependencies | ||||
|         run: | | ||||
|           brew install clang-format | ||||
|           pip3 install cmake_format==0.6.11 pyyaml | ||||
| 
 | ||||
|       - name: configure | ||||
|         env: | ||||
|           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||
|         run: cmake -Stest -Bbuild | ||||
| 
 | ||||
|       - name: check style | ||||
|         run: cmake --build build --target check-format | ||||
|  |  | |||
							
								
								
									
										34
									
								
								.github/workflows/ubuntu.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										34
									
								
								.github/workflows/ubuntu.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -14,22 +14,28 @@ env: | |||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
| 
 | ||||
|     runs-on: ubuntu-latest | ||||
|      | ||||
| 
 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v1 | ||||
|      | ||||
|     - name: configure | ||||
|       run: cmake -Htest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug | ||||
|       - uses: actions/checkout@v1 | ||||
| 
 | ||||
|     - name: build | ||||
|       run: cmake --build build -j4 | ||||
|       - uses: actions/cache@v2 | ||||
|         with: | ||||
|           path: "**/cpm_modules" | ||||
|           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||
| 
 | ||||
|     - name: test | ||||
|       run: | | ||||
|         cd build | ||||
|         ctest --build-config Debug | ||||
|       - name: configure | ||||
|         env: | ||||
|           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||
|         run: cmake -Stest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug | ||||
| 
 | ||||
|     - name: collect code coverage | ||||
|       run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" | ||||
|       - name: build | ||||
|         run: cmake --build build -j4 | ||||
| 
 | ||||
|       - name: test | ||||
|         run: | | ||||
|           cd build | ||||
|           ctest --build-config Debug | ||||
| 
 | ||||
|       - name: collect code coverage | ||||
|         run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" | ||||
|  |  | |||
							
								
								
									
										30
									
								
								.github/workflows/windows.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/windows.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -13,19 +13,25 @@ env: | |||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
| 
 | ||||
|     runs-on: windows-latest | ||||
|      | ||||
| 
 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v1 | ||||
|      | ||||
|     - name: configure | ||||
|       run: cmake -Htest -Bbuild | ||||
|       - uses: actions/checkout@v1 | ||||
| 
 | ||||
|     - name: build | ||||
|       run: cmake --build build --config Debug -j4 | ||||
|       - uses: actions/cache@v2 | ||||
|         with: | ||||
|           path: "**/cpm_modules" | ||||
|           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||
| 
 | ||||
|     - name: test | ||||
|       run: | | ||||
|         cd build | ||||
|         ctest --build-config Debug | ||||
|       - name: configure | ||||
|         env: | ||||
|           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||
|         run: cmake -Stest -Bbuild | ||||
| 
 | ||||
|       - name: build | ||||
|         run: cmake --build build --config Debug -j4 | ||||
| 
 | ||||
|       - name: test | ||||
|         run: | | ||||
|           cd build | ||||
|           ctest --build-config Debug | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue