Merge pull request #6747 from AkihiroSuda/rocky-ci
This commit is contained in:
commit
887615c7d0
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
@ -509,17 +509,20 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
*-junit.xml
|
*-junit.xml
|
||||||
|
|
||||||
cgroup2:
|
vagrant:
|
||||||
name: CGroupsV2 - SELinux enforced
|
name: Vagrant
|
||||||
# nested virtualization is only available on macOS hosts
|
# nested virtualization is only available on macOS hosts
|
||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
needs: [project, linters, protos, man]
|
needs: [project, linters, protos, man]
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# Currently crun is disabled to decrease CI flakiness.
|
# Currently crun is disabled to decrease CI flakiness.
|
||||||
# We can enable crun again when we get a better CI infra.
|
# We can enable crun again when we get a better CI infra.
|
||||||
runc: [runc]
|
runc: [runc]
|
||||||
|
# Fedora is for testing cgroup v2 functionality, Rocky Linux is for testing on an enterprise-grade environment
|
||||||
|
box: ["fedora/35-cloud-base", "rockylinux/8"]
|
||||||
env:
|
env:
|
||||||
GOTEST: gotestsum --
|
GOTEST: gotestsum --
|
||||||
steps:
|
steps:
|
||||||
@ -532,7 +535,13 @@ jobs:
|
|||||||
key: vagrant-${{ hashFiles('Vagrantfile*') }}
|
key: vagrant-${{ hashFiles('Vagrantfile*') }}
|
||||||
|
|
||||||
- name: Vagrant start
|
- name: Vagrant start
|
||||||
|
env:
|
||||||
|
BOX: ${{ matrix.box }}
|
||||||
run: |
|
run: |
|
||||||
|
if [ "$BOX" = "rockylinux/8" ]; then
|
||||||
|
# The latest version 5.0.0 seems 404 (as of March 30, 2022)
|
||||||
|
export BOX_VERSION="4.0.0"
|
||||||
|
fi
|
||||||
# Retry if it fails (download.fedoraproject.org returns 404 sometimes)
|
# Retry if it fails (download.fedoraproject.org returns 404 sometimes)
|
||||||
vagrant up || vagrant up
|
vagrant up || vagrant up
|
||||||
|
|
||||||
@ -565,7 +574,8 @@ jobs:
|
|||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: TestResults cgroup2 ${{ matrix.runtime }} ${{matrix.runc}}
|
# ${{ matrix.box }} cannot be used here due to character limitation
|
||||||
|
name: TestResults vagrant ${{ github.run_id }} ${{ matrix.runtime }} ${{matrix.runc}}
|
||||||
path: |
|
path: |
|
||||||
${{github.workspace}}/*-junit.xml
|
${{github.workspace}}/*-junit.xml
|
||||||
${{github.workspace}}/critestreport/*
|
${{github.workspace}}/critestreport/*
|
||||||
|
22
Vagrantfile
vendored
22
Vagrantfile
vendored
@ -15,9 +15,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# Vagrantfile for cgroup2 and SELinux
|
# Vagrantfile for Fedora and EL
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.box = "fedora/35-cloud-base"
|
config.vm.box = ENV["BOX"] || "fedora/35-cloud-base"
|
||||||
|
config.vm.box_version = ENV["BOX_VERSION"]
|
||||||
memory = 4096
|
memory = 4096
|
||||||
cpus = 2
|
cpus = 2
|
||||||
config.vm.provider :virtualbox do |v|
|
config.vm.provider :virtualbox do |v|
|
||||||
@ -71,6 +72,19 @@ Vagrant.configure("2") do |config|
|
|||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# EL does not have /usr/local/{bin,sbin} in the PATH by default
|
||||||
|
config.vm.provision "setup-etc-environment", type: "shell", run: "once" do |sh|
|
||||||
|
sh.upload_path = "/tmp/vagrant-setup-etc-environment"
|
||||||
|
sh.inline = <<~SHELL
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eux -o pipefail
|
||||||
|
cat >> /etc/environment <<EOF
|
||||||
|
PATH=/usr/local/go/bin:/usr/local/bin:/usr/local/sbin:$PATH
|
||||||
|
EOF
|
||||||
|
source /etc/environment
|
||||||
|
SHELL
|
||||||
|
end
|
||||||
|
|
||||||
# To re-run this provisioner, installing a different version of go:
|
# To re-run this provisioner, installing a different version of go:
|
||||||
# GO_VERSION="1.14.6" vagrant up --provision-with=install-golang
|
# GO_VERSION="1.14.6" vagrant up --provision-with=install-golang
|
||||||
#
|
#
|
||||||
@ -83,10 +97,6 @@ Vagrant.configure("2") do |config|
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eux -o pipefail
|
set -eux -o pipefail
|
||||||
curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar Cxz /usr/local
|
curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar Cxz /usr/local
|
||||||
cat >> /etc/environment <<EOF
|
|
||||||
PATH=/usr/local/go/bin:$PATH
|
|
||||||
EOF
|
|
||||||
source /etc/environment
|
|
||||||
cat >> /etc/profile.d/sh.local <<EOF
|
cat >> /etc/profile.d/sh.local <<EOF
|
||||||
GOPATH=\\$HOME/go
|
GOPATH=\\$HOME/go
|
||||||
PATH=\\$GOPATH/bin:\\$PATH
|
PATH=\\$GOPATH/bin:\\$PATH
|
||||||
|
Loading…
Reference in New Issue
Block a user