mirror of
				https://github.com/threeal/cmake-action.git
				synced 2025-11-03 21:33:42 +00:00 
			
		
		
		
	
						commit
						8468e0d7d2
					
				
							
								
								
									
										37
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										37
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							@ -3,11 +3,11 @@ on:
 | 
				
			|||||||
  workflow_dispatch:
 | 
					  workflow_dispatch:
 | 
				
			||||||
  push:
 | 
					  push:
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  use-action:
 | 
					  default-usage:
 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					    runs-on: ${{ matrix.os }}-latest
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
        os: [windows-latest, ubuntu-latest, macos-latest]
 | 
					        os: [windows, ubuntu, macos]
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout repository
 | 
					      - name: Checkout repository
 | 
				
			||||||
        uses: actions/checkout@v3.3.0
 | 
					        uses: actions/checkout@v3.3.0
 | 
				
			||||||
@ -19,9 +19,9 @@ jobs:
 | 
				
			|||||||
        uses: ./
 | 
					        uses: ./
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run build result
 | 
					      - name: Run build result
 | 
				
			||||||
        run: ${{ matrix.os == 'windows-latest' && 'build\Debug\hello_world.exe' || 'build/hello_world' }}
 | 
					        run: ${{ matrix.os == 'windows' && 'build\Debug\hello_world.exe' || 'build/hello_world' }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  use-action-with-specified-dir:
 | 
					  specified-dir-usage:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout repository
 | 
					      - name: Checkout repository
 | 
				
			||||||
@ -39,26 +39,11 @@ jobs:
 | 
				
			|||||||
      - name: Check if the default build directory does not exist
 | 
					      - name: Check if the default build directory does not exist
 | 
				
			||||||
        run: test ! -d build
 | 
					        run: test ! -d build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  use-action-with-specified-targets:
 | 
					  specified-compiler-usage:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ${{ matrix.os }}-latest
 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: Checkout repository
 | 
					 | 
				
			||||||
        uses: actions/checkout@v3.3.0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Use this action with specified targets
 | 
					 | 
				
			||||||
        uses: ./
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          source-dir: test
 | 
					 | 
				
			||||||
          targets: test_c test_cpp
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Run build result
 | 
					 | 
				
			||||||
        run: build/test_c && build/test_cpp
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  use-action-with-specified-compiler:
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
        os: [windows-latest, ubuntu-latest, macos-latest]
 | 
					        os: [windows, ubuntu, macos]
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout repository
 | 
					      - name: Checkout repository
 | 
				
			||||||
        uses: actions/checkout@v3.3.0
 | 
					        uses: actions/checkout@v3.3.0
 | 
				
			||||||
@ -76,11 +61,11 @@ jobs:
 | 
				
			|||||||
      - name: Run build result
 | 
					      - name: Run build result
 | 
				
			||||||
        run: build/test_c && build/test_cpp
 | 
					        run: build/test_c && build/test_cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  use-action-with-specified-generator:
 | 
					  specified-generator-usage:
 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					    runs-on: ${{ matrix.os }}-latest
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
        os: [windows-latest, ubuntu-latest, macos-latest]
 | 
					        os: [windows, ubuntu, macos]
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout repository
 | 
					      - name: Checkout repository
 | 
				
			||||||
        uses: actions/checkout@v3.3.0
 | 
					        uses: actions/checkout@v3.3.0
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user