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: | on: | ||||||
|   push: |   push: | ||||||
|     tags: |     tags: | ||||||
|       - '*' |       - "*" | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
|  | @ -12,14 +12,21 @@ jobs: | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v1 |       - uses: actions/checkout@v1 | ||||||
| 
 | 
 | ||||||
|  |       - uses: actions/cache@v2 | ||||||
|  |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
|  | 
 | ||||||
|       - name: Install dependencies |       - name: Install dependencies | ||||||
|         run: | |         run: | | ||||||
|           brew install doxygen |           brew install doxygen | ||||||
|           pip3 install jinja2 Pygments |           pip3 install jinja2 Pygments | ||||||
| 
 | 
 | ||||||
|       - name: Build |       - name: Build | ||||||
|  |         env: | ||||||
|  |           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
|         run: | |         run: | | ||||||
|           cmake -Hdocumentation -Bbuild |           cmake -Sdocumentation -Bbuild | ||||||
|           cmake --build build --target GenerateDocs |           cmake --build build --target GenerateDocs | ||||||
| 
 | 
 | ||||||
|       - name: Publish |       - name: Publish | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								.github/workflows/install.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/install.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -13,12 +13,16 @@ env: | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v1 |       - uses: actions/checkout@v1 | ||||||
| 
 | 
 | ||||||
|  |       - uses: actions/cache@v2 | ||||||
|  |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
|  | 
 | ||||||
|       - name: build and install library |       - name: build and install library | ||||||
|         run: | |         run: | | ||||||
|           cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release |           cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release | ||||||
|  | @ -26,7 +30,9 @@ jobs: | ||||||
|           rm -rf build |           rm -rf build | ||||||
| 
 | 
 | ||||||
|       - name: configure |       - name: configure | ||||||
|       run: cmake -Htest -Bbuild -DTEST_INSTALLED_VERSION=1 |         env: | ||||||
|  |           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
|  |         run: cmake -Stest -Bbuild -DTEST_INSTALLED_VERSION=1 | ||||||
| 
 | 
 | ||||||
|       - name: build |       - name: build | ||||||
|         run: cmake --build build --config Debug -j4 |         run: cmake --build build --config Debug -j4 | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								.github/workflows/macos.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/macos.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -13,14 +13,20 @@ env: | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: macos-latest |     runs-on: macos-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v1 |       - uses: actions/checkout@v1 | ||||||
| 
 | 
 | ||||||
|  |       - uses: actions/cache@v2 | ||||||
|  |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
|  | 
 | ||||||
|       - name: configure |       - name: configure | ||||||
|       run: cmake -Htest -Bbuild -DCMAKE_BUILD_TYPE=Debug |         env: | ||||||
|  |           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
|  |         run: cmake -Stest -Bbuild -DCMAKE_BUILD_TYPE=Debug | ||||||
| 
 | 
 | ||||||
|       - name: build |       - name: build | ||||||
|         run: cmake --build build -j4 |         run: cmake --build build -j4 | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								.github/workflows/standalone.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/standalone.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -10,14 +10,20 @@ on: | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v1 |       - uses: actions/checkout@v1 | ||||||
| 
 | 
 | ||||||
|  |       - uses: actions/cache@v2 | ||||||
|  |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
|  | 
 | ||||||
|       - name: configure |       - name: configure | ||||||
|       run: cmake -Hstandalone -Bbuild -DCMAKE_BUILD_TYPE=Debug |         env: | ||||||
|  |           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
|  |         run: cmake -Sstandalone -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=Debug | ||||||
| 
 | 
 | ||||||
|       - name: build |       - name: build | ||||||
|         run: cmake --build build -j4 |         run: cmake --build build -j4 | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								.github/workflows/style.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/style.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -10,19 +10,25 @@ on: | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: macos-latest |     runs-on: macos-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v1 |       - uses: actions/checkout@v1 | ||||||
| 
 | 
 | ||||||
|  |       - uses: actions/cache@v2 | ||||||
|  |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
|  | 
 | ||||||
|       - name: Install format dependencies |       - name: Install format dependencies | ||||||
|         run: | |         run: | | ||||||
|           brew install clang-format |           brew install clang-format | ||||||
|           pip3 install cmake_format==0.6.11 pyyaml |           pip3 install cmake_format==0.6.11 pyyaml | ||||||
| 
 | 
 | ||||||
|       - name: configure |       - name: configure | ||||||
|       run: cmake -Htest -Bbuild |         env: | ||||||
|  |           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
|  |         run: cmake -Stest -Bbuild | ||||||
| 
 | 
 | ||||||
|       - name: check style |       - name: check style | ||||||
|         run: cmake --build build --target check-format |         run: cmake --build build --target check-format | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								.github/workflows/ubuntu.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/ubuntu.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -14,14 +14,20 @@ env: | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v1 |       - uses: actions/checkout@v1 | ||||||
| 
 | 
 | ||||||
|  |       - uses: actions/cache@v2 | ||||||
|  |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
|  | 
 | ||||||
|       - name: configure |       - name: configure | ||||||
|       run: cmake -Htest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug |         env: | ||||||
|  |           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
|  |         run: cmake -Stest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug | ||||||
| 
 | 
 | ||||||
|       - name: build |       - name: build | ||||||
|         run: cmake --build build -j4 |         run: cmake --build build -j4 | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								.github/workflows/windows.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/windows.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -13,14 +13,20 @@ env: | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
| 
 |  | ||||||
|     runs-on: windows-latest |     runs-on: windows-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v1 |       - uses: actions/checkout@v1 | ||||||
| 
 | 
 | ||||||
|  |       - uses: actions/cache@v2 | ||||||
|  |         with: | ||||||
|  |           path: "**/cpm_modules" | ||||||
|  |           key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | ||||||
|  | 
 | ||||||
|       - name: configure |       - name: configure | ||||||
|       run: cmake -Htest -Bbuild |         env: | ||||||
|  |           CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | ||||||
|  |         run: cmake -Stest -Bbuild | ||||||
| 
 | 
 | ||||||
|       - name: build |       - name: build | ||||||
|         run: cmake --build build --config Debug -j4 |         run: cmake --build build --config Debug -j4 | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| set(CPM_DOWNLOAD_VERSION 0.27.2) | set(CPM_DOWNLOAD_VERSION 0.28.0) | ||||||
| 
 | 
 | ||||||
| if(CPM_SOURCE_CACHE) | if(CPM_SOURCE_CACHE) | ||||||
|   set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") |   set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue