mirror of
				https://github.com/google/cpu_features.git
				synced 2025-10-31 13:10:48 +01:00 
			
		
		
		
	 164bcd7eb0
			
		
	
	164bcd7eb0
	
	
	
		
			
			* Move `c99` flag from BUILD file to bazel cmd line Requiring c99 for everyone breaks downstream users. * Remove requiring bzlmod
		
			
				
	
	
		
			32 lines
		
	
	
		
			835 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			835 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| # Create a virtual environment with all tools installed
 | |
| # ref: https://hub.docker.com/_/ubuntu
 | |
| FROM ubuntu:latest AS env
 | |
| 
 | |
| # Install system build dependencies
 | |
| ENV PATH=/usr/local/bin:$PATH
 | |
| RUN apt-get update -qq \
 | |
| && DEBIAN_FRONTEND=noninteractive apt-get install -yq \
 | |
|  git wget build-essential \
 | |
| && apt-get clean \
 | |
| && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 | |
| ENTRYPOINT ["/usr/bin/bash", "-c"]
 | |
| CMD ["/usr/bin/bash"]
 | |
| 
 | |
| # Install Bazelisk
 | |
| ARG PLATFORM
 | |
| RUN wget \
 | |
|  "https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-${PLATFORM}" \
 | |
| && chmod +x "bazelisk-linux-${PLATFORM}" \
 | |
| && mv "bazelisk-linux-${PLATFORM}" /usr/local/bin/bazel
 | |
| 
 | |
| FROM env AS devel
 | |
| WORKDIR /home/project
 | |
| COPY . .
 | |
| 
 | |
| FROM devel AS build
 | |
| RUN bazel version
 | |
| RUN bazel build --config=ci ...
 | |
| 
 | |
| FROM build AS test
 | |
| RUN bazel test  --config=ci ...
 |