Add support for the CROSS_BUILD instruction set
This commit is contained in:
parent
215639ff94
commit
3a6c457095
11
corpus/cross_build.txt
Normal file
11
corpus/cross_build.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
==================
|
||||
Simple
|
||||
==================
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(cross_build_instruction))
|
||||
|
21
examples/7
Normal file
21
examples/7
Normal file
|
@ -0,0 +1,21 @@
|
|||
FROM opuscapita/minsk-core-ci:1
|
||||
|
||||
# install az
|
||||
|
||||
# get rid of warnings about missing terminal etc.
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Install Azure CLI according to https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest
|
||||
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
|
||||
|
||||
# install Kubectl
|
||||
ARG KUBECTL_VERSION=1.17.7
|
||||
RUN curl -fLk -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl \
|
||||
&& chmod +x /usr/bin/kubectl
|
||||
|
||||
# Install Helm
|
||||
ARG HELM_VERSION=2.17.0
|
||||
RUN curl -fLk -o /usr/bin/helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-linux-amd64.tar.gz \
|
||||
&& cd /usr/bin && tar -xzf ./helm.tar.gz --strip-components=1 -C . linux-amd64/helm \
|
||||
&& chmod +x /usr/bin/helm \
|
||||
&& rm -rf /usr/bin/helm.tar.gz
|
4
examples/8
Normal file
4
examples/8
Normal file
|
@ -0,0 +1,4 @@
|
|||
FROM scratch
|
||||
LABEL maintainer="fabio@vmware.com"
|
||||
COPY govc /
|
||||
ENTRYPOINT [ "/govc"
|
27
examples/9
Normal file
27
examples/9
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ARG BASEIMAGE
|
||||
FROM $BASEIMAGE
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
cuda-samples-$CUDA_PKG_VERSION && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /usr/local/cuda/samples/0_Simple/vectorAdd
|
||||
RUN make
|
||||
|
||||
CMD nvidia-smi && ./vectorAdd
|
|
@ -29,6 +29,7 @@ module.exports = grammar({
|
|||
$.healthcheck_instruction,
|
||||
$.shell_instruction,
|
||||
$.maintainer_instruction,
|
||||
$.cross_build_instruction,
|
||||
),
|
||||
|
||||
from_instruction: $ => seq(
|
||||
|
@ -192,6 +193,11 @@ module.exports = grammar({
|
|||
alias(/[mM][aA][iI][nN][tT][aA][iI][nN][eE][rR]/, "MAINTAINER"),
|
||||
/.*/,
|
||||
),
|
||||
|
||||
cross_build_instruction: $ => seq(
|
||||
alias(/[cC][rR][oO][sS][sS]_[bB][uU][iI][lL][dD][a-zA-Z_]*/, "CROSS_BUILD"),
|
||||
/.*/,
|
||||
),
|
||||
|
||||
path: $ => seq(
|
||||
choice(
|
||||
|
|
|
@ -91,6 +91,10 @@
|
|||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "maintainer_instruction"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "cross_build_instruction"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -797,6 +801,24 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"cross_build_instruction": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "ALIAS",
|
||||
"content": {
|
||||
"type": "PATTERN",
|
||||
"value": "[cC][rR][oO][sS][sS]_[bB][uU][iI][lL][dD][a-zA-Z_]*"
|
||||
},
|
||||
"named": false,
|
||||
"value": "CROSS_BUILD"
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": ".*"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
|
|
|
@ -91,6 +91,11 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "cross_build_instruction",
|
||||
"named": true,
|
||||
"fields": {}
|
||||
},
|
||||
{
|
||||
"type": "double_quoted_string",
|
||||
"named": true,
|
||||
|
@ -432,6 +437,10 @@
|
|||
"type": "copy_instruction",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "cross_build_instruction",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "entrypoint_instruction",
|
||||
"named": true
|
||||
|
@ -597,6 +606,10 @@
|
|||
"type": "copy_instruction",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "cross_build_instruction",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "entrypoint_instruction",
|
||||
"named": true
|
||||
|
@ -825,6 +838,10 @@
|
|||
"type": "COPY",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "CROSS_BUILD",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "ENTRYPOINT",
|
||||
"named": false
|
||||
|
|
8127
src/parser.c
8127
src/parser.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue