mirror of https://github.com/containers/podman.git
				
				
				
			Merge pull request #21372 from cevich/win_mac_lint
Run lint for mac builds
This commit is contained in:
		
						commit
						daf7a2c069
					
				| 
						 | 
					@ -466,6 +466,8 @@ osx_alt_build_task:
 | 
				
			||||||
    # This host is/was shared with potentially many other CI tasks.
 | 
					    # This host is/was shared with potentially many other CI tasks.
 | 
				
			||||||
    # The previous task may have been canceled or aborted.
 | 
					    # The previous task may have been canceled or aborted.
 | 
				
			||||||
    prep_script: &mac_cleanup "contrib/cirrus/mac_cleanup.sh"
 | 
					    prep_script: &mac_cleanup "contrib/cirrus/mac_cleanup.sh"
 | 
				
			||||||
 | 
					    lint_script:
 | 
				
			||||||
 | 
					        - make lint || true  # TODO: Enable when code passes check
 | 
				
			||||||
    basic_build_script:
 | 
					    basic_build_script:
 | 
				
			||||||
        - make .install.ginkgo
 | 
					        - make .install.ginkgo
 | 
				
			||||||
        - make podman-remote
 | 
					        - make podman-remote
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,6 +3,28 @@
 | 
				
			||||||
# Need to run linter twice to cover all the build tags code paths
 | 
					# Need to run linter twice to cover all the build tags code paths
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Dedicated block for Darwin: OS doesn't support the rest of this
 | 
				
			||||||
 | 
					# script, only needs to check 'remote', and its golangci-lint needs
 | 
				
			||||||
 | 
					# specialized arguments.
 | 
				
			||||||
 | 
					if [[ $(uname -s) == "Darwin" ]] || [[ "$GOOS" == "darwin" ]]; then
 | 
				
			||||||
 | 
					  declare -a DARWIN_SKIP_DIRS
 | 
				
			||||||
 | 
					  DARWIN_SKIP_DIRS=(
 | 
				
			||||||
 | 
					    libpod/events
 | 
				
			||||||
 | 
					    pkg/api
 | 
				
			||||||
 | 
					    pkg/domain/infra/abi
 | 
				
			||||||
 | 
					    pkg/machine/qemu
 | 
				
			||||||
 | 
					    pkg/trust
 | 
				
			||||||
 | 
					    test
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					  echo ""
 | 
				
			||||||
 | 
					  echo Running golangci-lint for "remote"
 | 
				
			||||||
 | 
					  echo Build Tags          "remote": remote
 | 
				
			||||||
 | 
					  echo Skipped directories "remote": ${DARWIN_SKIP_DIRS[*]}
 | 
				
			||||||
 | 
					  ./bin/golangci-lint run --build-tags="remote" \
 | 
				
			||||||
 | 
					    --skip-dirs=$(tr ' ' ',' <<<"${DARWIN_SKIP_DIRS[@]}")
 | 
				
			||||||
 | 
					  exit 0  # All done, don't execute anything below, it will break on Darwin
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
declare -A BUILD_TAGS
 | 
					declare -A BUILD_TAGS
 | 
				
			||||||
BUILD_TAGS[default]="apparmor,seccomp,selinux"
 | 
					BUILD_TAGS[default]="apparmor,seccomp,selinux"
 | 
				
			||||||
BUILD_TAGS[abi]="${BUILD_TAGS[default]},systemd"
 | 
					BUILD_TAGS[abi]="${BUILD_TAGS[default]},systemd"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue