mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-02-26 16:52:08 +00:00
Compare commits
2 Commits
main
...
remove-ins
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30c28d912b | ||
|
|
df49ae4272 |
17
.github/workflows/basic-ci-amd64.yaml
vendored
17
.github/workflows/basic-ci-amd64.yaml
vendored
@@ -47,6 +47,23 @@ jobs:
|
||||
env:
|
||||
TARGET_BRANCH: ${{ inputs.target-branch }}
|
||||
|
||||
- name: Install yq
|
||||
run: |
|
||||
./ci/install_yq.sh
|
||||
env:
|
||||
INSTALL_IN_GOPATH: false
|
||||
|
||||
- name: Read properties from versions.yaml
|
||||
run: |
|
||||
go_version="$(yq '.languages.golang.version' versions.yaml)"
|
||||
[ -n "$go_version" ]
|
||||
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup Golang version ${{ env.GO_VERSION }}
|
||||
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: bash tests/integration/cri-containerd/gha-run.sh install-dependencies
|
||||
env:
|
||||
|
||||
19
.github/workflows/basic-ci-s390x.yaml
vendored
19
.github/workflows/basic-ci-s390x.yaml
vendored
@@ -47,8 +47,25 @@ jobs:
|
||||
env:
|
||||
TARGET_BRANCH: ${{ inputs.target-branch }}
|
||||
|
||||
- name: Install yq
|
||||
run: |
|
||||
./ci/install_yq.sh
|
||||
env:
|
||||
INSTALL_IN_GOPATH: false
|
||||
|
||||
- name: Read properties from versions.yaml
|
||||
run: |
|
||||
go_version="$(yq '.languages.golang.version' versions.yaml)"
|
||||
[ -n "$go_version" ]
|
||||
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup Golang version ${{ env.GO_VERSION }}
|
||||
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: bash tests/integration/cri-containerd/gha-run.sh
|
||||
run: bash tests/integration/cri-containerd/gha-run.sh install-dependencies
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
|
||||
@@ -82,11 +82,17 @@ jobs:
|
||||
./ci/install_yq.sh
|
||||
env:
|
||||
INSTALL_IN_GOPATH: false
|
||||
- name: Install golang
|
||||
- name: Read properties from versions.yaml
|
||||
if: contains(matrix.component.needs, 'golang')
|
||||
run: |
|
||||
./tests/install_go.sh -f -p
|
||||
echo "/usr/local/go/bin" >> "$GITHUB_PATH"
|
||||
go_version="$(yq '.languages.golang.version' versions.yaml)"
|
||||
[ -n "$go_version" ]
|
||||
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
|
||||
- name: Setup Golang version ${{ env.GO_VERSION }}
|
||||
if: contains(matrix.component.needs, 'golang')
|
||||
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Setup rust
|
||||
if: contains(matrix.component.needs, 'rust')
|
||||
run: |
|
||||
|
||||
18
.github/workflows/darwin-tests.yaml
vendored
18
.github/workflows/darwin-tests.yaml
vendored
@@ -31,10 +31,22 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install golang
|
||||
- name: Install yq
|
||||
run: |
|
||||
./tests/install_go.sh -f -p
|
||||
echo "/usr/local/go/bin" >> "${GITHUB_PATH}"
|
||||
./ci/install_yq.sh
|
||||
env:
|
||||
INSTALL_IN_GOPATH: false
|
||||
|
||||
- name: Read properties from versions.yaml
|
||||
run: |
|
||||
go_version="$(yq '.languages.golang.version' versions.yaml)"
|
||||
[ -n "$go_version" ]
|
||||
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup Golang version ${{ env.GO_VERSION }}
|
||||
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install Rust
|
||||
run: ./tests/install_rust.sh
|
||||
|
||||
18
.github/workflows/docs-url-alive-check.yaml
vendored
18
.github/workflows/docs-url-alive-check.yaml
vendored
@@ -24,10 +24,22 @@ jobs:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install golang
|
||||
- name: Install yq
|
||||
run: |
|
||||
./tests/install_go.sh -f -p
|
||||
echo "/usr/local/go/bin" >> "${GITHUB_PATH}"
|
||||
./ci/install_yq.sh
|
||||
env:
|
||||
INSTALL_IN_GOPATH: false
|
||||
|
||||
- name: Read properties from versions.yaml
|
||||
run: |
|
||||
go_version="$(yq '.languages.golang.version' versions.yaml)"
|
||||
[ -n "$go_version" ]
|
||||
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup Golang version ${{ env.GO_VERSION }}
|
||||
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Docs URL Alive Check
|
||||
run: |
|
||||
|
||||
18
.github/workflows/govulncheck.yaml
vendored
18
.github/workflows/govulncheck.yaml
vendored
@@ -27,10 +27,22 @@ jobs:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install golang
|
||||
- name: Install yq
|
||||
run: |
|
||||
./tests/install_go.sh -f -p
|
||||
echo "/usr/local/go/bin" >> "${GITHUB_PATH}"
|
||||
./ci/install_yq.sh
|
||||
env:
|
||||
INSTALL_IN_GOPATH: false
|
||||
|
||||
- name: Read properties from versions.yaml
|
||||
run: |
|
||||
go_version="$(yq '.languages.golang.version' versions.yaml)"
|
||||
[ -n "$go_version" ]
|
||||
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup Golang version ${{ env.GO_VERSION }}
|
||||
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install govulncheck
|
||||
run: |
|
||||
|
||||
17
.github/workflows/run-cri-containerd-tests.yaml
vendored
17
.github/workflows/run-cri-containerd-tests.yaml
vendored
@@ -55,6 +55,23 @@ jobs:
|
||||
env:
|
||||
TARGET_BRANCH: ${{ inputs.target-branch }}
|
||||
|
||||
- name: Install yq
|
||||
run: |
|
||||
./ci/install_yq.sh
|
||||
env:
|
||||
INSTALL_IN_GOPATH: false
|
||||
|
||||
- name: Read properties from versions.yaml
|
||||
run: |
|
||||
go_version="$(yq '.languages.golang.version' versions.yaml)"
|
||||
[ -n "$go_version" ]
|
||||
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup Golang version ${{ env.GO_VERSION }}
|
||||
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Install dependencies
|
||||
timeout-minutes: 15
|
||||
run: bash tests/integration/cri-containerd/gha-run.sh install-dependencies
|
||||
|
||||
20
.github/workflows/run-k8s-tests-on-ppc64le.yaml
vendored
20
.github/workflows/run-k8s-tests-on-ppc64le.yaml
vendored
@@ -57,10 +57,24 @@ jobs:
|
||||
env:
|
||||
TARGET_BRANCH: ${{ inputs.target-branch }}
|
||||
|
||||
- name: Install golang
|
||||
- name: Install yq
|
||||
run: |
|
||||
./tests/install_go.sh -f -p
|
||||
echo "/usr/local/go/bin" >> "$GITHUB_PATH"
|
||||
./ci/install_yq.sh
|
||||
env:
|
||||
INSTALL_IN_GOPATH: false
|
||||
|
||||
- name: Read properties from versions.yaml
|
||||
run: |
|
||||
go_version="$(yq '.languages.golang.version' versions.yaml)"
|
||||
[ -n "$go_version" ]
|
||||
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup Golang version ${{ env.GO_VERSION }}
|
||||
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
# Setup-go doesn't work properly with ppc64le: https://github.com/actions/setup-go/issues/648
|
||||
architecture: ${{ contains(inputs.instance, 'ppc64le') && 'ppc64le' || '' }}
|
||||
|
||||
- name: Prepare the runner for k8s test suite
|
||||
run: bash "${HOME}/scripts/k8s_cluster_prepare.sh"
|
||||
|
||||
12
.github/workflows/static-checks.yaml
vendored
12
.github/workflows/static-checks.yaml
vendored
@@ -126,11 +126,15 @@ jobs:
|
||||
./ci/install_yq.sh
|
||||
env:
|
||||
INSTALL_IN_GOPATH: false
|
||||
- name: Install golang
|
||||
- name: Read properties from versions.yaml
|
||||
run: |
|
||||
cd "${GOPATH}/src/github.com/${GITHUB_REPOSITORY}"
|
||||
./tests/install_go.sh -f -p
|
||||
echo "/usr/local/go/bin" >> "$GITHUB_PATH"
|
||||
go_version="$(yq '.languages.golang.version' versions.yaml)"
|
||||
[ -n "$go_version" ]
|
||||
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
|
||||
- name: Setup Golang version ${{ env.GO_VERSION }}
|
||||
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get -y install moreutils hunspell hunspell-en-gb hunspell-en-us pandoc
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2018-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
[[ -n "${DEBUG:-}" ]] && set -x
|
||||
|
||||
tmp_dir=$(mktemp -d -t install-go-tmp.XXXXXXXXXX)
|
||||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
script_name="$(basename "${BASH_SOURCE[0]}")"
|
||||
force=""
|
||||
USE_VERSIONS_FILE=""
|
||||
PROJECT="Kata Containers"
|
||||
|
||||
source "${script_dir}/common.bash"
|
||||
|
||||
install_dest="/usr/local/"
|
||||
|
||||
function finish() {
|
||||
rm -rf "$tmp_dir"
|
||||
}
|
||||
|
||||
function usage(){
|
||||
exit_code="$1"
|
||||
cat <<EOF
|
||||
Usage:
|
||||
|
||||
${script_name} [options] <args>
|
||||
|
||||
Args:
|
||||
<go-version> : Install a specific go version.
|
||||
|
||||
Example:
|
||||
${script_name} 1.10
|
||||
|
||||
Options
|
||||
-d <path> : destination path, path where go will be installed.
|
||||
-f : Force remove old go version and install the specified one.
|
||||
-h : Show this help
|
||||
-p : Install go defined in ${PROJECT} versions file.
|
||||
|
||||
EOF
|
||||
|
||||
exit "$exit_code"
|
||||
}
|
||||
|
||||
trap finish EXIT
|
||||
|
||||
pushd "${tmp_dir}"
|
||||
|
||||
while getopts "d:fhp" opt
|
||||
do
|
||||
case $opt in
|
||||
d) install_dest="${OPTARG}" ;;
|
||||
f) force="true" ;;
|
||||
h) usage 0 ;;
|
||||
p) USE_VERSIONS_FILE="true" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $(( $OPTIND - 1 ))
|
||||
|
||||
go_version="${1:-""}"
|
||||
|
||||
if [ -z "$go_version" ] && [ "${USE_VERSIONS_FILE}" = "true" ] ;then
|
||||
go_version=$(get_from_kata_deps ".languages.golang.meta.newest-version")
|
||||
fi
|
||||
|
||||
if [ -z "$go_version" ];then
|
||||
echo "Missing go version or -p option"
|
||||
usage 0
|
||||
fi
|
||||
|
||||
if command -v go; then
|
||||
[[ "$(go version)" == *"go${go_version}"* ]] && \
|
||||
info "Go ${go_version} already installed" && \
|
||||
exit
|
||||
if [ "${force}" = "true" ]; then
|
||||
info "removing $(go version)"
|
||||
sudo rm -rf "${install_dest}/go"
|
||||
else
|
||||
die "$(go version) is installed, use -f or remove it before install go ${go_version}"
|
||||
fi
|
||||
fi
|
||||
|
||||
goarch=$(arch_to_golang)
|
||||
|
||||
info "Download go version ${go_version}"
|
||||
kernel_name=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
curl -fsSOL "https://go.dev/dl/go${go_version}.${kernel_name}-${goarch}.tar.gz"
|
||||
info "Install go"
|
||||
mkdir -p "${install_dest}"
|
||||
sudo tar -C "${install_dest}" -xzf "go${go_version}.${kernel_name}-${goarch}.tar.gz"
|
||||
popd
|
||||
@@ -45,9 +45,6 @@ function install_dependencies() {
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install "${system_deps[@]}"
|
||||
|
||||
ensure_yq
|
||||
"${repo_root_dir}/tests/install_go.sh" -p -f
|
||||
|
||||
# Dependency list of projects that we can install them
|
||||
# directly from their releases on GitHub:
|
||||
# - containerd
|
||||
|
||||
Reference in New Issue
Block a user