mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-04 03:27:23 -05:00 
			
		
		
		
	
							parent
							
								
									37093befd5
								
							
						
					
					
						commit
						c32f383a01
					
				
							
								
								
									
										38
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										38
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							@ -18,6 +18,23 @@ jobs:
 | 
				
			|||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
        os: [ ubuntu-latest, macos-latest, windows-latest ]
 | 
					        os: [ ubuntu-latest, macos-latest, windows-latest ]
 | 
				
			||||||
        go-version: [ 1.14.x ]
 | 
					        go-version: [ 1.14.x ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Set some variables per OS, usable via ${{ matrix.VAR }}
 | 
				
			||||||
 | 
					        # CADDY_BIN_PATH: the path to the compiled Caddy binary, for artifact publishing
 | 
				
			||||||
 | 
					        # SUCCESS: the typical value for $? per OS (Windows/pwsh returns 'True')
 | 
				
			||||||
 | 
					        include:
 | 
				
			||||||
 | 
					        - os: ubuntu-latest
 | 
				
			||||||
 | 
					          CADDY_BIN_PATH: ./cmd/caddy/caddy
 | 
				
			||||||
 | 
					          SUCCESS: 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        - os: macos-latest
 | 
				
			||||||
 | 
					          CADDY_BIN_PATH: ./cmd/caddy/caddy
 | 
				
			||||||
 | 
					          SUCCESS: 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        - os: windows-latest
 | 
				
			||||||
 | 
					          CADDY_BIN_PATH: ./cmd/caddy/caddy.exe
 | 
				
			||||||
 | 
					          SUCCESS: 'True'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
@ -59,19 +76,11 @@ jobs:
 | 
				
			|||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        go build -trimpath -a -ldflags="-w -s" -v
 | 
					        go build -trimpath -a -ldflags="-w -s" -v
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Publish Build Artifact (Windows)
 | 
					    - name: Publish Build Artifact
 | 
				
			||||||
      if: matrix.os == 'windows-latest'
 | 
					 | 
				
			||||||
      uses: actions/upload-artifact@v1
 | 
					      uses: actions/upload-artifact@v1
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        name: caddy_v2_${{ matrix.os }}
 | 
					        name: caddy_v2_${{ matrix.os }}
 | 
				
			||||||
        path: ./cmd/caddy/caddy.exe
 | 
					        path: ${{ matrix.CADDY_BIN_PATH }}
 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Publish Build Artifact (Linux/Mac)
 | 
					 | 
				
			||||||
      if: matrix.os != 'windows-latest'
 | 
					 | 
				
			||||||
      uses: actions/upload-artifact@v1
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        name: caddy_v2_${{ matrix.os }}
 | 
					 | 
				
			||||||
        path: ./cmd/caddy/caddy
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Commented bits below were useful to allow the job to continue
 | 
					    # Commented bits below were useful to allow the job to continue
 | 
				
			||||||
    # even if the tests fail, so we can publish the report separately
 | 
					    # even if the tests fail, so we can publish the report separately
 | 
				
			||||||
@ -93,13 +102,8 @@ jobs:
 | 
				
			|||||||
    #     (cat ./coverage/coverage.json | gocov-xml) > coverage/coverage.xml
 | 
					    #     (cat ./coverage/coverage.json | gocov-xml) > coverage/coverage.xml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # To return the correct result even though we set 'continue-on-error: true'
 | 
					    # To return the correct result even though we set 'continue-on-error: true'
 | 
				
			||||||
    # - name: Coerce correct build result (Windows)
 | 
					    # - name: Coerce correct build result
 | 
				
			||||||
    #   if: matrix.os == 'windows-latest' && steps.step_test.outputs.status != 'True'
 | 
					    #   if: matrix.os != 'windows-latest' && steps.step_test.outputs.status != ${{ matrix.SUCCESS }}
 | 
				
			||||||
    #   run: |
 | 
					 | 
				
			||||||
    #     echo "step_test ${{ steps.step_test.outputs.status }}\n"
 | 
					 | 
				
			||||||
    #     exit 1
 | 
					 | 
				
			||||||
    # - name: Coerce correct build result (Linux/Mac)
 | 
					 | 
				
			||||||
    #   if: matrix.os != 'windows-latest' && steps.step_test.outputs.status != 0
 | 
					 | 
				
			||||||
    #   run: |
 | 
					    #   run: |
 | 
				
			||||||
    #     echo "step_test ${{ steps.step_test.outputs.status }}\n"
 | 
					    #     echo "step_test ${{ steps.step_test.outputs.status }}\n"
 | 
				
			||||||
    #     exit 1
 | 
					    #     exit 1
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user